@Test public void shouldUpdateSettings() throws Exception { ConfigurationDTO configurationDTO = new ConfigurationDTO(); controller.updateSettings(configurationDTO); verify(configurationService).update(configurationDTO.getList()); }
@RequestMapping(value = "/saveSettings", method = RequestMethod.POST, headers = "Accept=application/json") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_SETTING')") public ResponseEntity<OpenLmisResponse> updateSettings(@RequestBody ConfigurationDTO settings) { configurationService.update(settings.getList()); return OpenLmisResponse.response(SETTINGS, "success"); }
SettingController extends BaseController { @RequestMapping(value = "/saveSettings", method = RequestMethod.POST, headers = "Accept=application/json") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_SETTING')") public ResponseEntity<OpenLmisResponse> updateSettings(@RequestBody ConfigurationDTO settings) { configurationService.update(settings.getList()); return OpenLmisResponse.response(SETTINGS, "success"); } }
SettingController extends BaseController { @RequestMapping(value = "/saveSettings", method = RequestMethod.POST, headers = "Accept=application/json") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_SETTING')") public ResponseEntity<OpenLmisResponse> updateSettings(@RequestBody ConfigurationDTO settings) { configurationService.update(settings.getList()); return OpenLmisResponse.response(SETTINGS, "success"); }  }
SettingController extends BaseController { @RequestMapping(value = "/saveSettings", method = RequestMethod.POST, headers = "Accept=application/json") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_SETTING')") public ResponseEntity<OpenLmisResponse> updateSettings(@RequestBody ConfigurationDTO settings) { configurationService.update(settings.getList()); return OpenLmisResponse.response(SETTINGS, "success"); }  @RequestMapping(value = "/settings", method = RequestMethod.GET, headers = "Accept=application/json") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_SETTING')") ResponseEntity<OpenLmisResponse> getAll(); @RequestMapping(value = "/settings/{key}", method = RequestMethod.GET, headers = "Accept=application/json") ResponseEntity<OpenLmisResponse> getByKey(@PathVariable(value = "key") String key); @RequestMapping(value = "/saveSettings", method = RequestMethod.POST, headers = "Accept=application/json") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_SETTING')") ResponseEntity<OpenLmisResponse> updateSettings(@RequestBody ConfigurationDTO settings); }
SettingController extends BaseController { @RequestMapping(value = "/saveSettings", method = RequestMethod.POST, headers = "Accept=application/json") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_SETTING')") public ResponseEntity<OpenLmisResponse> updateSettings(@RequestBody ConfigurationDTO settings) { configurationService.update(settings.getList()); return OpenLmisResponse.response(SETTINGS, "success"); }  @RequestMapping(value = "/settings", method = RequestMethod.GET, headers = "Accept=application/json") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_SETTING')") ResponseEntity<OpenLmisResponse> getAll(); @RequestMapping(value = "/settings/{key}", method = RequestMethod.GET, headers = "Accept=application/json") ResponseEntity<OpenLmisResponse> getByKey(@PathVariable(value = "key") String key); @RequestMapping(value = "/saveSettings", method = RequestMethod.POST, headers = "Accept=application/json") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_SETTING')") ResponseEntity<OpenLmisResponse> updateSettings(@RequestBody ConfigurationDTO settings); static final String SETTINGS; }