public class ProjectTypeManagerImpl extends Object implements ProjectTypeManager
ProjectTypeManager
Modifier and Type | Field and Description |
---|---|
static int |
INACCESSIBLE_WEIGHT |
Constructor and Description |
---|
ProjectTypeManagerImpl(JiraApplicationAdapter adapter) |
Modifier and Type | Method and Description |
---|---|
io.atlassian.fugue.Option<ProjectType> |
getAccessibleProjectType(ApplicationUser user,
ProjectTypeKey key)
Returns the project type with the given key, if it is accessible for the given user.
|
io.atlassian.fugue.Option<ProjectType> |
getAccessibleProjectType(ProjectTypeKey key)
Returns the project type with the given key, if it is accessible.
|
List<ProjectType> |
getAllAccessibleProjectTypes()
Returns all the accessible project types defined on the JIRA instance sorted by weight.
|
List<ProjectType> |
getAllProjectTypes()
Returns all the project types defined on the JIRA instance sorted by weight not taking into account whether
the license to use those project types is valid or not.
|
io.atlassian.fugue.Option<com.atlassian.application.api.Application> |
getApplicationWithType(ProjectTypeKey key)
Returns the application that provides the given project type.
|
io.atlassian.fugue.Option<ProjectType> |
getByKey(ProjectTypeKey key)
Returns the project type with the given key, if it is present on the JIRA instance.
|
ProjectType |
getInaccessibleProjectType()
Returns a project type with information to be displayed to users when a specific project type is not accessible.
|
boolean |
isProjectTypeInstalledButInaccessible(ProjectTypeKey projectTypeKey)
Returns whether the project type with the given key is installed but inaccessible.
|
boolean |
isProjectTypeUninstalled(ProjectTypeKey projectTypeKey)
Returns whether the project type with the given key is uninstalled.
|
public static final int INACCESSIBLE_WEIGHT
public ProjectTypeManagerImpl(JiraApplicationAdapter adapter)
public List<ProjectType> getAllProjectTypes()
ProjectTypeManager
getAllProjectTypes
in interface ProjectTypeManager
public List<ProjectType> getAllAccessibleProjectTypes()
ProjectTypeManager
getAllAccessibleProjectTypes
in interface ProjectTypeManager
public io.atlassian.fugue.Option<ProjectType> getByKey(ProjectTypeKey key)
ProjectTypeManager
getByKey
in interface ProjectTypeManager
key
- The project type keypublic io.atlassian.fugue.Option<com.atlassian.application.api.Application> getApplicationWithType(ProjectTypeKey key)
ProjectTypeManager
getApplicationWithType
in interface ProjectTypeManager
key
- The project type keypublic io.atlassian.fugue.Option<ProjectType> getAccessibleProjectType(ProjectTypeKey key)
ProjectTypeManager
getAccessibleProjectType
in interface ProjectTypeManager
key
- The project type keypublic io.atlassian.fugue.Option<ProjectType> getAccessibleProjectType(ApplicationUser user, ProjectTypeKey key)
ProjectTypeManager
getAccessibleProjectType
in interface ProjectTypeManager
user
- The userkey
- The project type keypublic ProjectType getInaccessibleProjectType()
ProjectTypeManager
A project type might be inaccessible if the user is not licensed under the application that defines the type or if the application that defines the type is not installed on the JIRA instance.
getInaccessibleProjectType
in interface ProjectTypeManager
public boolean isProjectTypeUninstalled(ProjectTypeKey projectTypeKey)
ProjectTypeManager
isProjectTypeUninstalled
in interface ProjectTypeManager
projectTypeKey
- The key of the project type for which we are performing the check.public boolean isProjectTypeInstalledButInaccessible(ProjectTypeKey projectTypeKey)
ProjectTypeManager
isProjectTypeInstalledButInaccessible
in interface ProjectTypeManager
projectTypeKey
- The key of the project type for which we are performing the check.Copyright © 2002-2021 Atlassian. All Rights Reserved.