Package com.atlassian.jira.issue.fields
Class DefaultProjectFieldLayoutSchemeHelper
java.lang.Object
com.atlassian.jira.issue.fields.DefaultProjectFieldLayoutSchemeHelper
- All Implemented Interfaces:
ProjectFieldLayoutSchemeHelper
public class DefaultProjectFieldLayoutSchemeHelper
extends Object
implements ProjectFieldLayoutSchemeHelper
- Since:
- v4.4
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultProjectFieldLayoutSchemeHelper
(ProjectService projectService, FieldLayoutManager fieldLayoutManager, JiraAuthenticationContext authenticationContext) -
Method Summary
Modifier and TypeMethodDescriptiongetProjectsForFieldLayout
(FieldLayout fieldLayout) Returns a list of the projects are currently using the passed field layout, and the field layout is active.com.google.common.collect.Multimap<FieldLayout,
Project> getProjectsForFieldLayouts
(Set<FieldLayout> fieldLayouts) LikeProjectFieldLayoutSchemeHelper.getProjectsForFieldLayout(com.atlassian.jira.issue.fields.layout.field.FieldLayout)
, but takes a set of fieldLayouts and returns a multimap of FieldLayouts -> Active projectsgetProjectsForScheme
(Long schemeId) Return a list of projects that use the field layout scheme with the passed query.
-
Constructor Details
-
DefaultProjectFieldLayoutSchemeHelper
public DefaultProjectFieldLayoutSchemeHelper(ProjectService projectService, FieldLayoutManager fieldLayoutManager, JiraAuthenticationContext authenticationContext)
-
-
Method Details
-
getProjectsForScheme
Description copied from interface:ProjectFieldLayoutSchemeHelper
Return a list of projects that use the field layout scheme with the passed query. Only projects that the passed user can change the configuration for will be returned.- Specified by:
getProjectsForScheme
in interfaceProjectFieldLayoutSchemeHelper
- Parameters:
schemeId
- the scheme id query. Null can be passed to search for the magical system default field layout scheme.- Returns:
- a list of projects that use the scheme. The list is sorted by project name. The list is mutable and can be changed by the caller safely.
-
getProjectsForFieldLayouts
public com.google.common.collect.Multimap<FieldLayout,Project> getProjectsForFieldLayouts(Set<FieldLayout> fieldLayouts) Description copied from interface:ProjectFieldLayoutSchemeHelper
LikeProjectFieldLayoutSchemeHelper.getProjectsForFieldLayout(com.atlassian.jira.issue.fields.layout.field.FieldLayout)
, but takes a set of fieldLayouts and returns a multimap of FieldLayouts -> Active projects- Specified by:
getProjectsForFieldLayouts
in interfaceProjectFieldLayoutSchemeHelper
- Parameters:
fieldLayouts
- Field layouts to get projects for- Returns:
- multimap of FieldLayouts -> Active projects, sorted on
ProjectNameComparator
-
getProjectsForFieldLayout
Description copied from interface:ProjectFieldLayoutSchemeHelper
Returns a list of the projects are currently using the passed field layout, and the field layout is active.Only projects that the current user can change the configuration for will be returned.
- Specified by:
getProjectsForFieldLayout
in interfaceProjectFieldLayoutSchemeHelper
- Parameters:
fieldLayout
- the name of the field layout the check.- Returns:
- a list of active projects. The list is sorted by project name. The list is mutable and can be changed by the caller safely.
-