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:de.thm.arsnova.controller.SocketController.java
@RequestMapping(method = RequestMethod.POST, value = "/assign") public void authorize(@RequestBody final Map<String, String> sessionMap, final HttpServletResponse response) { String socketid = sessionMap.get("session"); if (null == socketid) { LOGGER.debug("Expected property 'session' missing", socketid); response.setStatus(HttpStatus.BAD_REQUEST.value()); return;//from ww w . j a va2 s .c om } User u = userService.getCurrentUser(); if (null == u) { LOGGER.debug("Client {} requested to assign Websocket session but has not authenticated", socketid); response.setStatus(HttpStatus.FORBIDDEN.value()); return; } userService.putUser2SocketId(UUID.fromString(socketid), u); userSessionService.setSocketId(UUID.fromString(socketid)); response.setStatus(HttpStatus.NO_CONTENT.value()); }
From source file:org.zols.templates.web.TemplateRepositoryController.java
@RequestMapping(value = "/{name}", method = DELETE) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void delete(@PathVariable(value = "name") String name) throws DataStoreException { LOGGER.info("Deleting templateRepositories with id {}", name); templateRepositoryService.delete(name); }
From source file:com.thesoftwareguild.capstoneblog.controller.StaticPageController.java
@RequestMapping(value = "/page/{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void removePage(@PathVariable("id") int id) { dao.removePage(id);/*from w w w. j ava 2s . c o m*/ }
From source file:com.consol.citrus.samples.javaee.employee.EmployeeSmsGatewayTest.java
@Test @CitrusTest/* w w w . j av a 2 s.c o m*/ public void testPostWithWelcomeEmail(@CitrusResource TestDesigner citrus) { citrus.variable("employee.name", "Bernadette"); citrus.variable("employee.age", "24"); citrus.variable("employee.mobile", "4915199999999"); citrus.http().client(serviceUri).send().post().fork(true).contentType(MediaType.APPLICATION_FORM_URLENCODED) .payload("name=${employee.name}&age=${employee.age}&mobile=${employee.mobile}"); citrus.receive(smsGatewayServer).payload(new ClassPathResource("templates/send-sms-request.xml")); citrus.send(smsGatewayServer).payload(new ClassPathResource("templates/send-sms-response.xml")); citrus.http().client(serviceUri).receive().response(HttpStatus.NO_CONTENT); citrus.http().client(serviceUri).send().get().accept(MediaType.APPLICATION_XML); citrus.http().client(serviceUri).receive().response(HttpStatus.OK) .payload("<employees>" + "<employee>" + "<age>${employee.age}</age>" + "<name>${employee.name}</name>" + "<mobile>${employee.mobile}</mobile>" + "</employee>" + "</employees>"); citrusFramework.run(citrus.getTestCase()); }
From source file:com.parivero.swagger.demo.controller.PersonaController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @ApiOperation(value = "Borra una persona por su id") @ApiErrors(errors = { @ApiError(code = 404, reason = "Recurso no encontrado") }) @ResponseStatus(HttpStatus.NO_CONTENT) public void borrarPorId( @ApiParam(value = "id de persona a borrar", required = true) @PathVariable("id") Long id) { if (id == 0) { throw new NotFoundException(); }/*w w w.j a v a2s . c o m*/ }
From source file:org.openbaton.nfvo.api.RestUsers.java
/** * Removes the User from the Users repository * * @param id : the username of user to be removed *//*from ww w. j a v a2 s. c o m*/ @RequestMapping(value = "{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(@PathVariable("id") String id) throws NotAllowedException { if (userManagement != null) { log.info("removing User with id " + id); userManagement.delete(userManagement.queryById(id)); } }
From source file:nl.surfnet.coin.api.ConfigurableApiController.java
@RequestMapping(value = { "/reset" }, method = RequestMethod.POST) @ResponseStatus(HttpStatus.NO_CONTENT) public void reset() { LOG.info("Request to reset the state for Mock External Group Provider"); configurableGroupProvider.reset();// w w w.j ava 2 s . c om }
From source file:org.openbaton.nfvo.api.RestVNFPackage.java
/** * Removes the VNFPackage from the VNFPackages repository * * @param id : the id of configuration to be removed */// ww w. j av a2 s. c o m @RequestMapping(value = "{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(@PathVariable("id") String id, @RequestHeader(value = "project-id") String projectId) throws WrongAction { vnfPackageManagement.delete(id, projectId); }
From source file:nl.surfnet.mujina.controllers.IdentityProviderAPI.java
@RequestMapping(value = { "/attributes/{name:.+}" }, method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) @ResponseBody/*from w w w . j a v a2 s. co m*/ public void removeAttribute(@PathVariable String name) { log.debug("Request to remove attribute {}", name); configuration.getAttributes().remove(name); }
From source file:net.eusashead.hateoas.conditional.interceptor.AsyncTestController.java
@RequestMapping(method = RequestMethod.DELETE) public Callable<ResponseEntity<Void>> delete() { return new Callable<ResponseEntity<Void>>() { @Override//from w w w . j av a 2 s . com public ResponseEntity<Void> call() throws Exception { return new ResponseEntity<Void>(HttpStatus.NO_CONTENT); } }; }