Example usage for org.springframework.web.bind.annotation RequestMethod DELETE

List of usage examples for org.springframework.web.bind.annotation RequestMethod DELETE

Introduction

In this page you can find the example usage for org.springframework.web.bind.annotation RequestMethod DELETE.

Prototype

RequestMethod DELETE

To view the source code for org.springframework.web.bind.annotation RequestMethod DELETE.

Click Source Link

Usage

From source file:de.document.controller.KrankheitController.java

@RequestMapping(value = "/{title}", method = { RequestMethod.DELETE })
public ResponseEntity delete(@PathVariable("title") String title) {

    this.service.delete(title);
    return ResponseEntity.ok().build();
}

From source file:ch.wisv.areafiftylan.extras.consumption.controller.ConsumptionController.java

@RequestMapping(method = RequestMethod.DELETE)
public ResponseEntity<?> removeAvailableConsumption(@RequestBody Long consumptionId) {
    Consumption c = consumptionService.removePossibleConsumption(consumptionId);

    return createResponseEntity(HttpStatus.OK,
            "Successfully removed " + c.getName() + " as a supported consumption.");
}

From source file:org.osmsurround.ae.amenity.AmenityEditorController.java

@RequestMapping(method = RequestMethod.DELETE)
public @ResponseBody ResultMessage delete(@RequestParam(value = "_nodeId") long nodeId) throws IOException {
    amenityService.deleteAmenity(nodeId);
    return new ResultMessage("Ok.");
}

From source file:lydichris.smashbracket.controllers.TournamentController.java

@RequestMapping(value = "/tournaments", method = RequestMethod.DELETE)
void deleteTournament(@RequestParam String uuid) {
    tournamentService.deleteTournament(uuid);
}

From source file:edu.infsci2560.services.LocationsService.java

@RequestMapping(value = "/{id}", method = RequestMethod.DELETE, produces = "application/json")
public ResponseEntity<Location> delete(@PathVariable("id") Long id) {
    HttpHeaders headers = new HttpHeaders();
    return new ResponseEntity<>(repository.findOne(id), headers, HttpStatus.OK);
}

From source file:gr.abiss.calipso.controller.ReadOnlyServiceBasedRestController.java

@Override
@RequestMapping(value = "{id}", method = RequestMethod.DELETE)
public void delete(ID id) {
    throw new NotImplementedClientException("Method is unsupported.");
}

From source file:net.triptech.metahive.web.PersonController.java

@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@PreAuthorize("hasRole('ROLE_ADMIN')")
public String delete(@PathVariable("id") Long id, Model uiModel, HttpServletRequest request) {

    Person.findPerson(id).remove();/*from   w w  w .  ja va2  s  . c om*/
    uiModel.asMap().clear();

    FlashScope.appendMessage(getMessage("metahive_delete_complete", Person.class), request);

    return "redirect:/people";
}

From source file:io.curly.gathering.mention.MentionController.java

@RequestMapping(value = "/{participant}", method = RequestMethod.DELETE)
public Callable<HttpEntity<?>> unMention(@PathVariable String participant, @PathVariable String listId,
        @GitHubAuthentication User user) {
    return () -> {
        interaction.unMention(new UnMention(participant, listId), user);
        return new ResponseEntity<>(HttpStatus.NO_CONTENT);
    };//from   w  w w. j  av  a 2 s  .  c o  m
}

From source file:app.api.swagger.SwaggerConfig.java

@Bean
public Docket swaggerSpringMvcPlugin() {
    final Docket docket = new Docket(DocumentationType.SWAGGER_2).select().build();
    docket.apiInfo(apiInfo()).pathProvider(pathProvider());
    docket.consumes(defaultMediaType()).produces(defaultMediaType());
    docket.securitySchemes(securitySchemes()).securityContexts(securityContexts());
    docket.globalResponseMessage(RequestMethod.GET, defaultGetResponses());
    docket.globalResponseMessage(RequestMethod.PUT, defaultHttpResponses());
    docket.globalResponseMessage(RequestMethod.POST, defaultHttpResponses());
    docket.globalResponseMessage(RequestMethod.DELETE, defaultHttpResponses());
    return docket;
}

From source file:com.expedia.seiso.web.controller.v1.ServiceInstancePortControllerV1.java

@RequestMapping(value = SINGLE_URI_TEMPLATE, method = RequestMethod.DELETE)
@ResponseStatus(HttpStatus.NO_CONTENT)/*from www .ja va2 s.c o  m*/
public void delete(@PathVariable String serviceInstanceKey, @PathVariable Integer number) {
    val itemKey = new ServiceInstancePortKey(serviceInstanceKey, number);
    basicItemDelegate.delete(itemKey);
}