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:com.expedia.seiso.web.controller.v1.ServiceInstancePortControllerV1.java
@RequestMapping(value = SINGLE_URI_TEMPLATE, method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(@PathVariable String serviceInstanceKey, @PathVariable Integer number) { val itemKey = new ServiceInstancePortKey(serviceInstanceKey, number); basicItemDelegate.delete(itemKey);// w w w . j ava 2 s .c o m }
From source file:com.baidu.terminator.manager.action.StubAction.java
@RequestMapping(value = "/{linkId}/{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void listStubData(@PathVariable int linkId, @PathVariable int id) { stubService.deleteStubData(linkId, id); }
From source file:org.openbaton.nfvo.api.RestProject.java
@RequestMapping(value = "/multipledelete", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.NO_CONTENT) public void multipleDelete(@RequestBody @Valid List<String> ids) throws NotAllowedException, NotFoundException, EntityInUseException { for (String id : ids) { log.debug("removing Project with id " + id); projectManagement.delete(projectManagement.query(id)); }/* w w w . ja v a 2 s.com*/ }
From source file:org.nubomedia.marketplace.api.RestApplication.java
/** * Deletes an Application from the marketplace * * @param id// ww w. j a va 2s . c om */ @RequestMapping(value = "{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(@PathVariable("id") String id) throws NotFoundException { log.trace("Incoming request for deleting Application: " + id); applicationManagement.delete(id); log.trace("Incoming request served by deleting Application: " + id); }
From source file:hello.TodoController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(@PathVariable("id") long id) { repository.delete(id);/* ww w . j av a2 s.c o m*/ }
From source file:org.energyos.espi.datacustodian.oauth.OauthAdminController.java
@RequestMapping("custodian/oauth/uncache_approvals") @ResponseStatus(HttpStatus.NO_CONTENT) public void stopCaching() throws Exception { userApprovalHandler.setUseApprovalStore(false); }
From source file:com.tsguild.upsproject.controller.HomeController.java
@ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/plane/{planeId}", method = RequestMethod.DELETE) public void removePlane(@PathVariable("planeId") String planeId) { dao.removePlane(planeId);/*from www.j a v a 2 s . co m*/ }
From source file:com.companyname.controller.OAuth2AdminController.java
@RequestMapping(value = "/oauth/users/{user}/tokens/{token}", method = RequestMethod.DELETE) public ResponseEntity<Void> revokeToken(@PathVariable String user, @PathVariable String token, Principal principal) throws Exception { checkResourceOwner(user, principal); if (tokenServices.revokeToken(token)) { return new ResponseEntity<Void>(HttpStatus.NO_CONTENT); } else {//from ww w . j a v a 2 s . com return new ResponseEntity<Void>(HttpStatus.NOT_FOUND); } }
From source file:com.carlomicieli.jtrains.infrastructure.web.ResponsesTests.java
@Test public void shouldCreateResponsesForNoContent() { ResponseEntity<Void> resp = Responses.noContent(); assertThat(resp).isNotNull();// w w w .j a v a2 s .c o m assertThat(resp.getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT); }
From source file:net.eusashead.hateoas.response.impl.HeadResponseBuilderImplTest.java
@Test public void testAllHeaders() throws Exception { Entity entity = new Entity("foo"); Date now = new Date(1373571924000l); ResponseEntity<Entity> response = builder.entity(entity).etag().lastModified(now).expireIn(1000l).build(); Assert.assertNotNull(response);/* w w w . j a v a2 s . c o m*/ Assert.assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode()); Assert.assertNull(response.getBody()); Assert.assertNotNull(response.getHeaders().getETag()); Assert.assertEquals("W/\"b0c689597eb9dd62c0a1fb90a7c5c5a5\"", response.getHeaders().getETag()); Assert.assertEquals(now.getTime(), response.getHeaders().getLastModified()); Assert.assertNotNull(response.getHeaders().getCacheControl()); Assert.assertEquals("public, must-revalidate, proxy-revalidate, max-age=1", response.getHeaders().getCacheControl()); Assert.assertNotEquals(-1l, response.getHeaders().getDate()); Assert.assertEquals(response.getHeaders().getDate() + 1000l, response.getHeaders().getExpires()); }