public class

DefaultIssueTypeManager

extends AbstractIssueConstantsManager<T extends IssueConstant>
implements IssueTypeManager Startable
java.lang.Object
   ↳ com.atlassian.jira.config.AbstractIssueConstantsManager<T extends com.atlassian.jira.issue.IssueConstant>
     ↳ com.atlassian.jira.config.DefaultIssueTypeManager

Summary

[Expand]
Inherited Fields
From class com.atlassian.jira.config.AbstractIssueConstantsManager
Public Constructors
DefaultIssueTypeManager(ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexManager issueIndexManager, ProjectManager projectManager, WorkflowManager workflowManager, FieldLayoutManager fieldLayoutManager, IssueTypeScreenSchemeManager issueTypeScreenSchemeManager, IssueTypeSchemeManager issueTypeSchemeManager, WorkflowSchemeManager workflowSchemeManager, FieldConfigSchemeManager fieldConfigSchemeManager, CustomFieldManager customFieldManager, EventPublisher eventPublisher, IssueConstantFactory factory, ClusterLockService clusterLockService)
Public Methods
IssueType createIssueType(String name, String description, String iconUrl)
Create a new (non-subtask) issue type.
synchronized IssueType createIssueType(String name, String description, Long avatarId)
Create a new (non-subtask) issue type.
synchronized IssueType createSubTaskIssueType(String name, String description, String iconUrl)
Create a new subtask issue type.
IssueType createSubTaskIssueType(String name, String description, Long avatarId)
Create a new subtask issue type.
void editIssueType(IssueType issueType, String name, String description, String iconUrl)
Edits an existing issue type.
Collection<IssueType> getAvailableIssueTypes(IssueType issueType)
Returns a collection of suitable alternative IssueTypes to which issues with the supplied issue type can be moved to.
IssueType getIssueType(String id)
Returns the IssueType for the specified id.
Collection<IssueType> getIssueTypes()
Returns all issue types regular and subtask issue types.
boolean hasAssociatedIssues(IssueType issueType)
Checks if there are any issues associated with this issue type.
void removeIssueType(String id, String newIssueTypeId)
Removes an issue type.
void start()
This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
void updateIssueType(IssueType issueType, String name, String description, Long avatarId)
Edits an existing issue type.
Protected Methods
void clearCaches()
List<IssueType> getAllValues()
String getIssueConstantField()
[Expand]
Inherited Methods
From class com.atlassian.jira.config.AbstractIssueConstantsManager
From class java.lang.Object
From interface com.atlassian.jira.config.IssueTypeManager
From interface com.atlassian.jira.extension.Startable

Public Constructors

public DefaultIssueTypeManager (ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexManager issueIndexManager, ProjectManager projectManager, WorkflowManager workflowManager, FieldLayoutManager fieldLayoutManager, IssueTypeScreenSchemeManager issueTypeScreenSchemeManager, IssueTypeSchemeManager issueTypeSchemeManager, WorkflowSchemeManager workflowSchemeManager, FieldConfigSchemeManager fieldConfigSchemeManager, CustomFieldManager customFieldManager, EventPublisher eventPublisher, IssueConstantFactory factory, ClusterLockService clusterLockService)

Public Methods

public IssueType createIssueType (String name, String description, String iconUrl)

Create a new (non-subtask) issue type. The new issue type will be added to the default issue type scheme.

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

public synchronized IssueType createIssueType (String name, String description, Long avatarId)

Create a new (non-subtask) issue type. The new issue type will be added to the default issue type scheme.

After successful creation of the new issue type, this method publishes an instance of IssueTypeCreatedEvent.

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.
avatarId avatarId for the issue type. Cannot by null.
Returns

public synchronized IssueType createSubTaskIssueType (String name, String description, String iconUrl)

Create a new subtask issue type. The new issue type will be added to the default issue type scheme.

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

public IssueType createSubTaskIssueType (String name, String description, Long avatarId)

Create a new subtask issue type. The new issue type will be added to the default issue type scheme.

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.
avatarId avatarId for the issue type. Cannot by null.
Returns

public void editIssueType (IssueType issueType, String name, String description, String iconUrl)

Edits an existing issue type.

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.

public Collection<IssueType> getAvailableIssueTypes (IssueType issueType)

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.

Returns

public IssueType getIssueType (String id)

Returns the IssueType for the specified id.

Parameters
id issue type id.
Returns

public Collection<IssueType> getIssueTypes ()

Returns all issue types regular and subtask issue types.

Returns

public boolean hasAssociatedIssues (IssueType issueType)

Checks if there are any issues associated with this issue type.

Parameters
issueType for which issues are searched.
Returns
  • true if the issue type has any associated issues.

public void removeIssueType (String id, String newIssueTypeId)

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. After successful removal of an issue type, this method publishes an instance of IssueTypeDeletedEvent.

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.

public void start ()

This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.

public void updateIssueType (IssueType issueType, String name, String description, Long avatarId)

Edits an existing issue type. After successful update of an issue type, this method publishes an instance of IssueTypeUpdatedEvent.

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.
avatarId avatar id the issue type. Cannot be null or blank.

Protected Methods

protected void clearCaches ()

protected List<IssueType> getAllValues ()

protected String getIssueConstantField ()