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:com.tribuo.backend.controllers.CategoriasController.java
/** * * @return/*from w w w . ja v a 2 s . c o m*/ */ @RequestMapping(value = "/all", method = RequestMethod.GET) @ResponseBody public ResponseEntity<List<Categorias>> getCategorias() { List<Categorias> u = se.getCategorias(); return new ResponseEntity<>(u, HttpStatus.OK); }
From source file:com.xinferin.controller.ProductController.java
@RequestMapping(value = "/{productId}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.OK) public void deleteProduct(@PathVariable int productId) { daoProduct.delete(productId);/* w w w . j a v a 2s.c om*/ }
From source file:de.olivergierke.spring4.web.OrderController.java
@RequestMapping("/orders/{id}") ResponseEntity<OrderResourceModel> showOrder(@PathVariable Long id) { // /customers/6 URI uri = fromMethodCall(controller(CustomerController.class).customers(6L)).build().toUri(); // URI uri = fromMethodCall(controller(CustomerController.class).customers(6L)).build().toUri(); return new ResponseEntity<>(new OrderResourceModel(LocalDateTime.now(), uri), HttpStatus.OK); }
From source file:com.tribuo.backend.controllers.SucursalesController.java
/** * * @return/*from w w w .j av a 2 s.c o m*/ */ @RequestMapping(value = "/all", method = RequestMethod.GET) @ResponseBody public ResponseEntity<List<Sucursales>> getSucursales() { List<Sucursales> u = se.getSucursales(); return new ResponseEntity<>(u, HttpStatus.OK); }
From source file:com.biz.report.controller.RepReportController.java
@RequestMapping(value = "/reps") private ResponseEntity<List<String>> readReps() { List<String> list = repReportService.readReps(); HttpHeaders headers = new HttpHeaders(); headers.add("success", "Success"); return new ResponseEntity<List<String>>(list, headers, HttpStatus.OK); }
From source file:org.trustedanalytics.metricsprovider.integrationtests.utils.TestListenableFuture.java
@Override public void addCallback(ListenableFutureCallback<? super ResponseEntity<T>> listenableFutureCallback) { listenableFutureCallback.onSuccess(new ResponseEntity<>(objectToReturn, HttpStatus.OK)); }
From source file:com.gopivotal.cla.github.RateLimitingClientHttpRequestInterceptorTest.java
@Test public void noBlock() throws IOException { MockClientHttpRequest request = new MockClientHttpRequest(); MockClientHttpResponse response = new MockClientHttpResponse(new byte[0], HttpStatus.OK); ClientHttpRequestExecution execution = mock(ClientHttpRequestExecution.class); when(execution.execute(request, new byte[0])).thenReturn(response); this.interceptor.intercept(request, new byte[0], execution); }
From source file:cr.ac.siua.tec.controllers.FormController.java
/** * In charge of receiving web requests (forms) and validating them. *///from w ww . j a va2 s. com @CrossOrigin(origins = "http://tec.siua.ac.cr") @RequestMapping(value = "/request", method = RequestMethod.POST) public ResponseEntity<HashMap<String, String>> createTicket(@RequestBody HashMap<String, String> map) { HashMap<String, String> responseMap; // Verifies recaptcha response with GoogleService. if (!recaptchaService.isResponseValid("", map.get("g-recaptcha-response"))) { responseMap = (HashMap<String, String>) NotificationManager.getInvalidCaptchaMsg(); } else { responseMap = getRequestResponseMap(map); } return new ResponseEntity<>(responseMap, HttpStatus.OK); }
From source file:org.jtwig.acceptance.functions.RenderTest.java
@RequestMapping("/test") public ResponseEntity<String> test() { return new ResponseEntity<>("k", HttpStatus.OK); }
From source file:edu.sjsu.cmpe275.project.controller.RoomController.java
/** Get all rooms * @return List<Room></Room> *///from w ww. j a v a2s . c o m @RequestMapping(value = "", method = RequestMethod.GET) public ResponseEntity<?> createRoom() { List<Room> rooms = roomDao.getAllRoom(); if (rooms == null) { return new ResponseEntity<Object>(HttpStatus.NOT_FOUND); } else { return new ResponseEntity<Object>(rooms, HttpStatus.OK); } }