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:eu.griend.grpf.controller.NodeController.java
@RequestMapping(value = "/nodes/{id}", method = RequestMethod.PUT) public void updateNode(@PathVariable String id, @RequestBody NodeEntity node) { UUID uuid = UUID.fromString(id); this.nodeService.updateNode(uuid, node); }
From source file:com.swcguild.capstoneproject.controller.AdminController.java
@RequestMapping(value = "/post/{id}", method = RequestMethod.PUT) @ResponseStatus(HttpStatus.NO_CONTENT)/* www. j a v a 2s . co m*/ public void putPost(@PathVariable("id") int id, @Valid @RequestBody Post post) { post.setPostID(id); dao.updatePost(post); }
From source file:com.github.lynxdb.server.api.http.handlers.EpUid.java
@RequestMapping(path = "/tsmeta", method = { RequestMethod.GET, RequestMethod.POST, RequestMethod.PUT, RequestMethod.DELETE }, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity tsmeta() { return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).build(); }
From source file:com.arya.latihan.controller.ItemController.java
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) @Transactional(readOnly = false)//from w w w . j av a 2s . c o m public ResponseEntity<Item> updateItem(@PathVariable("id") String id, @RequestBody @Valid Item item) { item.setId(id); item = itemRepository.save(item); return new ResponseEntity<Item>(item, HttpStatus.OK); }
From source file:be.solidx.hot.shows.AbstractRest.java
@Override public RestAuthHeaders<CLOSURE> put(List<String> paths) { return new RestAuthHeadersImpl(buildRequestMapping(paths, RequestMethod.PUT)); }
From source file:com.swcguild.capstoneproject.controller.PinnedPostController.java
@RequestMapping(value = "/pinpost/{id}", method = RequestMethod.PUT) @ResponseStatus(HttpStatus.NO_CONTENT)// www. ja v a 2s . c o m public void putPost(@PathVariable("id") int id, @Valid @RequestBody PinPost pinPost) { pinPost.setPinPostID(id); dao.updatePinPost(pinPost); }
From source file:org.hsweb.web.controller.quartz.QuartzJobController.java
@RequestMapping(value = "/{id}/disable", method = RequestMethod.PUT) @AccessLogger("?") @Authorize(action = "disable") public ResponseMessage disable(@PathVariable("id") String id) { quartzJobService.disable(id);/* w w w . j a v a 2 s. c o m*/ return ResponseMessage.ok(); }
From source file:com.alexshabanov.springrestapi.support.ProfileController.java
@RequestMapping(value = PROFILE_RESOURCE, method = RequestMethod.PUT) @ResponseBody/*from w ww . j a v a 2 s .c o m*/ public void putQueryParam(@RequestParam(value = "a", required = false) Long a, @RequestParam(value = "b", required = false) Long b, @RequestParam("c") int c) { throw new AssertionError(); // should be mocked }
From source file:com.artivisi.latihan.web.RoleController.java
@RequestMapping(value = "/role/{id}", method = RequestMethod.PUT) public void update(@PathVariable String id, @RequestBody Role x) throws Exception { Role role = roleService.findOne(id); if (role == null) { throw new Exception("Role dengan id tidak ditemukan"); }/*w ww . j a v a 2 s . c o m*/ x.setId(role.getId()); roleService.save(x); }
From source file:com.monitor.controller.MessageController.java
@ApiOperation(value = "update", notes = "update message") @RequestMapping(method = { RequestMethod.PUT, RequestMethod.PATCH }, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<Message> update(Message messageRequest) { Message messageSaved = service.insert(messageRequest); if (messageSaved != null) { return new ResponseEntity<>(messageSaved, HttpStatus.OK); } else {/*from w w w . ja v a 2 s. c om*/ return new ResponseEntity<>(messageSaved, HttpStatus.BAD_REQUEST); } }