List of usage examples for org.springframework.web.bind.annotation RequestMethod DELETE
RequestMethod DELETE
To view the source code for org.springframework.web.bind.annotation RequestMethod DELETE.
Click Source Link
From source file:com.ebay.logstorm.server.controllers.ClusterController.java
@RequestMapping(method = RequestMethod.DELETE) @Transactional/*from w w w. jav a 2s . c o m*/ public @ResponseBody ResponseEntity<RestResponse<Integer>> deleteClusterEntity( @RequestBody ClusterEntity clusterEntity) { return RestResponse.async(() -> entityService.deleteCluster(clusterEntity)).get(); }
From source file:net.eusashead.hateoas.response.argumentresolver.EntityController.java
@RequestMapping(method = RequestMethod.DELETE) public ResponseEntity<Void> delete(DeleteResponseBuilder builder) { return builder.build(); }
From source file:com.snv.calendar.CalendarController.java
/** * {@inheritDoc}//from w w w. j a v a 2s . c o m */ @RequestMapping(path = "/{calendarId}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @Override public Boolean delete(@PathVariable("calendarId") final Long calendarId) { return calendarService.delete(calendarId); }
From source file:com.springsource.oauthservice.develop.AppController.java
@RequestMapping(value = "/apps/{slug}", method = RequestMethod.DELETE) public String delete(@PathVariable String slug, Principal user) { appRepository.deleteApp(user.getName(), slug); return "redirect:/develop/apps"; }
From source file:cz.muni.fi.pa165.rest.controllers.RoomController.java
/** * Delete one product by id curl -i -X DELETE * http://localhost:8080/pa165/rest/room/{id} * * @param id identifier for product/*from w ww .j a v a 2 s . co m*/ * @throws ResourceNotFoundException */ @RequestMapping(value = "/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) public final void deleteRoom(@PathVariable("id") long id) throws Exception { try { roomFacade.deleteRoom(id); } catch (Exception ex) { throw new ResourceNotFoundException(); } }
From source file:am.ik.categolj2.api.accesslog.AccessLogReportRestController.java
@RequestMapping(method = RequestMethod.DELETE, params = "remoteAddress", headers = Categolj2Headers.X_ADMIN) public long deleteAccessLogs(@RequestParam("remoteAddress") String remoteAddress) { return accessLogService.deleteFromRemoteAddress(remoteAddress); }
From source file:ch.heigvd.gamification.api.BadgesEndpoint.java
@Override @RequestMapping(value = "/{badgeId}", method = RequestMethod.DELETE) public ResponseEntity<Void> badgesBadgeIdDelete( @ApiParam(value = "badgeId", required = true) @RequestHeader(value = "X-Gamification-Token", required = true) String xGamificationToken, @ApiParam(value = "badgeId", required = true) @PathVariable("badgeId") Long badgeId) { AuthenKey apiKey = authenKeyRepository.findByAppKey(xGamificationToken); if (apiKey == null) { return new ResponseEntity("apikey not exist", HttpStatus.UNAUTHORIZED); }/*from w w w. j a v a 2 s . co m*/ Application app = apiKey.getApp(); Badge badge = badgeRepository.findByIdAndApp(badgeId, app); if (badge != null && app != null) { badgeRepository.delete(badge); return new ResponseEntity(HttpStatus.OK); } else { return new ResponseEntity("no content is valid", HttpStatus.NOT_FOUND); } }
From source file:es.fdi.reservas.reserva.web.EspaciosRestController.java
@RequestMapping(value = "/espacio/{idEspacio}", method = RequestMethod.DELETE) public void eliminarEspacios(@PathVariable("idEspacio") long idEspacio) { espacio_service.editarEspacioDeleted(idEspacio); }
From source file:org.openbaton.nfvo.api.RestEvent.java
/** * Removes the EventEndpoint from the EventEndpoint repository * * @param id : The Event's id to be deleted *///w w w . jav a 2s.c om @RequestMapping(value = "{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void unregister(@PathVariable("id") String id, @RequestHeader(value = "project-id") String projectId) throws NotFoundException { eventDispatcher.unregister(id, projectId); }
From source file:org.openbaton.nfvo.api.RestVirtualNetworkFunctionDescriptor.java
/** * Removes the VNF software virtualNetworkFunctionDescriptor from the * virtualNetworkFunctionDescriptor repository * * @param id : The virtualNetworkFunctionDescriptor's id to be deleted *///www . ja v a 2 s.co m @RequestMapping(value = "{id}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(@PathVariable("id") String id, @RequestHeader(value = "project-id") String projectId) { vnfdManagement.delete(id, projectId); }