return new DeleteProjectResult(errorCollection); return new DeleteProjectResult(errorCollection); return new DeleteProjectResult(errorCollection); return new DeleteProjectResult(errorCollection);
@RequiresXsrfCheck protected String doExecute() throws Exception { if (confirm) { final ProjectService.DeleteProjectValidationResult result = projectService.validateDeleteProject(getLoggedInUser(), getProject().getKey()); final ProjectService.DeleteProjectResult projectResult = projectService.deleteProject(getLoggedInUser(), result); if(!projectResult.isValid()) { addErrorCollection(projectResult.getErrorCollection()); return ERROR; } } return getResult(); }
@Override public Response apply(final Project project) { ProjectService.DeleteProjectValidationResult validationResult = projectService.validateDeleteProject(authContext.getUser(), project.getKey()); if (validationResult.isValid()) { ProjectService.DeleteProjectResult result = projectService.deleteProject(authContext.getUser(), validationResult); return result.isValid() ? responses.noContent() : responses.errorResponse(result.getErrorCollection()); } else { return responses.errorResponse(validationResult.getErrorCollection()); } } });
public void deleteProject(User user, String projectKey) throws RemoteException { com.atlassian.jira.bc.project.ProjectService.DeleteProjectValidationResult result = projectService.validateDeleteProject(user, projectKey); if (!result.isValid()) { throw new RemoteValidationException("Error removing project: ", result.getErrorCollection()); } com.atlassian.jira.bc.project.ProjectService.DeleteProjectResult deleteResult = projectService.deleteProject(user, result); if (!deleteResult.isValid()) { throw new RemoteValidationException("Error removing project: ", deleteResult.getErrorCollection()); } }