com.atlassian.jira.config
Class DefaultIssueTypeManager

java.lang.Object
  extended by com.atlassian.jira.config.AbstractIssueConstantsManager<IssueType>
      extended by com.atlassian.jira.config.DefaultIssueTypeManager
All Implemented Interfaces:
IssueTypeManager

public class DefaultIssueTypeManager
extends AbstractIssueConstantsManager<IssueType>
implements IssueTypeManager

Since:
v5.0

Field Summary
 
Fields inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
constantsManager, issueIndexManager, ofBizDelegator
 
Constructor Summary
DefaultIssueTypeManager(ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexManager issueIndexManager, TranslationManager translationManager, JiraAuthenticationContext jiraAuthenticationContext, ProjectManager projectManager, WorkflowManager workflowManager, FieldLayoutManager fieldLayoutManager, IssueTypeScreenSchemeManager issueTypeScreenSchemeManager, IssueTypeSchemeManager issueTypeSchemeManager, WorkflowSchemeManager workflowSchemeManager, FieldConfigSchemeManager fieldConfigSchemeManager, CustomFieldManager customFieldManager)
           
 
Method Summary
protected  void clearCaches()
           
 IssueType createIssueType(String name, String description, String iconUrl)
          Create a new (non-subtask) issue type.
 IssueType createSubTaskIssueType(String name, String description, String iconUrl)
          Create a new subtask issue type.
 void editIssueType(IssueType issueType, String name, String description, String iconUrl)
          Edits an existing issue type.
protected  List<IssueType> getAllValues()
           
 Collection<IssueType> getAvailableIssueTypes(IssueType issueType)
          Returns a collection of suitable alternative IssueTypes to which issues with the supplied issue type can be moved to.
protected  String getIssueConstantField()
           
 IssueType getIssueType(String id)
          Returns the IssueType for the specified id.
 Collection<IssueType> getIssueTypes()
          Returns all issue types regular and subtask issue types.
 void removeIssueType(String id, String newIssueTypeId)
          Removes an issue type.
 
Methods inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
createConstant, getMatchingIssues, getMaxSequenceNo, getNextStringId, moveDown, moveUp, postProcess, removeConstant, removePropertySet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIssueTypeManager

public DefaultIssueTypeManager(ConstantsManager constantsManager,
                               OfBizDelegator ofBizDelegator,
                               IssueIndexManager issueIndexManager,
                               TranslationManager translationManager,
                               JiraAuthenticationContext jiraAuthenticationContext,
                               ProjectManager projectManager,
                               WorkflowManager workflowManager,
                               FieldLayoutManager fieldLayoutManager,
                               IssueTypeScreenSchemeManager issueTypeScreenSchemeManager,
                               IssueTypeSchemeManager issueTypeSchemeManager,
                               WorkflowSchemeManager workflowSchemeManager,
                               FieldConfigSchemeManager fieldConfigSchemeManager,
                               CustomFieldManager customFieldManager)
Method Detail

createIssueType

public IssueType createIssueType(String name,
                                 String description,
                                 String iconUrl)
Description copied from interface: IssueTypeManager
Create a new (non-subtask) issue type. The new issue type will be added to the default issue type scheme.

Specified by:
createIssueType in interface IssueTypeManager
Parameters:
name - name of the issue type. Cannot be null or blank. Must be unique across issue types and subtask issue types.
description - description for the issue type.
iconUrl - icon URL for the issue type. Cannot be null or blank.
Returns:
the new IssueType

createSubTaskIssueType

public IssueType createSubTaskIssueType(String name,
                                        String description,
                                        String iconUrl)
Description copied from interface: IssueTypeManager
Create a new subtask issue type. The new issue type will be added to the default issue type scheme.

Specified by:
createSubTaskIssueType in interface IssueTypeManager
Parameters:
name - name of the issue type. Cannot be null or blank. Must be unique across issue types and subtask issue types.
description - description for the issue type.
iconUrl - icon URL for the issue type. Cannot be null or blank.
Returns:
the new IssueType

clearCaches

protected void clearCaches()
Overrides:
clearCaches in class AbstractIssueConstantsManager<IssueType>

editIssueType

public void editIssueType(IssueType issueType,
                          String name,
                          String description,
                          String iconUrl)
Description copied from interface: IssueTypeManager
Edits an existing issue type.

Specified by:
editIssueType in interface IssueTypeManager
Parameters:
issueType - existing issue type
name - new name. Cannot be null or blank. Must be unique across issue types and subtask issue types.
description - new description.
iconUrl - icon URL for the issue type. Cannot be null or blank.

getIssueTypes

public Collection<IssueType> getIssueTypes()
Description copied from interface: IssueTypeManager
Returns all issue types regular and subtask issue types.

Specified by:
getIssueTypes in interface IssueTypeManager
Returns:
a collection of IssueTypes

removeIssueType

public void removeIssueType(String id,
                            String newIssueTypeId)
Description copied from interface: IssueTypeManager
Removes an issue type. All issues which use this issue type will be migrated to a different issue type which is specified in the second argument.

Specified by:
removeIssueType in interface IssueTypeManager
Parameters:
id - id of the issue type to remove
newIssueTypeId - the id of the new issue type for all issues which are of the issue type which we are about to remove. Can be null.

getIssueType

public IssueType getIssueType(String id)
Description copied from interface: IssueTypeManager
Returns the IssueType for the specified id.

Specified by:
getIssueType in interface IssueTypeManager
Parameters:
id - issue type id.
Returns:
an IssueType

getAvailableIssueTypes

public Collection<IssueType> getAvailableIssueTypes(IssueType issueType)
Description copied from interface: IssueTypeManager
Returns a collection of suitable alternative IssueTypes to which issues with the supplied issue type can be moved to. The suitable alternative IssueTypes will have to use the same workflow, the same field configuration and the same screen scheme.

Specified by:
getAvailableIssueTypes in interface IssueTypeManager
Returns:
a collection of IssueTypes

getIssueConstantField

protected String getIssueConstantField()
Specified by:
getIssueConstantField in class AbstractIssueConstantsManager<IssueType>

getAllValues

protected List<IssueType> getAllValues()
Specified by:
getAllValues in class AbstractIssueConstantsManager<IssueType>


Copyright © 2002-2012 Atlassian. All Rights Reserved.