List of usage examples for org.springframework.web.bind.annotation RequestMethod PUT
RequestMethod PUT
To view the source code for org.springframework.web.bind.annotation RequestMethod PUT.
Click Source Link
From source file:com.arya.latihan.controller.SalesOrderController.java
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) @Transactional(readOnly = false)/*from w w w. jav a 2 s .c o m*/ public ResponseEntity<SalesOrder> editSalesOrder(@PathVariable("id") String id, @Valid SalesOrder salesOrder) { salesOrder.setId(id); salesOrder = salesOrderRepository.save(salesOrder); return new ResponseEntity<SalesOrder>(salesOrder, HttpStatus.OK); }
From source file:es.fdi.reservas.reserva.web.GrupoReservaRestController.java
@RequestMapping(value = "/reserva/grupo/editar/{idGrupo}", method = RequestMethod.PUT) public void editarGrupoReserva(@PathVariable("idGrupo") Long idGrupo, @RequestBody GrupoReservaDTO grDTO) { grupo_service.editarGrupoReserva(idGrupo, grDTO); }
From source file:no.nlf.rest.RestLicenseController.java
/** * //from www .j av a2 s . com * @param jsonLicenseString * @return */ @RequestMapping(value = "/licenses", method = RequestMethod.PUT) public @ResponseBody License updateLicense(@RequestBody String jsonLicenseString) { License license = jsonStringToLicensePOJO(jsonLicenseString); return licenseLogic.update(license); }
From source file:com.baidu.terminator.manager.action.LinkControlAction.java
@RequestMapping(value = "/start/{linkId}", method = RequestMethod.PUT) @ResponseBody/*from www. java 2 s.c o m*/ public ResponseEntity<String> startServer(@PathVariable Integer linkId) { linkControlService.startServer(linkId); return new ResponseEntity<String>(HttpStatus.NO_CONTENT); }
From source file:com.bcknds.demo.mongo.controller.TodoController.java
@RequestMapping(method = RequestMethod.PUT) public @ResponseBody Todo update(@RequestBody final Todo todo) { return todoService.update(todo); }
From source file:dtu.ds.warnme.ws.rest.json.impl.EventRestWS.java
@PreAuthorize("hasRole('USER')") @RequestMapping(value = "/{id}", method = RequestMethod.PUT) void actionOnEvent(HttpServletRequest request, HttpServletResponse response, @PathVariable String id, @RequestParam(value = "action", required = false) String action) throws BadRequestException, ServiceException { if (ACTION_UPVOTE.equals(action)) { eventsService.upvoteEvent(id);/* ww w .jav a 2 s.c o m*/ } else if (ACTION_DOWNVOTE.equals(action)) { eventsService.downvoteEvent(id); } else { throw new BadRequestException("Invalid action!", "exceptions.badRequestExceptions.invalidAction"); } }
From source file:com.diagrama.repository.PeriodoController.java
@RequestMapping(value = "/periodo/{periodo_id}", method = RequestMethod.PUT) public ResponseEntity<?> modificarPeriodo(@RequestBody PeriodosLectivos periodosLectivos, @PathVariable int periodo_id) { periodoRepository.save(periodosLectivos); return new ResponseEntity<>(HttpStatus.OK); }
From source file:com.arya.latihan.controller.CustomerController.java
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) @Transactional(readOnly = false)/*from ww w .j av a2 s . c o m*/ public ResponseEntity<Customer> editCustomer(@PathVariable("id") String id, @Valid Customer customer) { customer.setId(id); customer = customerRepository.save(customer); return new ResponseEntity<Customer>(customer, HttpStatus.OK); }
From source file:cz.fi.muni.pa036.airticketbooking.rest.BaggageRest.java
@RequestMapping(method = RequestMethod.PUT) public void updateBaggage(@RequestBody @Valid BaggageDto baggage) { baggageService.update(baggage); }
From source file:org.hsweb.web.oauth2.controller.OAuth2ClientController.java
@RequestMapping(value = "/enable/{id}", method = RequestMethod.PUT) @AccessLogger("?") @Authorize(action = "enable") protected ResponseMessage enable(@PathVariable("id") String id) { oAuth2ClientService.enable(id);/*w w w . j av a 2s.c o m*/ return ResponseMessage.ok(); }