List of usage examples for org.springframework.http HttpStatus NO_CONTENT
HttpStatus NO_CONTENT
To view the source code for org.springframework.http HttpStatus NO_CONTENT.
Click Source Link
From source file:net.eusashead.hateoas.conditional.interceptor.AsyncTestController.java
@RequestMapping(method = RequestMethod.PUT) public Callable<ResponseEntity<Void>> put() { return new Callable<ResponseEntity<Void>>() { @Override//from w w w . ja v a 2 s.c o m public ResponseEntity<Void> call() throws Exception { HttpHeaders headers = new HttpHeaders(); headers.setETag("\"123456\""); return new ResponseEntity<Void>(headers, HttpStatus.NO_CONTENT); } }; }
From source file:com.torchmind.stockpile.server.controller.v1.NameController.java
/** * <code>DELETE /v1/name/{name}</code> * * Purges a name from the cache.//w w w .jav a2s . c om * * @param name a display name. */ @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(path = "/{name}", method = RequestMethod.DELETE) public void purge(@Nonnull @PathVariable("name") String name) { this.profileService.purgeName(name); }
From source file:com.wisemapping.rest.AccountController.java
@RequestMapping(method = RequestMethod.PUT, value = "account/password", consumes = { "text/plain" }) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void changePassword(@RequestBody String password) { if (password == null) { throw new IllegalArgumentException("Password can not be null"); }/*from w ww . ja va2 s. c o m*/ final User user = Utils.getUser(true); user.setPassword(password); userService.changePassword(user); }
From source file:com.expedia.seiso.web.controller.v1.IpAddressRoleControllerV1.java
@RequestMapping(value = SINGLE_URI_TEMPLATE, method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(@PathVariable String serviceInstanceKey, @PathVariable String name) { val itemKey = new IpAddressRoleKey(serviceInstanceKey, name); basicItemDelegate.delete(itemKey);/*from w w w . java2 s.com*/ }
From source file:fi.helsinki.opintoni.web.rest.privateapi.portfolio.componentvisibility.PrivateComponentVisibilityResource.java
@RequestMapping(method = RequestMethod.POST) public ResponseEntity<Void> update(@UserId Long userId, @PathVariable Long portfolioId, @Valid @RequestBody UpdateComponentVisibilityRequest request) { permissionChecker.verifyPermission(userId, portfolioId, Portfolio.class); componentVisibilityService.update(portfolioId, request); return new ResponseEntity<>(HttpStatus.NO_CONTENT); }
From source file:fr.esiea.esieaddress.controllers.importation.FBImportCtrl.java
@Secured("ROLE_USER") @RequestMapping(value = "synchronize", method = RequestMethod.GET) @ResponseBody//from ww w . ja v a2 s.c o m @ResponseStatus(HttpStatus.NO_CONTENT) public void Synchronise() throws ServiceException, DaoException, IOException { LOGGER.info("[Controller] Synchronise contact facebook"); String accessToken = (String) SecurityContextHolder.getContext().getAuthentication().getCredentials(); fbService.SynchroniseFBContacts(accessToken); }
From source file:com.sg.dvdlibrary.controller.HomeController.java
@RequestMapping(value = "/dvd/{id}", method = RequestMethod.PUT) @ResponseStatus(HttpStatus.NO_CONTENT) public void updateEntry(@PathVariable("id") int id, @Valid @RequestBody Dvd dvd) { dvd.setLibId(id);/*from w ww .j a v a2 s . co m*/ dao.updateEntry(dvd); }
From source file:nl.surfnet.mujina.controllers.ServiceProviderAPI.java
@RequestMapping(value = { "/assertionConsumerServiceURL" }, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.NO_CONTENT) @ResponseBody/*w w w . j av a 2 s .co m*/ public void setAssertionConsumerServiceURL( @RequestBody AssertionConsumerServiceURL assertionConsumerServiceURL) { log.debug("Request to set assertionConsumerServiceURL to {}", assertionConsumerServiceURL.getValue()); configuration.setAssertionConsumerServiceURL(assertionConsumerServiceURL.getValue()); }
From source file:io.github.proxyprint.kitchen.controllers.DefaultController.java
@RequestMapping(method = RequestMethod.OPTIONS, value = "/*") @ResponseBody/*from w ww.j a v a 2 s .c o m*/ public ResponseEntity handleOptions() { return new ResponseEntity(HttpStatus.NO_CONTENT); }
From source file:com.tsguild.pumpingunitdb.controller.HomeController.java
@RequestMapping(value = "/unit/{id}", method = RequestMethod.PUT) @ResponseStatus(HttpStatus.NO_CONTENT) public void putUnit(@PathVariable("id") int id, @RequestBody Unit unit) { // set the value of the PathVariable id on the incoming Contact object // to ensure that a) the contact id is set on the object and b) that // the value of the PathVariable id and the Contact object id are the // same.// ww w. j a v a 2s .c om unit.setTrackingNumber(id); // update the contact //dao.removeUnit(id); dao.updateUnit(unit); //dao.removeUnit(id); }