@RequestMapping(value = "/periods/{id}", method = DELETE, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_SCHEDULE')") public ResponseEntity<OpenLmisResponse> delete(@PathVariable("id") Long id) { try { processingScheduleService.deletePeriod(id); } catch (DataException e) { return error(e, HttpStatus.BAD_REQUEST); } return success(messageService.message("message.period.deleted.success")); }