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:su90.mybatisdemo.web.endpoints.EmployeesEndpoints.java
@RequestMapping(value = "/getall", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_UTF8_VALUE }) public ResponseEntity<List<EmployeeOut>> getAll() { List<EmployeeOut> result = employeesService.getWebBeans(); if (result.isEmpty()) { return new ResponseEntity<>(result, HttpStatus.NO_CONTENT); }/*from w ww . j a va 2 s . co m*/ return new ResponseEntity<>(result, HttpStatus.OK); }
From source file:com.mum.controller.CardRestController.java
@RequestMapping(value = "/{cardId}", method = RequestMethod.DELETE) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void delete(@PathVariable(value = "cardId") String cardId) { System.out.println("Delete"); cardServiceImpl.delete(cardId);//from ww w . j av a 2 s. com }
From source file:nl.surfnet.mujina.controllers.ServiceProviderAPI.java
@RequestMapping(value = { "/protocolBinding" }, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.NO_CONTENT) @ResponseBody/*from w w w. j a v a 2 s.c om*/ public void setProtocolBinding(@RequestBody ProtocolBinding protocolBinding) { log.debug("Request to set protocolBinding to {}", protocolBinding.getValue()); configuration.setProtocolBinding(protocolBinding.getValue()); }
From source file:org.zols.datastore.web.controller.TemplateRepositoryController.java
@RequestMapping(value = "/api/templateRepositories/{name}", method = PUT) @ApiIgnore/*from w w w . j a va 2 s .c o m*/ @ResponseStatus(value = HttpStatus.NO_CONTENT) public void update(@PathVariable(value = "name") String name, @RequestBody TemplateRepository templateRepository) { LOGGER.info("Updating templateRepositories with id {} with {}", name, templateRepository); if (name.equals(templateRepository.getName())) { templateRepositoryManager.update(templateRepository); } }
From source file:com.baidu.terminator.manager.action.LinkControlAction.java
@RequestMapping(value = "/stop/{linkId}", method = RequestMethod.PUT) @ResponseStatus(HttpStatus.NO_CONTENT) public void stopServer(@PathVariable Integer linkId) { linkControlService.stopServer(linkId); }
From source file:org.zols.documents.web.DocumentRepositoryController.java
@RequestMapping(value = "/{name}", method = PUT) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void update(@PathVariable(value = "name") String name, @RequestBody DocumentRepository documentRepository) throws DataStoreException { if (name.equals(documentRepository.getName())) { LOGGER.info("Updating documentRepositories with id {} with {}", name, documentRepository); documentRepositoryService.update(documentRepository); }/*from ww w . j a v a 2 s . c om*/ }
From source file:org.openbaton.nfvo.api.RestKeys.java
/** * Adds a new Key/* www. j a va2 s .c o m*/ * * @param key */ @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.NO_CONTENT) public void importKey(@RequestHeader(value = "project-id") String projectId, @RequestBody @Valid Key key) { keyManagement.addKey(projectId, key.getName(), key.getPublicKey()); }
From source file:com.swcguild.dvdlibrarymvc.controller.HomeController.java
@RequestMapping(value = "/dvd/{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void deleteDvd(@PathVariable("id") int id) { dao.removeDVD(id);//from w w w.j a v a 2 s . c o m }
From source file:com.expedia.seiso.web.controller.v1.IpAddressRoleControllerV1.java
@RequestMapping(value = SINGLE_URI_TEMPLATE, method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.NO_CONTENT) public void put(@PathVariable String serviceInstanceKey, @PathVariable String name, PEResource ipAddressRoleResource) { basicItemDelegate.put(ipAddressRoleResource.getItem(), true); }
From source file:com.netflix.spinnaker.igor.admin.AdminController.java
/** * Silently fast-forwards a poller. Fast-forwarding means that all pending cache state will be polled and saved, * but will not send Echo notifications. * * By default all partitions (ex: masters) will be fast-forwarded, however specific partition names should be * used whenever possible.// w w w . ja v a2s. co m * * @param monitorName The polling monitor name (ex: "DockerMonitor") * @param partition The partition name, if not provided, method will re-index the entire monitor */ @RequestMapping(value = "/pollers/fastforward/{monitorName}", method = RequestMethod.POST) @ResponseStatus(HttpStatus.NO_CONTENT) public void fastForward(@PathVariable String monitorName, @RequestParam(required = false) String partition) { CommonPollingMonitor pollingMonitor = pollingMonitors.stream() .filter(it -> it.getName().equals(monitorName)).findFirst() .orElseThrow(() -> new NotFoundException(format("PollingMonitor %s, available: %s", monitorName, pollingMonitors.stream().map(PollingMonitor::getName).collect(Collectors.toList())))); log.warn("Re-indexing {}:{}", monitorName, (partition == null) ? "ALL" : partition); if (partition == null) { pollingMonitor.poll(false); } else { pollingMonitor.pollSingle(pollingMonitor.getPollContext(partition).fastForward()); } }