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.amalto.core.storage.task.staging.StagingTaskService.java
@GET @Path("/") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) @ApiOperation(value = "Provides staging area statistics for the user's current container and model", response = StagingContainerSummary.class) public StagingContainerSummary getContainerSummary(@Context final HttpServletResponse response) { StagingContainerSummary result = delegate.getContainerSummary(); if (result == null) { response.setStatus(HttpStatus.NO_CONTENT.value()); return null; }//from w w w. j ava 2s .c o m return result; }
From source file:nl.surfnet.coin.api.ConfigurableApiController.java
@RequestMapping(value = { "/person/{userId:.+}/{groupId:.+}" }, method = RequestMethod.POST) @ResponseStatus(HttpStatus.NO_CONTENT) @ResponseBody/*from w w w .j a v a 2s . com*/ public void addPersonToGroup(@PathVariable("userId") String personId, @PathVariable("groupId") String groupId) { LOG.info("Request to add Person {} to Group {}", new Object[] { personId, groupId }); configurableGroupProvider.addPersonToGroup(personId, groupId); }
From source file:org.zols.templates.web.PageController.java
@RequestMapping(value = "/{name}", method = DELETE) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void delete(@PathVariable(value = "name") String name) throws DataStoreException { LOGGER.info("Deleting page with id {}", name); pageService.delete(name);//from w w w.j a v a2s. c o m }
From source file:com.alexshabanov.springrestapi.support.ProfileController.java
@RequestMapping(value = CONCRETE_PROFILE_RESOURCE, method = RequestMethod.DELETE) @ResponseBody/*ww w .j a va2 s . co m*/ @ResponseStatus(HttpStatus.NO_CONTENT) public void deleteProfile(@PathVariable("id") long id) { throw new AssertionError(); // should be mocked }
From source file:com.xpanxion.userprojecthibernate.controllers.RESTController.java
@RequestMapping(value = "user/{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void deleteUser(@PathVariable("id") int id) { userService.deleteUser(id);//w ww.j a v a2s .c o m }
From source file:org.zols.links.web.LinkGroupController.java
@RequestMapping(value = "/{name}", method = DELETE) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void delete(@PathVariable(value = "name") String name) throws DataStoreException { LOGGER.info("Deleting categories with id {}", name); linkGroupService.delete(name);//from w ww . jav a 2 s .c o m }
From source file:com.expedia.seiso.web.controller.v1.NodeIpAddressControllerV1.java
@RequestMapping(value = NODE_IP_ADDRESS_URI_TEMPLATE, method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.NO_CONTENT) public void put(@PathVariable String nodeName, @PathVariable String ipAddress, PEResource nipResource) { val node = nodeRepo.findByName(nodeName); val serviceInstance = node.getServiceInstance(); // Enrich the node IP address so we can save it. [WLW] val nipData = (NodeIpAddress) nipResource.getItem(); nipData.setNode(node);// w w w .j a v a 2s . c o m nipData.setIpAddress(ipAddress); nipData.getIpAddressRole().setServiceInstance(serviceInstance); basicItemDelegate.put(nipData, true); }
From source file:com.blstream.patronage.ctf.common.web.controller.RestController.java
/** * This method removes existing document based on id. * @param id/*from w ww. ja va 2 s . c o m*/ */ @RequestMapping(value = "{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) void delete(@PathVariable ID id);
From source file:pitayaa.nail.msg.core.license.controller.LicenseController.java
@RequestMapping(value = "licenses/{ID}", method = RequestMethod.DELETE) public @ResponseBody ResponseEntity<?> deleteLicense(@PathVariable("ID") UUID uid) throws Exception { // Find license Optional<License> optionalLicense = licenseService.findOne(uid); if (!optionalLicense.isPresent()) { return new ResponseEntity<>(HttpStatus.NOT_FOUND); }/*from w w w. jav a 2 s. c o m*/ // Delete license boolean isDelete = licenseService.deleteLicense(uid); // Get status HttpStatus status = (isDelete) ? HttpStatus.NO_CONTENT : HttpStatus.EXPECTATION_FAILED; // Return return new ResponseEntity<>(status); }
From source file:org.energyos.espi.datacustodian.oauth.OauthAdminController.java
@RequestMapping("custodian/oauth/cache_approvals") @ResponseStatus(HttpStatus.NO_CONTENT) public void startCaching() throws Exception { userApprovalHandler.setUseApprovalStore(true); }