@Test void purgeProject() { removeProject(); final WebClient client = dogma.httpClient(); final AggregatedHttpResponse aRes = client.delete(PROJECTS_PREFIX + "/foo/removed") .aggregate().join(); final ResponseHeaders headers = ResponseHeaders.of(aRes.headers()); assertThat(ResponseHeaders.of(headers).status()).isEqualTo(HttpStatus.NO_CONTENT); }
@Delete("/projects/{projectName}/removed") @RequiresRole(roles = ProjectRole.OWNER) public CompletableFuture<Void> purgeProject(@Param String projectName, Author author) { return execute(Command.purgeProject(author, projectName)) .handle(HttpApiUtil::throwUnsafelyIfNonNull); }
ProjectServiceV1 extends AbstractService { @Delete("/projects/{projectName}/removed") @RequiresRole(roles = ProjectRole.OWNER) public CompletableFuture<Void> purgeProject(@Param String projectName, Author author) { return execute(Command.purgeProject(author, projectName)) .handle(HttpApiUtil::throwUnsafelyIfNonNull); } }
ProjectServiceV1 extends AbstractService { @Delete("/projects/{projectName}/removed") @RequiresRole(roles = ProjectRole.OWNER) public CompletableFuture<Void> purgeProject(@Param String projectName, Author author) { return execute(Command.purgeProject(author, projectName)) .handle(HttpApiUtil::throwUnsafelyIfNonNull); } ProjectServiceV1(ProjectManager projectManager, CommandExecutor executor, MetadataService mds); }
ProjectServiceV1 extends AbstractService { @Delete("/projects/{projectName}/removed") @RequiresRole(roles = ProjectRole.OWNER) public CompletableFuture<Void> purgeProject(@Param String projectName, Author author) { return execute(Command.purgeProject(author, projectName)) .handle(HttpApiUtil::throwUnsafelyIfNonNull); } ProjectServiceV1(ProjectManager projectManager, CommandExecutor executor, MetadataService mds); @Get("/projects") CompletableFuture<List<ProjectDto>> listProjects(@Param @Nullable String status); @Post("/projects") @StatusCode(201) @ResponseConverter(CreateApiResponseConverter.class) CompletableFuture<ProjectDto> createProject(CreateProjectRequest request, Author author); @Get("/projects/{projectName}") @RequiresRole(roles = { ProjectRole.OWNER, ProjectRole.MEMBER }) CompletableFuture<ProjectMetadata> getProjectMetadata(
            @Param String projectName,
            @Param("checkPermissionOnly") @Default("false") boolean isCheckPermissionOnly); @Delete("/projects/{projectName}") @RequiresRole(roles = ProjectRole.OWNER) CompletableFuture<Void> removeProject(Project project, Author author); @Delete("/projects/{projectName}/removed") @RequiresRole(roles = ProjectRole.OWNER) CompletableFuture<Void> purgeProject(@Param String projectName, Author author); @Consumes("application/json-patch+json") @Patch("/projects/{projectName}") @RequiresAdministrator CompletableFuture<ProjectDto> patchProject(@Param String projectName, JsonNode node, Author author); }
ProjectServiceV1 extends AbstractService { @Delete("/projects/{projectName}/removed") @RequiresRole(roles = ProjectRole.OWNER) public CompletableFuture<Void> purgeProject(@Param String projectName, Author author) { return execute(Command.purgeProject(author, projectName)) .handle(HttpApiUtil::throwUnsafelyIfNonNull); } ProjectServiceV1(ProjectManager projectManager, CommandExecutor executor, MetadataService mds); @Get("/projects") CompletableFuture<List<ProjectDto>> listProjects(@Param @Nullable String status); @Post("/projects") @StatusCode(201) @ResponseConverter(CreateApiResponseConverter.class) CompletableFuture<ProjectDto> createProject(CreateProjectRequest request, Author author); @Get("/projects/{projectName}") @RequiresRole(roles = { ProjectRole.OWNER, ProjectRole.MEMBER }) CompletableFuture<ProjectMetadata> getProjectMetadata(
            @Param String projectName,
            @Param("checkPermissionOnly") @Default("false") boolean isCheckPermissionOnly); @Delete("/projects/{projectName}") @RequiresRole(roles = ProjectRole.OWNER) CompletableFuture<Void> removeProject(Project project, Author author); @Delete("/projects/{projectName}/removed") @RequiresRole(roles = ProjectRole.OWNER) CompletableFuture<Void> purgeProject(@Param String projectName, Author author); @Consumes("application/json-patch+json") @Patch("/projects/{projectName}") @RequiresAdministrator CompletableFuture<ProjectDto> patchProject(@Param String projectName, JsonNode node, Author author);  }