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:org.hsweb.web.oauth2.controller.OAuth2AccessController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @Authorize(action = "D") @AccessLogger("?") public ResponseMessage deleteAccess(@PathVariable("id") String id) { return ResponseMessage.ok(oAuth2ClientService.deleteAccess(id)); }
From source file:com.consol.citrus.samples.todolist.web.TodoController.java
@RequestMapping(method = RequestMethod.DELETE) public ResponseEntity deleteEntryByTitle(@RequestParam(value = "title") String title) { todoListService.deleteEntry(title);// w ww . java 2 s .com return ResponseEntity.ok().build(); }
From source file:locksdemo.LocksController.java
@RequestMapping(value = "{name}/{value}", method = RequestMethod.DELETE) public Map<String, Object> release(@PathVariable String name, @PathVariable String value) { if (!service.release(name, value)) { throw new NoSuchLockException(); }/*from w w w. ja v a 2s . com*/ return Collections.singletonMap("status", (Object) "OK"); }
From source file:rest.JugadorRestController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public void eliminarJugadorPorId(@PathVariable int id) { logicaJugador.deleteJugadorById(id); }
From source file:ch.heigvd.gamification.api.ApplicationsEndpoint.java
@Override @RequestMapping(value = "/{applicationName}", method = RequestMethod.DELETE) public ResponseEntity<Void> applicationsApplicationNameDelete( @ApiParam(value = "applicationName", required = true) @PathVariable("applicationName") String applicationUsername) { Application app = apprepository.findByName(applicationUsername); if (app != null) { apprepository.delete(app);//w w w . ja v a2 s . c o m return new ResponseEntity(HttpStatus.OK); } else { return new ResponseEntity(HttpStatus.NOT_FOUND); } }
From source file:net.eusashead.hateoas.conditional.interceptor.SyncTestController.java
@RequestMapping(method = RequestMethod.DELETE) public ResponseEntity<Void> delete() { return new ResponseEntity<Void>(HttpStatus.NO_CONTENT); }
From source file:br.com.hyperclass.snackbar.restapi.StockController.java
@RequestMapping(value = "/stock/", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<ProductWrapper> removeItemStock(@RequestBody final ProductWrapper productWrapper) throws StockException { final Product product = new Product(productWrapper.getName(), productWrapper.getPrice()); stock.removeItemStock(product);/*from w w w.j av a 2 s .co m*/ return new ResponseEntity<>(HttpStatus.OK); }
From source file:com.springsource.html5expense.controllers.ExpenseReportingApiController.java
@ResponseStatus(HttpStatus.OK) @RequestMapping(method = RequestMethod.DELETE, value = "/expenses/{expenseId}") public void restoreExpenseToEligibleCharge(@PathVariable("expenseId") Integer expenseId) { Expense ex = service.getExpense(expenseId); service.restoreEligibleCharges(Arrays.asList(ex.getId())); }
From source file:com.artivisi.salary.payroll.system.controller.AbsensiController.java
@RequestMapping(value = "/absensi/{id}", method = RequestMethod.DELETE) public void deleteAbsensi(@PathVariable(value = "id") String id) throws Exception { if (id == null) { throw new Exception("id tidak ada"); }/*w w w . j av a2s .c o m*/ Absensi absensi = absensiService.findOne(id); if (absensi == null) { throw new Exception("Data tidak ditemukan"); } absensiService.delete(absensi); }
From source file:no.nlf.rest.RestLocationController.java
/** * //w w w. j a va2 s. com * @param id * @return */ @RequestMapping(value = "/locations/{id} ", method = RequestMethod.DELETE) @ResponseBody public Location deleteLocation(@PathVariable("id") int id) { return locationLogic.delete(id); }