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:org.openbaton.nfvo.api.RestConfiguration.java

/**
 * Removes the Configuration from the Configurations repository
 *
 * @param id : the id of configuration to be removed
 *//* w  w w.j  a v  a2s.  c  o  m*/
@RequestMapping(value = "{id}", method = RequestMethod.DELETE)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void delete(@PathVariable("id") String id,
        @RequestHeader(value = "project-id", required = false) String projectId) {
    log.debug("removing Configuration with id " + id);
    configurationManagement.delete(id);
}

From source file:com.bennavetta.appsite.webapi.AuthController.java

@RequestMapping(value = "/rule", method = POST)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void createRule(AccessRule rule) // let Jackson handle it
{
    ofy().save().entity(rule).now();/*from w w w  . j  a va  2  s .c  o m*/
}

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

@RequestMapping(value = "/{name}", method = DELETE)
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void delete(@PathVariable(value = "name") String name) throws DataStoreException {
    LOGGER.info("Deleting links with id {}", name);
    linkService.delete(name);/*from  ww w  . j a v  a  2  s  .c  o  m*/
}

From source file:com.seabee.snapdragon.controller.BlogController.java

@RequestMapping(value = "/{entryId}", method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void editBlogEntry(@Valid @RequestBody BlogEntry entry, @PathVariable("entryId") int id) {
    entry.setEntryId(id);/*from   w ww .  jav a  2  s .com*/
    dao.updateBlogEntry(entry);
}

From source file:com.parivero.swagger.demo.controller.PaisController.java

@RequestMapping(method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void modificacion(@RequestBody Pais pais) {
    if (pais.getId() == null) {
        throw new IllegalArgumentException();
    }/*from   w w  w  .  j a  v  a  2 s  . c om*/

    if (pais.getId() == 0) {
        throw new NotFoundException();

    }

}

From source file:com.redblackit.web.controller.AdminRestController.java

/**
 * Handle about head request (designed for robots)
 * /*from   ww  w  .j a  va 2  s .  com*/
 * @return object
 */
@RequestMapping(value = "/version", method = RequestMethod.HEAD)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void getVersionHead() {
    // That's it folks
}

From source file:com.swcguild.dvdlibrarymvc.controller.HomeController.java

@RequestMapping(value = "/dvd/{id}", method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void editDvd(@Valid @RequestBody Dvd dvd, @PathVariable("id") int id) {
    dvd.setDvdId(id);//from w  ww. j  a  v  a  2 s  .  co  m
    dao.updateDVD(dvd);
}

From source file:org.zols.datastore.web.controller.TemplateController.java

@RequestMapping(value = "/api/templates/{name}", method = DELETE)
@ApiIgnore/*from  w  w w  .  j  av a 2s  .c om*/
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void delete(@PathVariable(value = "name") String name) {
    LOGGER.info("Deleting template with id {}", name);
    templateManager.deleteTemplate(name);
}

From source file:org.zols.datastore.web.controller.LanguageController.java

@RequestMapping(value = "/api/languages/{name}", method = DELETE)
@ApiIgnore//from  w  w w. j av a 2 s  .  c om
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void delete(@PathVariable(value = "name") String name) {
    LOGGER.info("Deleting language with id {}", name);
    languagesManager.delete(name);
}

From source file:com.swcguild.addressbookarch.controller.HomeController.java

@RequestMapping(value = "/address/{id}", method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void putAddress(@PathVariable("id") int id, @RequestBody Address address) {
    // set the value of the PathVariable id on the incoming Address object
    // to ensure that a) the address id is set on the object and b) that
    // the value of the PathVariable id and the Address object id are the
    // same./* w w w.  j  a  v  a 2s.  c o m*/
    address.setAddressId(id);
    // update the address
    dao.updateAddress(address);
}