public class

MockProjectFieldLayoutSchemeHelper

extends Object
implements ProjectFieldLayoutSchemeHelper
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.MockProjectFieldLayoutSchemeHelper

Summary

Public Constructors
MockProjectFieldLayoutSchemeHelper()
Public Methods
List<Project> getProjectsForFieldLayout(FieldLayout fieldLayout)
Returns a list of the projects are currently using the passed field layout, and the field layout is active.
Multimap<FieldLayoutProject> getProjectsForFieldLayouts(Set<FieldLayout> fieldLayouts)
Like getProjectsForFieldLayout(com.atlassian.jira.issue.fields.layout.field.FieldLayout), but takes a set of fieldLayouts and returns a multimap of FieldLayouts -> Active projects
List<Project> getProjectsForScheme(Long schemeId)
Return a list of projects that use the field layout scheme with the passed query.
MockProjectFieldLayoutSchemeHelper setProjectsForFieldLayout(FieldLayout fieldLayout, List<Project> layoutProjects)
MockProjectFieldLayoutSchemeHelper setProjectsForFieldLayoutScheme(Long schemeId, List<Project> projects)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.fields.ProjectFieldLayoutSchemeHelper

Public Constructors

public MockProjectFieldLayoutSchemeHelper ()

Public Methods

public List<Project> getProjectsForFieldLayout (FieldLayout fieldLayout)

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.

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.

public Multimap<FieldLayoutProject> getProjectsForFieldLayouts (Set<FieldLayout> fieldLayouts)

Like getProjectsForFieldLayout(com.atlassian.jira.issue.fields.layout.field.FieldLayout), but takes a set of fieldLayouts and returns a multimap of FieldLayouts -> Active projects

Parameters
fieldLayouts Field layouts to get projects for
Returns

public List<Project> getProjectsForScheme (Long schemeId)

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.

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.

public MockProjectFieldLayoutSchemeHelper setProjectsForFieldLayout (FieldLayout fieldLayout, List<Project> layoutProjects)

public MockProjectFieldLayoutSchemeHelper setProjectsForFieldLayoutScheme (Long schemeId, List<Project> projects)