public class

IssueTypeSchemeManagerImpl

extends Object
implements IssueTypeSchemeManager
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.config.manager.IssueTypeSchemeManagerImpl

Class Overview

A manager to manage IssueType's unique set of circumstances. That is, it circumvents the scheme system by collpasing the scheme and config

Summary

Public Constructors
IssueTypeSchemeManagerImpl(FieldConfigSchemeManager configSchemeManager, OptionSetManager optionSetManager, GenericConfigManager genericConfigManager, ConstantsManager constantsManager, EventPublisher eventPublisher)
Public Methods
void addOptionToDefault(String id)
Adds the option with the issue type id to the default issue type scheme
FieldConfigScheme create(String schemeName, String schemeDescription, List optionIds)
void deleteScheme(FieldConfigScheme configScheme)
Collection<FieldConfigScheme> getAllRelatedSchemes(String optionId)
Gets all schemes that has the issue type as part of its options
List<FieldConfigScheme> getAllSchemes()
Retrieves all schemes and sorts them.
FieldConfigScheme getConfigScheme(Project project)
Returns a config scheme for a given project
FieldConfigScheme getConfigScheme(GenericValue project)
Returns a config scheme for a given project
IssueType getDefaultIssueType(Project project)
Returns the default IssueType object based on the passed in project.
FieldConfigScheme getDefaultIssueTypeScheme()
Returns the default global issue type, to which all issue types are added to
IssueType getDefaultValue(GenericValue project)
Returns the default IssueType for a project.
IssueType getDefaultValue(Issue issue)
IssueType getDefaultValue(FieldConfig config)
Returns the IssueType object that is the default for thie configuration
Collection<IssueType> getIssueTypesForDefaultScheme()
Return the collection of issue types associated with the default scheme.
Collection<IssueType> getIssueTypesForProject(GenericValue project)
Return the collection of issue types associated with this project
Collection<IssueType> getIssueTypesForProject(Project project)
Return the collection of issue types associated with this project
Collection<IssueType> getNonSubTaskIssueTypesForProject(Project project)
Return the collection of issue types other than sub-tasks associated with this project.
Collection<IssueType> getSubTaskIssueTypesForProject(Project project)
Return the collection of sub-task issue types associated with this project Join of the result of this method and getNonSubTaskIssueTypesForProject(com.atlassian.jira.project.Project) produces the same result as a call to getIssueTypesForProject(com.atlassian.jira.project.Project).
boolean isDefaultIssueTypeScheme(FieldConfigScheme configScheme)
void removeOptionFromAllSchemes(String optionId)
void setDefaultValue(FieldConfig config, String optionId)
FieldConfigScheme update(FieldConfigScheme configScheme, Collection optionIds)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.fields.config.manager.IssueTypeSchemeManager

Public Constructors

public IssueTypeSchemeManagerImpl (FieldConfigSchemeManager configSchemeManager, OptionSetManager optionSetManager, GenericConfigManager genericConfigManager, ConstantsManager constantsManager, EventPublisher eventPublisher)

Public Methods

public void addOptionToDefault (String id)

Adds the option with the issue type id to the default issue type scheme

Parameters
id issue type id

public FieldConfigScheme create (String schemeName, String schemeDescription, List optionIds)

public void deleteScheme (FieldConfigScheme configScheme)

public Collection<FieldConfigScheme> getAllRelatedSchemes (String optionId)

Gets all schemes that has the issue type as part of its options

Parameters
optionId Issue type id being queried
Returns

public List<FieldConfigScheme> getAllSchemes ()

Retrieves all schemes and sorts them.

Schemes with the default scheme ID are first Schemes with null names are second the rest are sorted on name

Returns
  • all schemes sorted on name with default first

public FieldConfigScheme getConfigScheme (Project project)

Returns a config scheme for a given project

Returns
  • Relevent configscheme

public FieldConfigScheme getConfigScheme (GenericValue project)

Returns a config scheme for a given project

Returns
  • Relevent configscheme

public IssueType getDefaultIssueType (Project project)

Returns the default IssueType object based on the passed in project.

Parameters
project the Project
Returns
  • IssueType or null if there is no default

public FieldConfigScheme getDefaultIssueTypeScheme ()

Returns the default global issue type, to which all issue types are added to

Returns
  • FieldConfigScheme

public IssueType getDefaultValue (GenericValue project)

Returns the default IssueType for a project.

Returns
  • IssueType or null if there is no default

public IssueType getDefaultValue (Issue issue)

public IssueType getDefaultValue (FieldConfig config)

Returns the IssueType object that is the default for thie configuration

Returns
  • IssueType representing the default value of this config

public Collection<IssueType> getIssueTypesForDefaultScheme ()

Return the collection of issue types associated with the default scheme.

Returns
  • collection of IssueType objects (possibly empty, never null).

public Collection<IssueType> getIssueTypesForProject (GenericValue project)

Return the collection of issue types associated with this project

Parameters
project project generic value
Returns
  • collection of issue type objects

public Collection<IssueType> getIssueTypesForProject (Project project)

Return the collection of issue types associated with this project

Parameters
project project to return the issue types of
Returns
  • collection of IssueType objects (possibly empty, never null).

public Collection<IssueType> getNonSubTaskIssueTypesForProject (Project project)

Return the collection of issue types other than sub-tasks associated with this project. Join of the result of this method and getSubTaskIssueTypesForProject(com.atlassian.jira.project.Project) produces the same result as a call to getIssueTypesForProject(com.atlassian.jira.project.Project).

Parameters
project project to return the issue types of
Returns

public Collection<IssueType> getSubTaskIssueTypesForProject (Project project)

Return the collection of sub-task issue types associated with this project Join of the result of this method and getNonSubTaskIssueTypesForProject(com.atlassian.jira.project.Project) produces the same result as a call to getIssueTypesForProject(com.atlassian.jira.project.Project).

Parameters
project project to return the issue types of
Returns
  • collection of IssueType objects (possibly empty, never null).

public boolean isDefaultIssueTypeScheme (FieldConfigScheme configScheme)

public void removeOptionFromAllSchemes (String optionId)

public void setDefaultValue (FieldConfig config, String optionId)

public FieldConfigScheme update (FieldConfigScheme configScheme, Collection optionIds)