com.atlassian.jira.issue.fields
Interface ProjectFieldLayoutSchemeHelper

All Known Implementing Classes:
DefaultProjectFieldLayoutSchemeHelper, MockProjectFieldLayoutSchemeHelper

public interface ProjectFieldLayoutSchemeHelper

A number of useful field layout scheme methods, particularly to do with "active" field layouts. A field layout is only considered "active" if it is currently actually being used by a project. This means it is active if:

  1. The field layout is mapped to an issue type in the project's scheme and the project has that issue type.
  2. The field layout is a default for the project's scheme and there are some unmapped issue types.
Internal helper class for Project Configuration.

Since:
v4.4

Method Summary
 List<Project> getProjectsForFieldLayout(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)
          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.
 

Method Detail

getProjectsForScheme

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.

getProjectsForFieldLayouts

com.google.common.collect.Multimap<FieldLayout,Project> 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:
multimap of FieldLayouts -> Active projects, sorted on ProjectNameComparator

getProjectsForFieldLayout

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.


Copyright © 2002-2012 Atlassian. All Rights Reserved.