예제 #1
0
  @RequiresXsrfCheck
  protected String doExecute() throws Exception {
    if (confirm) {
      final ProjectService.DeleteProjectValidationResult result =
          projectService.validateDeleteProject(getRemoteUser(), getProjectObject().getKey());
      final ProjectService.DeleteProjectResult projectResult =
          projectService.deleteProject(getRemoteUser(), result);

      if (!projectResult.isValid()) {
        addErrorCollection(projectResult.getErrorCollection());
        return ERROR;
      }
    }

    return getResult();
  }
예제 #2
0
  protected void doValidation() {
    final Project projectObject = getProjectObject();
    if (projectObject == null) {
      addErrorMessage(getText("admin.deleteproject.error.no.project", pid));
      return;
    }

    final ProjectService.DeleteProjectValidationResult result =
        projectService.validateDeleteProject(getRemoteUser(), projectObject.getKey());
    if (!result.isValid()) {
      addErrorCollection(result.getErrorCollection());
    }
  }