Package com.atlassian.jira.projects
Class ProjectService
java.lang.Object
com.atlassian.jira.projects.ProjectService
A wrapper around
ProjectService that
returns Eithers.
We must pass a name to the @Component annotation to avoid
conflicting with JIRA's ProjectService.-
Constructor Summary
ConstructorsConstructorDescriptionProjectService(JiraAuthenticationContext authenticationContext, ProjectService projectService) -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine whether the current user can administer a project.io.atlassian.fugue.Either<ErrorCollection, Project> getProject(long id) Retrieve a project as the current user.io.atlassian.fugue.Either<ErrorCollection, Project> getProject(String key) Retrieve a project as the current user.
-
Constructor Details
-
ProjectService
@Autowired public ProjectService(JiraAuthenticationContext authenticationContext, ProjectService projectService)
-
-
Method Details
-
currentUserCanAdministerProject
Determine whether the current user can administer a project.- Parameters:
key- A project key.- Returns:
- true if the current user can administer the project, otherwise false.
-
getProject
Retrieve a project as the current user. Retrieval can fail if the project doesn't exist or the current user doesn't have permission to view it.- Parameters:
key- A project key.- Returns:
- The specified project or an error collection.
-
getProject
Retrieve a project as the current user. Retrieval can fail if the project doesn't exist or the current user doesn't have permission to view it.- Parameters:
id- A project id.- Returns:
- The specified project or an error collection.
-