@Test void testDeleteApp() throws Exception { mockMvc.perform(delete(AppManagerController.URI + "/delete/id")).andExpect(status().is(200)); verify(dataService).deleteById(AppMetadata.APP, "id"); }
@ResponseStatus(HttpStatus.OK) @DeleteMapping("/delete/{id}") public void deleteApp(@PathVariable("id") String id) { dataService.deleteById(AppMetadata.APP, id); }
AppManagerController extends PluginController { @ResponseStatus(HttpStatus.OK) @DeleteMapping("/delete/{id}") public void deleteApp(@PathVariable("id") String id) { dataService.deleteById(AppMetadata.APP, id); } }
AppManagerController extends PluginController { @ResponseStatus(HttpStatus.OK) @DeleteMapping("/delete/{id}") public void deleteApp(@PathVariable("id") String id) { dataService.deleteById(AppMetadata.APP, id); } AppManagerController(AppManagerService appManagerService, DataService dataService); }
AppManagerController extends PluginController { @ResponseStatus(HttpStatus.OK) @DeleteMapping("/delete/{id}") public void deleteApp(@PathVariable("id") String id) { dataService.deleteById(AppMetadata.APP, id); } AppManagerController(AppManagerService appManagerService, DataService dataService); @GetMapping String init(); @ResponseBody @GetMapping("/apps") List<AppResponse> getApps(); @ResponseStatus(HttpStatus.OK) @PostMapping("/activate/{id}") void activateApp(@PathVariable(value = "id") String id); @ResponseStatus(HttpStatus.OK) @PostMapping("/deactivate/{id}") void deactivateApp(@PathVariable(value = "id") String id); @ResponseStatus(HttpStatus.OK) @DeleteMapping("/delete/{id}") void deleteApp(@PathVariable("id") String id); @ResponseStatus(HttpStatus.OK) @PostMapping("/upload") void uploadApp(@RequestParam("file") MultipartFile multipartFile); }
AppManagerController extends PluginController { @ResponseStatus(HttpStatus.OK) @DeleteMapping("/delete/{id}") public void deleteApp(@PathVariable("id") String id) { dataService.deleteById(AppMetadata.APP, id); } AppManagerController(AppManagerService appManagerService, DataService dataService); @GetMapping String init(); @ResponseBody @GetMapping("/apps") List<AppResponse> getApps(); @ResponseStatus(HttpStatus.OK) @PostMapping("/activate/{id}") void activateApp(@PathVariable(value = "id") String id); @ResponseStatus(HttpStatus.OK) @PostMapping("/deactivate/{id}") void deactivateApp(@PathVariable(value = "id") String id); @ResponseStatus(HttpStatus.OK) @DeleteMapping("/delete/{id}") void deleteApp(@PathVariable("id") String id); @ResponseStatus(HttpStatus.OK) @PostMapping("/upload") void uploadApp(@RequestParam("file") MultipartFile multipartFile); static final String ID; static final String URI; }