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:org.openbaton.nfvo.api.RestProject.java
/** * Removes the Project from the Projects repository * * @param id : the id of project to be removed *//* ww w.j a v a 2 s. c om*/ @RequestMapping(value = "{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(@PathVariable("id") String id) throws NotAllowedException, NotFoundException, EntityInUseException { log.debug("removing Project with id " + id); projectManagement.delete(projectManagement.query(id)); }
From source file:com.expedia.seiso.web.controller.v1.ServiceInstancePortControllerV1.java
@RequestMapping(value = SINGLE_URI_TEMPLATE, method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.NO_CONTENT) public void put(@PathVariable String serviceInstanceKey, @PathVariable Integer number, PEResource sipResource) { basicItemDelegate.put(sipResource.getItem(), true); }
From source file:org.openbaton.nfvo.api.RestVirtualLink.java
/** * Removes the Configuration from the Configurations repository * * @param id : the id of virtualLinkDescriptor to be removed *//* ww w . java 2 s. c om*/ @RequestMapping(value = "{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(@PathVariable("id") String id) { log.debug("removing VirtualLink with id " + id); virtualLinkManagement.delete(id); }
From source file:org.springsecurity.oauth2.controller.oauth.AdminController.java
@RequestMapping("/oauth/cache_approvals") @ResponseStatus(HttpStatus.NO_CONTENT) public void startCaching() throws Exception { userApprovalHandler.setUseApprovalStore(true); }
From source file:com.seabee.snapdragon.controller.StaticPageController.java
@RequestMapping(value = "/{staticPageId}", method = RequestMethod.PUT) @ResponseStatus(HttpStatus.NO_CONTENT) public void editStaticPage(@Valid @RequestBody StaticPage page, @PathVariable("staticPageId") int id) { // take a static page object, and replace it? // Yes.//from w w w. jav a 2 s . com page.setSpId(id); dao.updateStaticPage(page); }
From source file:edu.mum.waa.webstore.controller.CartRestController.java
@RequestMapping(value = "/add/{productId}", method = RequestMethod.PUT) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void addIItem(@PathVariable String productId, HttpServletRequest request) { String sessionId = request.getSession(true).getId(); Cart cart = cartService.read(sessionId); if (cart == null) { cart = cartService.create(new Cart(sessionId)); }//w ww .ja va 2 s . c o m Product product = productService.getProductById(productId); if (product == null) { throw new IllegalArgumentException(String.format("Product with id (%) not found", productId)); } cart.addCartItem(new CartItem(product)); cartService.update(sessionId, cart); }
From source file:org.zols.templates.web.TemplateRepositoryController.java
@RequestMapping(value = "/{name}", method = PUT) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void update(@PathVariable(value = "name") String name, @RequestBody TemplateRepository templateRepository) throws DataStoreException { if (name.equals(templateRepository.getName())) { LOGGER.info("Updating templateRepositories with id {} with {}", name, templateRepository); templateRepositoryService.update(templateRepository); }/* w ww . j av a 2s .co m*/ }
From source file:org.openbaton.nfvo.api.RestVNFFG.java
/** * Removes the VNF software VNFFG from the VNFFG repository * * @param id : The VNFFG's id to be deleted *//*www . ja va 2s . c o m*/ @RequestMapping(value = "{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(@PathVariable("id") String id) { vnffgManagement.delete(id); }
From source file:com.swcguild.dvdlibraryarch.controller.HomeController.java
@RequestMapping(value = "/dvd/{id}", method = RequestMethod.PUT) @ResponseStatus(HttpStatus.NO_CONTENT) 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.// ww w.j a va 2 s .co m dvd.setDvdId(id); // update the dvd dao.updateDvd(dvd); }
From source file:hello.TodoController.java
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = "application/json") @ResponseStatus(HttpStatus.NO_CONTENT) @Transactional// www .jav a2s . c o m public void update(@RequestBody Todo updatedTodo, @PathVariable("id") long id) throws IOException { if (id != updatedTodo.getId()) { repository.delete(id); } repository.save(updatedTodo); }