List of usage examples for org.springframework.http HttpStatus ACCEPTED
HttpStatus ACCEPTED
To view the source code for org.springframework.http HttpStatus ACCEPTED.
Click Source Link
From source file:edu.eci.cosw.restcontrollers.RestControladorRegistrarReserva.java
@RequestMapping(value = "/pagoalquiler", method = RequestMethod.POST) public ResponseEntity<?> pagarAlquiler(@RequestBody Pago p) { HttpStatus status = HttpStatus.NOT_MODIFIED; String message = ""; //logica.realizarPago(p.getIdAlquiler(), p.getMonto(), p.getNumtarjeta(), p.getTipoP()); if (logica.realizarPago(p.getIdAlquiler(), p.getMonto(), p.getNumtarjeta(), p.getTipoP())) { status = HttpStatus.ACCEPTED; message = "Solicitud de pago aceptada"; } else {/*from w ww .j a v a 2s . com*/ status = HttpStatus.CONFLICT; message = "Solicitud de pago rechazada, error de tarjeta o insuficiencia de pago"; } return new ResponseEntity<>(message, status); }
From source file:org.openbaton.nfvo.api.RestProject.java
/** * Updates the Project/*from ww w .ja v a 2 s .c o m*/ * * @param new_project : The Project to be updated * @return Project The Project updated */ @RequestMapping(value = "{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.ACCEPTED) public Project update(@RequestBody @Valid Project new_project) { return projectManagement.update(new_project); }
From source file:org.createnet.raptor.auth.service.controller.DevicePermissionController.java
@RequestMapping(value = "/{deviceUuid}/permission/{userUuid}", method = RequestMethod.GET) @ApiOperation(value = "List user permissions on a device", notes = "", response = String.class, responseContainer = "List", nickname = "getUserPermissions") public ResponseEntity<?> listPermissions(@PathVariable("deviceUuid") String deviceUuid, @PathVariable("userUuid") String userUuid) { Device device = deviceService.getByUuid(deviceUuid); if (device == null) { return ResponseEntity.status(HttpStatus.NOT_FOUND).body("Device not found"); }/*from w ww . ja va2s . c om*/ User user = userService.getByUuid(userUuid); if (user == null) { return ResponseEntity.status(HttpStatus.NOT_FOUND).body("User not found"); } List<String> permissions = RaptorPermission.toLabel(aclDeviceService.list(device, user)); return ResponseEntity.status(HttpStatus.ACCEPTED).body(permissions); }
From source file:org.openbaton.nfvo.api.RestConfiguration.java
/** * Updates the Configuration/*from ww w. j av a2s . co m*/ * * @param new_configuration : The Configuration to be updated * @param id : The id of the Configuration * @return Configuration The Configuration updated */ @RequestMapping(value = "{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.ACCEPTED) public Configuration update(@RequestBody @Valid Configuration new_configuration, @PathVariable("id") String id, @RequestHeader(value = "project-id", required = false) String projectId) { log.trace("updating Configuration with id " + id + " with values: " + new_configuration); log.debug("updating Configuration with id " + id); return configurationManagement.update(new_configuration, id, projectId); }
From source file:technology.tikal.accounts.service.imp.MyAccountImp.java
@Override @RequestMapping(value = "/otp", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.ACCEPTED) public void deleteOTP() { String user = SecurityContextHolder.getContext().getAuthentication().getName(); accountsController.deleteOTP(user);//from www .java2s . co m }
From source file:technology.tikal.accounts.service.imp.AccountsImp.java
@Override @RequestMapping(value = "/{user}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.ACCEPTED) public void deleteAccount(@PathVariable final String user, final HttpServletResponse response) { accountsController.deleteAccount(user); }
From source file:com.swcguild.blacksmithblogcapstone.controller.BlackSmithController.java
@RequestMapping(value = "blogEntry/delete/{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.ACCEPTED) public void removeBlogEntry(@PathVariable("id") int id) { List<Comment> commentsToDelete = dao.getCommentsByBlogId(id); for (Comment c : commentsToDelete) { dao.removeComment(c.getId());// w w w . j a v a2 s . c om } dao.removeBlogEntry(id); }
From source file:technology.tikal.ventas.service.pedido.PedidoRaizService.java
@RequestMapping(value = "/{pedidoId}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.ACCEPTED) public void borrar(@PathVariable final Long pedidoId) { pedidoRaizController.borrar(pedidoId); }
From source file:technology.tikal.ventas.service.catalogo.CatalogoService.java
@RequestMapping(value = "/{idCatalogo}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.ACCEPTED) public void delete(@PathVariable final Long idCatalogo) { catalogoController.borrar(idCatalogo); }
From source file:info.raack.appliancedetection.evaluation.web.SimulationController.java
@RequestMapping(value = "/simulations", method = RequestMethod.POST) @ResponseStatus(HttpStatus.ACCEPTED) public void createSimulation(@RequestParam("duration") long durationInSeconds, @RequestParam("onOffLabelsPerAppliance") int onOffLabelsPerAppliance, @RequestParam("onConcurrency") int onConcurrency, @RequestParam("numAppliances") int numAppliances) { simulationService.startNewSimulation(durationInSeconds, onOffLabelsPerAppliance, onConcurrency, numAppliances, null);/*from ww w .j a v a 2s .c o m*/ }