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:com.swcguild.dvdlibrarymvc.controller.HomeController.java

@RequestMapping(value = "/dvd/{id}", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void addDvdNote(@PathVariable("id") int id, @RequestBody String note) {

    dao.addUserNote(id, note);/* ww  w . j  a  v a 2 s .  co  m*/
}

From source file:com.sg.addressbookmvc.HomeController.java

@RequestMapping(value = "/address/{id}", method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void putAddress(@PathVariable("id") int id, @RequestBody Address address) {
    address.setAddressId(id);/*from ww  w.  j  a  va  2  s.c o m*/
    dao.updateAddress(address);
}

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

@RequestMapping(value = "/api/templates/{name}", method = PUT)
@ApiIgnore/*from  ww w.j  a  v  a2  s  .  c om*/
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void update(@PathVariable(value = "name") String name, @RequestBody Template template) {
    LOGGER.info("Updating templates with id {} with {}", name, template);
    if (name.equals(template.getName())) {
        templateManager.update(template);
    }
}

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

@RequestMapping(value = "/api/languages/{name}", method = PUT)
@ApiIgnore//w w w .  j  a  v a 2s .c o m
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void update(@PathVariable(value = "name") String name, @RequestBody Language language) {
    LOGGER.info("Updating language with id {} with {}", name, language);
    if (name.equals(language.getName())) {
        languagesManager.update(language);
    }
}

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

@RequestMapping(value = "/{name}", method = PUT)
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void update(@PathVariable(value = "name") String name, @RequestBody Link link)
        throws DataStoreException {
    if (name.equals(link.getName())) {
        LOGGER.info("Updating links with id {} with {}", name, link);
        linkService.update(link);// w w w  .j a v  a  2  s  . co m
    }
}

From source file:org.zols.datastore.web.SchemaControler.java

@RequestMapping(value = "/{id}", method = PUT)
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void update(@PathVariable(value = "id") String id, @RequestBody String jsonSchema)
        throws DataStoreException {

    LOGGER.info("Updating jsonSchemas with id {} with {}", id, jsonSchema);
    schemaService.update(jsonSchema);/*from  ww  w .  j a v a 2  s .co m*/

}

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

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

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

@RequestMapping(value = "/{name}", method = PUT)
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void update(@PathVariable(value = "name") String name, @RequestBody LinkGroup group)
        throws DataStoreException {
    if (name.equals(group.getName())) {
        LOGGER.info("Updating categories with id {} with {}", name, group);
        linkGroupService.update(group);/*  w w w  .  j  a  v a  2 s .com*/
    }
}

From source file:nl.surfnet.mujina.controllers.CommonAPI.java

@RequestMapping(value = { "/entityid" }, method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
@ResponseBody//from   w  w w  . jav a 2  s .  com
public void setEntityID(@RequestBody EntityID entityID) {
    log.debug("Request to set entityID {}", entityID.getValue());
    configuration.setEntityID(entityID.getValue());
}

From source file:net.eusashead.hateoas.conditional.interceptor.SyncTestController.java

@RequestMapping(method = RequestMethod.DELETE)
public ResponseEntity<Void> delete() {
    return new ResponseEntity<Void>(HttpStatus.NO_CONTENT);
}