Example usage for org.springframework.http HttpStatus NO_CONTENT

List of usage examples for org.springframework.http HttpStatus NO_CONTENT

Introduction

In this page you can find the example usage for org.springframework.http HttpStatus NO_CONTENT.

Prototype

HttpStatus NO_CONTENT

To view the source code for org.springframework.http HttpStatus NO_CONTENT.

Click Source Link

Document

204 No Content .

Usage

From source file:edu.mum.waa.webstore.controller.CartRestController.java

@RequestMapping(value = "/{cartId}", method = RequestMethod.DELETE)
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void delete(@PathVariable(value = "cartId") String cartId) {
    cartService.delete(cartId);/*from   w  w w. ja  v  a  2  s.  c o  m*/
}

From source file:org.zols.templates.web.PageController.java

@RequestMapping(value = "/{name}", method = PUT)
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void update(@PathVariable(value = "name") String name, @RequestBody Page page)
        throws DataStoreException {
    if (name.equals(page.getName())) {
        LOGGER.info("Updating page with id {} with {}", name, page);
        pageService.update(page);//from   w ww  .ja  va  2s .  c  o m
    }
}

From source file:org.zols.templates.web.TemplateControler.java

@RequestMapping(value = "/{name}", method = PUT)
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void update(@PathVariable(value = "name") String name, @RequestBody Template template)
        throws DataStoreException {
    if (name.equals(template.getName())) {
        LOGGER.info("Updating templates with id {} with {}", name, template);
        templateService.update(template);
    }//from w  w w.ja  va 2  s  .  c  o  m
}

From source file:com.thesoftwareguild.dvdlibrary.controller.HomeController.java

@RequestMapping(value = "/dvd/{id}", method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void putDvd(@PathVariable("id") int id, @Valid @RequestBody Dvd dvd) {
    dvd.setDvdId(id);/*from   w  w w .  j  ava  2  s.  c  om*/
    dao.updateDvd(dvd);
}

From source file:com.swcguild.capstoneproject.controller.AdminController.java

@RequestMapping(value = "/post/{id}", method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void putPost(@PathVariable("id") int id, @Valid @RequestBody Post post) {

    post.setPostID(id);/*from w w  w  .  j  a v a2 s  .c o m*/
    dao.updatePost(post);

}

From source file:org.zols.links.web.CategoryController.java

@RequestMapping(value = "/{name}", method = PUT)
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void update(@PathVariable(value = "name") String name, @RequestBody Category category)
        throws DataStoreException {
    if (name.equals(category.getName())) {
        LOGGER.info("Updating categories with id {} with {}", name, category);
        categoryService.update(category);
    }// w ww  .  jav  a 2s . c o  m
}

From source file:com.swcguild.capstoneproject.controller.PinnedPostController.java

@RequestMapping(value = "/pinpost/{id}", method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void putPost(@PathVariable("id") int id, @Valid @RequestBody PinPost pinPost) {

    pinPost.setPinPostID(id);/*  w w  w  .  j  a v  a 2 s .c om*/
    dao.updatePinPost(pinPost);

}

From source file:de.sainth.recipe.backend.rest.controller.BasicUnitController.java

@Secured("ROLE_ADMIN")
@RequestMapping(value = "{shortname}", method = RequestMethod.DELETE)
@ResponseStatus(HttpStatus.NO_CONTENT)
void delete(@PathVariable("shortname") String shortname) {
    repository.delete(shortname);//w ww.  ja va 2s  .  c o m
}

From source file:com.baidu.terminator.manager.action.LinkControlAction.java

@RequestMapping(value = "/start/{linkId}", method = RequestMethod.PUT)
@ResponseBody/* w  w  w .j a v a  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.tsguild.pumpingunitdb.controller.HomeController.java

@RequestMapping(value = "/unit/{id}", method = RequestMethod.DELETE)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void deleteUnit(@PathVariable("id") int id) {
    // remove the Contact associated with the given id from the data layer
    dao.removeUnit(id);/*from  w w  w .  j a v a 2 s .c o  m*/
}