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.example.controller.admin.AdminRestaurantController.java
@RequestMapping(value = "/restaurants/{id}", method = RequestMethod.DELETE) public String delete(@PathVariable Long id) { restaurantRepository.delete(id);//from w ww . jav a 2s . c o m return "ok"; }
From source file:com.mycompany.flooringmvc.controllers.AdminController.java
@RequestMapping(value = "/t{id}", method = RequestMethod.DELETE) @ResponseBody// w ww . j a va 2s. com public void delete(@PathVariable("id") int delete) { Tax tax = tdao.get(delete); tdao.delete(tax); // return "redirect:/"; }
From source file:com.github.lynxdb.server.api.http.handlers.EpTree.java
@RequestMapping(path = "/rules", method = { RequestMethod.POST, RequestMethod.DELETE, RequestMethod.PUT }, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity rules() { return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).build(); }
From source file:org.n52.restfulwpsproxy.webapp.rest.JobController.java
@RequestMapping(value = "/{jobId:.+}", method = RequestMethod.DELETE) public ResponseEntity<?> deleteJob(@PathVariable("processId") String processId, @PathVariable("jobId") String jobId, HttpServletRequest request) { return ResponseEntity.ok().build(); }
From source file:com.expedia.seiso.web.controller.v1.NodeIpAddressControllerV1.java
@RequestMapping(value = NODE_IP_ADDRESS_URI_TEMPLATE, method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT)/*ww w . ja va 2 s . c om*/ public void delete(@PathVariable String nodeName, @PathVariable String ipAddress) { val itemKey = new NodeIpAddressKey(nodeName, ipAddress); basicItemDelegate.delete(itemKey); }
From source file:org.hsweb.web.controller.draft.DraftController.java
/** * ?,??(true or false)/* w w w.ja v a 2 s. c o m*/ * * @param key ? * @param id ?ID * @return */ @RequestMapping(value = "/{key}/{id}", method = RequestMethod.DELETE) @AccessLogger("?") public ResponseMessage removeDraft(@PathVariable("key") String key, @PathVariable("id") String id) { User user = WebUtil.getLoginUser(); return ResponseMessage.ok(draftService.removeDraft(key, user.getId(), id)); }
From source file:com.restfiddle.controller.rest.OAuth2Controller.java
@RequestMapping(value = "/api/oauth2/{id}", method = RequestMethod.DELETE, headers = "Accept=application/json") public @ResponseBody void delete(@PathVariable("id") String id) { logger.debug("Deleting oauth2 with id: " + id); OAuth2 deleted = oauth2Repository.findOne(id); oauth2Repository.delete(deleted);//from w w w .j a v a 2 s. c om }
From source file:org.messic.server.facade.controllers.rest.AlbumResourceController.java
@ApiMethod(path = "/services/albumresources/{resourceSid}", verb = ApiVerb.DELETE, description = "Remove a resource with sid {resourceSid} from the album", produces = {}) @ApiErrors(apierrors = { @ApiError(code = UnknownMessicRESTException.VALUE, description = "Unknown error"), @ApiError(code = NotAuthorizedMessicRESTException.VALUE, description = "Forbidden access") }) @RequestMapping(value = "/{resourceSid}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.OK)/*from w w w . ja v a 2 s .c om*/ @ResponseBody @ApiResponseObject public void removeResource( @PathVariable @ApiParam(name = "resourceSid", description = "Sid of the resource to remove", paramType = ApiParamType.PATH, required = true) Long resourceSid) throws UnknownMessicRESTException, NotAuthorizedMessicRESTException { User user = SecurityUtil.getCurrentUser(); try { albumResourceAPI.remove(user, resourceSid); } catch (Exception e) { log.error("failed!", e); throw new UnknownMessicRESTException(e); } }
From source file:org.lecture.controller.AuthorityController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public ResponseEntity<?> delete(@PathVariable String id) { authorityRepository.delete(id);/*from w w w . ja v a 2s .co m*/ return ResponseEntity.noContent().build(); }
From source file:org.smigo.plants.PlantController.java
@RequestMapping(value = { "/rest/plant/{id:\\d+}" }, method = RequestMethod.DELETE) @ResponseBody/*w w w. ja va 2s. c om*/ public void deletePlant(@PathVariable int id, @AuthenticationPrincipal AuthenticatedUser user) { plantHandler.deletePlant(user, id); }