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.dolphine.customer.controller.CustomerController.java
@RequestMapping(method = { RequestMethod.DELETE }, value = "/{id}") public void delete(@PathVariable("id") String id) { return; }
From source file:com.opensearchserver.hadse.index.IndexController.java
@RequestMapping(method = RequestMethod.DELETE, value = "/{index_name}") @ResponseBody/*from w w w.j a v a 2s . co m*/ public HttpEntity<?> deleteIndex(@PathVariable String index_name) { if (!IndexCatalog.exists(index_name)) return new ResponseEntity<String>("Index not found: " + index_name, HttpStatus.NOT_FOUND); try { return IndexCatalog.delete(index_name); } catch (IOException e) { return new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); } }
From source file:cz.fi.muni.pa036.airticketbooking.rest.SeatReservationRest.java
@RequestMapping(method = RequestMethod.DELETE) public void deleteSeatReservation(@RequestBody @Valid Long seatReservation) { SeatReservationDto p = seatReservationService.getById(seatReservation); seatReservationService.delete(p);//from w w w .ja v a 2 s . co m }
From source file:com.restfiddle.controller.rest.DataMapController.java
@RequestMapping(value = "/api/dataMaps/{id}", method = RequestMethod.DELETE, headers = "Accept=application/json") public @ResponseBody DataMap delete(@PathVariable("id") String id) { logger.debug("Deleting dataMap with id: " + id); DataMap deleted = dataMapRepository.findOne(id); dataMapRepository.delete(deleted);/* w w w .j a v a 2s.co m*/ return deleted; }
From source file:org.bhagya.finance.api.web.HobbyController.java
@RequestMapping(value = "/delete/{hobbyId}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.OK)/*from ww w . j a v a2 s . co m*/ public void deleteHobby(@PathVariable("hobbyId") int id) { log.debug("request for delere Hobby by id ==> {} ", id); serviceManager.delete(id); }
From source file:net.noday.core.web.GeneralController.java
/** * url:{mapping on class}/{id}//w ww. j a v a2 s. c o m * method:delete * ? * @param id id * @param m springmvcModel * @return view */ @RequestMapping(value = "{id}", method = RequestMethod.DELETE) public abstract String delete(@PathVariable("id") PK id, Model m);
From source file:com.vividcode.imap.server.controller.UserController.java
@RequestMapping(method = RequestMethod.DELETE, value = PathParameter.ID) @ResponseStatus(HttpStatus.OK) public void delete(@PathVariable(RestParameter.ID) Long id) { userService.deleteUser(id); }
From source file:com.github.wxiaoqi.search.controller.SearchController.java
@RequestMapping(value = "/index", method = RequestMethod.DELETE) public ObjectRestResponse removeIndexObject(@RequestBody IndexObject indexObject) { luceneService.delete(indexObject);//from w ww . j a v a2s. c o m return new ObjectRestResponse(); }
From source file:org.ng200.openolympus.controller.contest.ContestTaskRemovalController.java
@PreAuthorize(SecurityExpressionConstants.IS_ADMIN) @CacheEvict(value = "contests", key = "#contest.id") @RequestMapping(value = "/api/contest/{contest}/removeTask", method = RequestMethod.DELETE) public void removeTask(@PathVariable(value = "contest") final Contest contest, @RequestParam(value = "task") final Task task, final Model model) { Assertions.resourceExists(contest);//w ww. j ava2 s .c o m Assertions.resourceExists(task); HashSet<Task> tasks = new HashSet<>(contest.getTasks()); if (tasks.contains(task)) { tasks.remove(task); contest.setTasks(tasks); this.contestService.saveContest(contest); } }
From source file:reconf.server.services.property.DeletePropertyService.java
@RequestMapping(value = "/product/{prod}/component/{comp}/property/{prop}/rule/{rule}", method = RequestMethod.DELETE) @Transactional/* w ww . j a va 2s . c o m*/ public ResponseEntity<PropertyResult> resticted(@PathVariable("prod") String product, @PathVariable("comp") String component, @PathVariable("prop") String property, @PathVariable("rule") String rule) { PropertyKey key = new PropertyKey(product, component, property, rule); Property fromRequest = new Property(key, null); List<String> errors = DomainValidator.checkForErrors(key); if (!errors.isEmpty()) { return new ResponseEntity<PropertyResult>(new PropertyResult(fromRequest, errors), HttpStatus.BAD_REQUEST); } if (!properties.exists(key)) { return new ResponseEntity<PropertyResult>(new PropertyResult(fromRequest, Property.NOT_FOUND), HttpStatus.NOT_FOUND); } properties.delete(key); return new ResponseEntity<PropertyResult>(HttpStatus.OK); }