List of usage examples for org.springframework.web.bind.annotation RequestMethod DELETE
RequestMethod DELETE
To view the source code for org.springframework.web.bind.annotation RequestMethod DELETE.
Click Source Link
From source file:com.xinferin.controller.ProductController.java
@RequestMapping(value = "/{productId}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.OK)/* w w w . j a v a 2s .c o m*/ public void deleteProduct(@PathVariable int productId) { daoProduct.delete(productId); }
From source file:springfox.documentation.spring.web.dummy.controllers.AbstractController.java
@RequestMapping(value = "/delete-t/{id}", method = RequestMethod.DELETE) @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input") }) public HttpEntity delete(@PathVariable("id") ID id) { throw new UnsupportedOperationException(); }
From source file:io.sevenluck.chat.controller.ChatChannelController.java
@RequestMapping(method = RequestMethod.DELETE, value = "{id}") public void delete(@PathVariable Long id) throws Exception { logger.info("delete channel " + id); service.delete(id);/*from w ww.j a v a 2s .c om*/ }
From source file:com.mycompany.dvdmvc.controllers.DVDController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @ResponseBody//from ww w.j ava 2 s. co m public void delete(@Valid @PathVariable("id") Integer dvdId) { DVD dvd = dao.get(dvdId); dao.delete(dvd); }
From source file:org.lamop.riche.webservices.WorkAuthorRESTWs.java
@DELETE @Path("{id}") @Produces(MediaType.APPLICATION_JSON)//w ww . j a v a 2 s . c o m @RequestMapping(method = RequestMethod.DELETE) public void remove(@PathParam("id") int id) { workAuthorService.removeEntity(new Long(id)); }
From source file:com.artivisi.salary.payroll.system.controller.LemburController.java
@RequestMapping(value = "/lembur/{id}", method = RequestMethod.DELETE) public void deleteLembur(@PathVariable(value = "id") String id) throws Exception { if (id == null) { throw new Exception("id tidak boleh kosong atau null"); }//from w ww .j a v a2s. c o m Lembur lembur = lemburService.findOne(id); if (lembur == null) { throw new Exception("User tidak ditemukan"); } lemburService.delete(lembur); }
From source file:edu.sjsu.cmpe275.project.controller.OrderController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public ResponseEntity<?> checkOut(@PathVariable(value = "id") Long id) { return new ResponseEntity(orderService.checkOut(id), HttpStatus.OK); }
From source file:com.artivisi.salary.payroll.system.controller.JabatanController.java
@RequestMapping(value = "/jabatan/{id}", method = RequestMethod.DELETE) public void deleteJabatan(@PathVariable(value = "id") String id) throws Exception { if (id == null) { throw new Exception("id tidak boleh kosong atau null"); }//from w w w . j a va 2s . c o m Jabatan jabatan = jabatanService.findOne(id); if (jabatan == null) { throw new Exception("User tidak ditemukan"); } jabatanService.delete(jabatan); }
From source file:com.ferdinan.belajar.web.model.service.controller.RoleController.java
@RequestMapping(value = "/role/{id}", method = RequestMethod.DELETE) public void hapusRole(@PathVariable(value = "id") String idRole) throws Exception { if (idRole.trim().length() <= 0 || idRole == null) { throw new Exception("id tidak boleh kosong atau null"); }//from w ww . jav a 2s . c o m Role role = roleService.findOne(idRole); if (role == null) { throw new Exception("Role dengan id tidak ditemukan"); } roleService.delete(role); }
From source file:org.royrusso.mvc.controller.UserController.java
@ResponseBody @RequestMapping(value = "/{id}", method = RequestMethod.DELETE, produces = "application/json") public RestResponse deleteUser(@PathVariable("id") int id) { userService.deleteUser(id);//from w w w . j ava 2s. com return new RestResponse<String>(true, "", null); }