List of usage examples for org.springframework.http HttpStatus OK
HttpStatus OK
To view the source code for org.springframework.http HttpStatus OK.
Click Source Link
From source file:net.orpiske.tcs.service.rest.controller.DomainQueriesController.java
@RequestMapping(method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) @ResponseBody/*from www. j ava 2s . c o m*/ public DomainList requestCspList() { if (logger.isDebugEnabled()) { logger.debug("CSP query controller handling a create CSP request"); } DomainListEvent domainListEvent = tagCloudService.requestDomainList(new RequestDomainListEvent()); return domainListEvent.getDomainList(); }
From source file:gt.dakaik.rest.impl.DocumentTypeImpl.java
@Override public ResponseEntity<DocumentType> findById(int idUsuario, String token, Long id) throws EntidadNoEncontradaException { DocumentType p = repoDocumentType.findOne(id); if (p != null) { return new ResponseEntity(p, HttpStatus.OK); } else {/*ww w .ja v a 2 s . c o m*/ throw new EntidadNoEncontradaException("Entity User"); } }
From source file:net.eusashead.hateoas.hal.http.converter.module.impl.AnnotationAdapterController.java
@ResponseBody @RequestMapping(value = "/responseentity") public ResponseEntity<Bar> responseEntity() { return new ResponseEntity<Bar>(new Bar(), HttpStatus.OK); }
From source file:nu.yona.server.admin.rest.AdminController.java
@RequestMapping(value = "/requestUserOverwrite/", method = RequestMethod.POST) @ResponseStatus(HttpStatus.OK) public void setOverwriteUserConfirmationCode(@RequestParam String mobileNumber) { try {//w w w. ja va2 s.c o m userService.setOverwriteUserConfirmationCode(mobileNumber); } catch (UserServiceException e) { // prevent detecting whether a mobile number exists logger.error("Caught UserServiceException. Ignoring it", e); } }
From source file:com.boxedfolder.carrot.web.client.CrudResource.java
@JsonView(View.Client.class) @ResponseStatus(HttpStatus.OK) @RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public List<S> getAll() { return service.findAll(); }
From source file:edu.infsci2560.services.DvdsService.java
@RequestMapping(method = RequestMethod.GET, produces = "application/json") public ResponseEntity<Iterable<Dvd>> list() { HttpHeaders headers = new HttpHeaders(); return new ResponseEntity<>(repository.findAll(), headers, HttpStatus.OK); }
From source file:com.nitsoft.ecommerce.api.product.ProductAttributeAPI.java
@ApiOperation(value = "getProductAttribute") @RequestMapping(value = APIName.PRODUCT_ATTRIBUTES, method = RequestMethod.GET, produces = APIName.CHARSET) public String getProductAttribute() { List<ProductAttribute> productattribute = (List<ProductAttribute>) productAttributeService.findAll(); return writeObjectToJson(new StatusResponse<>(HttpStatus.OK.value(), productattribute)); }
From source file:edu.infsci2560.services.BookService.java
@RequestMapping(method = RequestMethod.GET, produces = "application/json") public ResponseEntity<Iterable<Book>> list() { HttpHeaders headers = new HttpHeaders(); return new ResponseEntity<>(repository.findAll(), headers, HttpStatus.OK); }
From source file:gt.dakaik.rest.impl.CityImpl.java
@Override public ResponseEntity<City> findAll(int idUsuario, String token) throws EntidadNoEncontradaException { return new ResponseEntity(repoCity.findAll(), HttpStatus.OK); }
From source file:org.camunda.bpm.spring.boot.starter.webapp.WebappEeTest.java
@Test public void testAdminEndpointAvailable() throws Exception { final ResponseEntity<String> response = testRestTemplate .getForEntity("http://localhost:" + this.port + "/app/admin", String.class); assertEquals(HttpStatus.OK, response.getStatusCode()); }