com.atlassian.jira.issue.fields.config.manager
Class IssueTypeSchemeManagerImpl

java.lang.Object
  extended by com.atlassian.jira.issue.fields.config.manager.IssueTypeSchemeManagerImpl
All Implemented Interfaces:
IssueTypeSchemeManager

public class IssueTypeSchemeManagerImpl
extends Object
implements IssueTypeSchemeManager

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


Constructor Summary
IssueTypeSchemeManagerImpl(FieldConfigSchemeManager configSchemeManager, OptionSetManager optionSetManager, GenericConfigManager genericConfigManager, ConstantsManager constantsManager)
           
 
Method Summary
 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(org.ofbiz.core.entity.GenericValue project)
          Returns a config scheme for a given project
 FieldConfigScheme getConfigScheme(Project project)
          Returns a config scheme for a given project
 FieldConfigScheme getDefaultIssueTypeScheme()
          Returns the default global issue type, to which all issue types are added to
 IssueType getDefaultValue(FieldConfig config)
          Returns the IssueType object that is the default for thie configuration
 IssueType getDefaultValue(org.ofbiz.core.entity.GenericValue project)
          Returns the default IssueType for a project.
 IssueType getDefaultValue(Issue issue)
           
 Collection<IssueType> getIssueTypesForDefaultScheme()
          Return the collection of issue types associated with the default scheme.
 Collection<IssueType> getIssueTypesForProject(org.ofbiz.core.entity.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 IssueTypeSchemeManager.getNonSubTaskIssueTypesForProject(com.atlassian.jira.project.Project) produces the same result as a call to IssueTypeSchemeManager.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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IssueTypeSchemeManagerImpl

public IssueTypeSchemeManagerImpl(FieldConfigSchemeManager configSchemeManager,
                                  OptionSetManager optionSetManager,
                                  GenericConfigManager genericConfigManager,
                                  ConstantsManager constantsManager)
Method Detail

create

public FieldConfigScheme create(String schemeName,
                                String schemeDescription,
                                List optionIds)
Specified by:
create in interface IssueTypeSchemeManager

update

public FieldConfigScheme update(FieldConfigScheme configScheme,
                                Collection optionIds)
Specified by:
update in interface IssueTypeSchemeManager

getDefaultIssueTypeScheme

public FieldConfigScheme getDefaultIssueTypeScheme()
Description copied from interface: IssueTypeSchemeManager
Returns the default global issue type, to which all issue types are added to

Specified by:
getDefaultIssueTypeScheme in interface IssueTypeSchemeManager
Returns:
FieldConfigScheme

isDefaultIssueTypeScheme

public boolean isDefaultIssueTypeScheme(FieldConfigScheme configScheme)
Specified by:
isDefaultIssueTypeScheme in interface IssueTypeSchemeManager

addOptionToDefault

public void addOptionToDefault(String id)
Description copied from interface: IssueTypeSchemeManager
Adds the option with the issue type id to the default issue type scheme

Specified by:
addOptionToDefault in interface IssueTypeSchemeManager
Parameters:
id - issue type id

getAllRelatedSchemes

public Collection<FieldConfigScheme> getAllRelatedSchemes(String optionId)
Description copied from interface: IssueTypeSchemeManager
Gets all schemes that has the issue type as part of its options

Specified by:
getAllRelatedSchemes in interface IssueTypeSchemeManager
Parameters:
optionId - Issue type id being queried
Returns:
Collection of FieldConfigScheme objects

removeOptionFromAllSchemes

public void removeOptionFromAllSchemes(String optionId)
Specified by:
removeOptionFromAllSchemes in interface IssueTypeSchemeManager

deleteScheme

public void deleteScheme(FieldConfigScheme configScheme)
Specified by:
deleteScheme in interface IssueTypeSchemeManager

getAllSchemes

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

Specified by:
getAllSchemes in interface IssueTypeSchemeManager
Returns:
all schemes sorted on name with default first

getDefaultValue

public IssueType getDefaultValue(Issue issue)
Specified by:
getDefaultValue in interface IssueTypeSchemeManager

getDefaultValue

public IssueType getDefaultValue(FieldConfig config)
Description copied from interface: IssueTypeSchemeManager
Returns the IssueType object that is the default for thie configuration

Specified by:
getDefaultValue in interface IssueTypeSchemeManager
Returns:
IssueType representing the default value of this config

getDefaultValue

public IssueType getDefaultValue(org.ofbiz.core.entity.GenericValue project)
Returns the default IssueType for a project.

Specified by:
getDefaultValue in interface IssueTypeSchemeManager
Parameters:
project -
Returns:
IssueType or null if there is no default

setDefaultValue

public void setDefaultValue(FieldConfig config,
                            String optionId)
Specified by:
setDefaultValue in interface IssueTypeSchemeManager

getConfigScheme

public FieldConfigScheme getConfigScheme(org.ofbiz.core.entity.GenericValue project)
Description copied from interface: IssueTypeSchemeManager
Returns a config scheme for a given project

Specified by:
getConfigScheme in interface IssueTypeSchemeManager
Returns:
Relevent configscheme

getConfigScheme

public FieldConfigScheme getConfigScheme(Project project)
Description copied from interface: IssueTypeSchemeManager
Returns a config scheme for a given project

Specified by:
getConfigScheme in interface IssueTypeSchemeManager
Returns:
Relevent configscheme

getIssueTypesForProject

public Collection<IssueType> getIssueTypesForProject(org.ofbiz.core.entity.GenericValue project)
Description copied from interface: IssueTypeSchemeManager
Return the collection of issue types associated with this project

Specified by:
getIssueTypesForProject in interface IssueTypeSchemeManager
Parameters:
project - project generic value
Returns:
collection of issue type objects

getIssueTypesForProject

public Collection<IssueType> getIssueTypesForProject(Project project)
Description copied from interface: IssueTypeSchemeManager
Return the collection of issue types associated with this project

Specified by:
getIssueTypesForProject in interface IssueTypeSchemeManager
Parameters:
project - project to return the issue types of
Returns:
collection of IssueType objects (possibly empty, never null).

getIssueTypesForDefaultScheme

public Collection<IssueType> getIssueTypesForDefaultScheme()
Description copied from interface: IssueTypeSchemeManager
Return the collection of issue types associated with the default scheme.

Specified by:
getIssueTypesForDefaultScheme in interface IssueTypeSchemeManager
Returns:
collection of IssueType objects (possibly empty, never null).

getNonSubTaskIssueTypesForProject

public Collection<IssueType> getNonSubTaskIssueTypesForProject(Project project)
Description copied from interface: IssueTypeSchemeManager
Return the collection of issue types other than sub-tasks associated with this project. Join of the result of this method and IssueTypeSchemeManager.getSubTaskIssueTypesForProject(com.atlassian.jira.project.Project) produces the same result as a call to IssueTypeSchemeManager.getIssueTypesForProject(com.atlassian.jira.project.Project).

Specified by:
getNonSubTaskIssueTypesForProject in interface IssueTypeSchemeManager
Parameters:
project - project to return the issue types of
Returns:
collection of IssueType objects

getSubTaskIssueTypesForProject

public Collection<IssueType> getSubTaskIssueTypesForProject(Project project)
Description copied from interface: IssueTypeSchemeManager
Return the collection of sub-task issue types associated with this project Join of the result of this method and IssueTypeSchemeManager.getNonSubTaskIssueTypesForProject(com.atlassian.jira.project.Project) produces the same result as a call to IssueTypeSchemeManager.getIssueTypesForProject(com.atlassian.jira.project.Project).

Specified by:
getSubTaskIssueTypesForProject in interface IssueTypeSchemeManager
Parameters:
project - project to return the issue types of
Returns:
collection of IssueType objects (possibly empty, never null).


Copyright © 2002-2012 Atlassian. All Rights Reserved.