/** * Map the route for HTTP DELETE requests * * @param path the path * @param route The route * @param engine the template engine */ public static void delete(String path, TemplateViewRoute route, TemplateEngine engine) { getInstance().delete(path, route, engine); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param route The route * @param transformer the response transformer */ public static void delete(String path, Route route, ResponseTransformer transformer) { getInstance().delete(path, route, transformer); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param route The route */ public static void delete(String path, Route route) { getInstance().delete(path, route); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param acceptType the accept type * @param route The route */ public static void delete(String path, String acceptType, Route route) { getInstance().delete(path, acceptType, route); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param acceptType the accept type * @param route The route * @param engine the template engine */ public static void delete(String path, String acceptType, TemplateViewRoute route, TemplateEngine engine) { getInstance().delete(path, acceptType, route, engine); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param acceptType the accept type * @param route The route * @param transformer the response transformer */ public static void delete(String path, String acceptType, Route route, ResponseTransformer transformer) { getInstance().delete(path, acceptType, route, transformer); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param route The route * @param engine the template engine */ public static void delete(String path, TemplateViewRoute route, TemplateEngine engine) { getInstance().delete(path, route, engine); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param route The route * @param transformer the response transformer */ public static void delete(String path, Route route, ResponseTransformer transformer) { getInstance().delete(path, route, transformer); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param route The route */ public static void delete(String path, Route route) { getInstance().delete(path, route); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param acceptType the accept type * @param route The route */ public static void delete(String path, String acceptType, Route route) { getInstance().delete(path, acceptType, route); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param acceptType the accept type * @param route The route * @param engine the template engine */ public static void delete(String path, String acceptType, TemplateViewRoute route, TemplateEngine engine) { getInstance().delete(path, acceptType, route, engine); }
/** * Map the route for HTTP DELETE requests * * @param path the path * @param acceptType the accept type * @param route The route * @param transformer the response transformer */ public static void delete(String path, String acceptType, Route route, ResponseTransformer transformer) { getInstance().delete(path, acceptType, route, transformer); }
@DELETE @Path("/{domainName}") @ApiOperation(value = "Deleting a domain") @ApiImplicitParams({ @ApiImplicitParam(required = true, dataType = "string", name = "domainName", paramType = "path") }) @ApiResponses(value = { @ApiResponse(code = HttpStatus.NO_CONTENT_204, message = "OK. Domain is removed."), @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "Internal server error - Something went bad on the server side.") }) public void defineDeleteDomain() { service.delete(SPECIFIC_DOMAIN, this::removeDomain); }
@DELETE @Path("/{username}") @ApiOperation(value = "Deleting an user") @ApiImplicitParams({ @ApiImplicitParam(required = true, dataType = "string", name = "username", paramType = "path") }) @ApiResponses(value = { @ApiResponse(code = HttpStatus.NO_CONTENT_204, message = "OK. User is removed."), @ApiResponse(code = HttpStatus.BAD_REQUEST_400, message = "Invalid input user."), @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "Internal server error - Something went bad on the server side.") }) public void defineDeleteUser() { service.delete(USERS + SEPARATOR + USER_NAME, this::removeUser); }
@DELETE @ApiOperation(value = "Removes global sieve quota") @ApiResponses(value = { @ApiResponse(code = 204, message = "Global sieve quota removed."), @ApiResponse(code = 500, message = "Internal server error - Something went bad on the server side.") }) public void defineRemoveGlobalSieveQuota(Service service) { service.delete(DEFAULT_QUOTA_PATH, (request, response) -> { try { sieveQuotaRepository.removeQuota(); } catch (QuotaNotFoundException e) { // Do nothing } response.status(HttpStatus.NO_CONTENT_204); return Constants.EMPTY_BODY; }); }
@Override public void define(Service service) { service.get(ROOT_PATH, this::listForwards, jsonTransformer); service.get(FORWARD_ADDRESS_PATH, this::listForwardDestinations, jsonTransformer); service.put(FORWARD_ADDRESS_PATH, this::throwUnknownPath); service.put(USER_IN_FORWARD_DESTINATION_ADDRESSES_PATH, this::addToForwardDestinations); service.delete(FORWARD_ADDRESS_PATH, this::throwUnknownPath); service.delete(USER_IN_FORWARD_DESTINATION_ADDRESSES_PATH, this::removeFromForwardDestination); }
@Override public void define(final Service service) { service.get(DOMAIN_MAPPINGS, this::getAllMappings, jsonTransformer); service.get(SPECIFIC_MAPPING, this::getMapping, jsonTransformer); service.put(SPECIFIC_MAPPING, this::addDomainMapping); service.delete(SPECIFIC_MAPPING, this::removeDomainMapping); }
@Override public void define(Service service) { service.get(ROOT_PATH, this::listGroups, jsonTransformer); service.get(GROUP_ADDRESS_PATH, this::listGroupMembers, jsonTransformer); service.put(GROUP_ADDRESS_PATH, (request, response) -> halt(HttpStatus.BAD_REQUEST_400)); service.put(USER_IN_GROUP_ADDRESS_PATH, this::addToGroup); service.delete(GROUP_ADDRESS_PATH, (request, response) -> halt(HttpStatus.BAD_REQUEST_400)); service.delete(USER_IN_GROUP_ADDRESS_PATH, this::removeFromGroup); }
@Override public void define(Service service) { service.get(BASE + "/:id", this::getStatus, jsonTransformer); service.get(BASE + "/:id/await", this::await, jsonTransformer); service.delete(BASE + "/:id", this::cancel, jsonTransformer); service.get(BASE, this::list, jsonTransformer); }
@DELETE @Path("/{encodedPath}/mails/{mailKey}") @ApiOperation(value = "Deleting a specific mail from that mailRepository") @ApiResponses(value = { @ApiResponse(code = HttpStatus.OK_200, message = "Mail is no more stored in the repository", response = List.class), @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "Internal server error - Something went bad on the server side."), }) public void defineDeleteMail() { service.delete(MAIL_REPOSITORIES + "/:encodedPath/mails/:mailKey", (request, response) -> { MailRepositoryPath path = decodedRepositoryPath(request); MailKey mailKey = new MailKey(request.params("mailKey")); try { response.status(HttpStatus.NO_CONTENT_204); repositoryStoreService.deleteMail(path, mailKey); return Constants.EMPTY_BODY; } catch (MailRepositoryStore.MailRepositoryStoreException | MessagingException e) { throw ErrorResponder.builder() .statusCode(HttpStatus.INTERNAL_SERVER_ERROR_500) .type(ErrorResponder.ErrorType.SERVER_ERROR) .cause(e) .message("Error while deleting mail") .haltError(); } }); }