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:gt.dakaik.rest.interfaces.WSDocumentType.java
@Transactional() @RequestMapping(value = "/set", method = RequestMethod.PUT) public ResponseEntity<DocumentType> doUpdate(@RequestParam(value = "idUser", defaultValue = "0") int idUsuario, @RequestParam(value = "token", defaultValue = "") String token, @RequestBody DocumentType profile) throws EntidadNoEncontradaException, EntidadDuplicadaException;
From source file:org.sharetask.controller.WorkspaceController.java
@RequestMapping(method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(value = HttpStatus.OK)/*from ww w. java 2 s .c o m*/ @ResponseBody public WorkspaceDTO update(@RequestBody final WorkspaceDTO workspace) { return workspaceService.update(workspace); }
From source file:com.consol.citrus.admin.web.ConfigurationController.java
@RequestMapping(value = "/global-variables", method = { RequestMethod.PUT }) @ResponseBody/*ww w. j av a 2s . c o m*/ public void updateGlobalVariables(@RequestBody GlobalVariablesModel component) { if (component.getVariables().isEmpty()) { springBeanService.removeBeanDefinitions(projectService.getProjectContextConfigFile(), projectService.getActiveProject(), GlobalVariablesModel.class); } else if (getGlobalVariables().getVariables().isEmpty()) { createGlobalVariables(component); } else { springBeanService.updateBeanDefinitions(projectService.getProjectContextConfigFile(), projectService.getActiveProject(), GlobalVariablesModel.class, component); } }
From source file:com.mycompany.capstone.controllers.CategoryController.java
@RequestMapping(value = "/", method = RequestMethod.PUT) @ResponseBody//from w w w . j ava2 s . c om public Category editCategory(@Valid @RequestBody Category category) { category.setCategory(category.getCategory()); categoryDao.update(category); return category; }
From source file:com.fariz.muhammad.restful.controller.PermissionController.java
@RequestMapping(value = "/permission/{id}", method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK)/* w w w . ja va 2s .com*/ public void update(@PathVariable String id, @RequestBody Permission permission) { Permission p = permissionDao.findOne(id); permission.setId(id); permissionDao.save(permission); }
From source file:gt.dakaik.rest.interfaces.WSProfile.java
@Transactional() @RequestMapping(value = "/set", method = RequestMethod.PUT) public ResponseEntity<Profile> doUpdate(@RequestParam(value = "idUser", defaultValue = "0") int idUsuario, @RequestParam(value = "token", defaultValue = "") String token, @RequestBody Profile profile) throws EntidadNoEncontradaException, EntidadDuplicadaException;
From source file:hr.softwarecity.osijek.controllers.MosquitoController.java
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) public ResponseEntity modifyMosquito(@RequestBody Mosquito mosquito, @PathVariable long id) { Logger.getLogger("MosquitoController.java").log(Logger.Level.INFO, "Recognized PUT request to /" + id); Logger.getLogger("MosquitoController.java").log(Logger.Level.INFO, "Received mosquito " + mosquito.toString()); mosquitoRepository.save(mosquito);//from ww w. j av a 2 s . co m Logger.getLogger("MosquitoController.java").log(Logger.Level.INFO, "Successfully modified " + mosquito.toString()); return new ResponseEntity(HttpStatus.OK); }
From source file:com.nebhale.devoxx2013.web.DoorController.java
@RequestMapping(method = RequestMethod.PUT, value = "/{door}", consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.OK)//from w ww .j a va2 s . c o m @Transactional void update(@PathVariable Door door, @RequestBody Door transition) throws IllegalTransitionException { Assert.notNull(door); Assert.notNull(transition); Door.DoorStatus targetStatus = transition.getStatus(); if (Door.DoorStatus.CLOSED == targetStatus) { throw new IllegalTransitionException(door.getGame().getId(), door.getId(), targetStatus); } else if (Door.DoorStatus.OPENED == targetStatus) { this.gameService.open(door); } else if (Door.DoorStatus.SELECTED == targetStatus) { this.gameService.select(door); } else { throw new IllegalStateException(); } }
From source file:com.swcguild.dvdlibraryarch.controller.HomeController.java
@RequestMapping(value = "/dvd/{id}", method = RequestMethod.PUT) @ResponseStatus(HttpStatus.NO_CONTENT)/*from w ww . ja v a 2 s.com*/ public void putDvd(@PathVariable("id") int id, @RequestBody Dvd dvd) { // set the value of the PathVariable id on the incoming Dvd object // to ensure that a) the dvd id is set on the object and b) that // the value of the PathVariable id and the Dvd object id are the // same. dvd.setDvdId(id); // update the dvd dao.updateDvd(dvd); }
From source file:com.netflix.spinnaker.halyard.controllers.v1.AdminController.java
@RequestMapping(value = "/deprecateVersion", method = RequestMethod.PUT) DaemonTask<Halconfig, Void> deprecateVersion(@RequestParam(required = false) String illegalReason, @RequestBody Versions.Version version) { StaticRequestBuilder<Void> builder = new StaticRequestBuilder<>(); builder.setBuildResponse(() -> {//from w w w. ja va 2 s.co m artifactService.deprecateVersion(version, illegalReason); return null; }); return DaemonTaskHandler.submitTask(builder::build, "Deprecate version " + version.getVersion()); }