Package com.atlassian.jira.config
Class DefaultIssueTypeManager
java.lang.Object
com.atlassian.jira.config.AbstractIssueConstantsManager<IssueType>
com.atlassian.jira.config.DefaultIssueTypeManager
- All Implemented Interfaces:
IssueTypeManager,Startable
public class DefaultIssueTypeManager
extends AbstractIssueConstantsManager<IssueType>
implements IssueTypeManager, Startable
- Since:
- v5.0
-
Field Summary
Fields inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
constantsManager, issueIndexingService, issueManager, ofBizDelegator, queryDslAccessor -
Constructor Summary
ConstructorsConstructorDescriptionDefaultIssueTypeManager(ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexingService issueIndexingService, ProjectManager projectManager, WorkflowManager workflowManager, FieldLayoutManager fieldLayoutManager, IssueTypeScreenSchemeManager issueTypeScreenSchemeManager, IssueTypeSchemeManager issueTypeSchemeManager, WorkflowSchemeManager workflowSchemeManager, FieldConfigSchemeManager fieldConfigSchemeManager, CustomFieldManager customFieldManager, com.atlassian.event.api.EventPublisher eventPublisher, IssueConstantFactory factory, com.atlassian.beehive.ClusterLockService clusterLockService, IssueManager issueManager, QueryDslAccessor queryDslAccessor, IssueTypeAuditHandler auditHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateIssueType(String name, String description, Long avatarId) Create a new (non-subtask) issue type.createIssueType(String name, String description, String iconUrl) Create a new (non-subtask) issue type.createSubTaskIssueType(String name, String description, Long avatarId) Create a new subtask issue type.createSubTaskIssueType(String name, String description, String iconUrl) Create a new subtask issue type.voideditIssueType(IssueType issueType, String name, String description, String iconUrl) Edits an existing issue type.getAvailableIssueTypes(IssueType issueType) Returns a collection of suitable alternativeIssueTypes to which issues with the supplied issue type can be moved to.protected StringgetIssueType(String id) Returns theIssueTypefor the specified id.Returns all issue types regular and subtask issue types.booleanhasAssociatedIssues(IssueType issueType) Checks if there are any issues associated with this issue type.voidremoveIssueType(String id, String newIssueTypeId) Removes an issue type.voidstart()This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.voidupdateIssueType(IssueType issueType, String name, String description, Long avatarId) Edits an existing issue type.Methods inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
createConstant, getMaxSequenceNo, getNextStringId, moveDown, moveUp, postProcess, removeConstant, removePropertySet
-
Constructor Details
-
DefaultIssueTypeManager
public DefaultIssueTypeManager(ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexingService issueIndexingService, ProjectManager projectManager, WorkflowManager workflowManager, FieldLayoutManager fieldLayoutManager, IssueTypeScreenSchemeManager issueTypeScreenSchemeManager, IssueTypeSchemeManager issueTypeSchemeManager, WorkflowSchemeManager workflowSchemeManager, FieldConfigSchemeManager fieldConfigSchemeManager, CustomFieldManager customFieldManager, com.atlassian.event.api.EventPublisher eventPublisher, IssueConstantFactory factory, com.atlassian.beehive.ClusterLockService clusterLockService, IssueManager issueManager, QueryDslAccessor queryDslAccessor, IssueTypeAuditHandler auditHandler)
-
-
Method Details
-
start
public void start()Description copied from interface:StartableThis method will be called after the plugin system is fully initialised and all components added to the dependency injection framework. -
createIssueType
Description copied from interface:IssueTypeManagerCreate a new (non-subtask) issue type. The new issue type will be added to the default issue type scheme.- Specified by:
createIssueTypein interfaceIssueTypeManager- 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
-
createIssueType
Description copied from interface:IssueTypeManagerCreate 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.- Specified by:
createIssueTypein interfaceIssueTypeManager- 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:
- the new
IssueType
-
createSubTaskIssueType
Description copied from interface:IssueTypeManagerCreate a new subtask issue type. The new issue type will be added to the default issue type scheme.- Specified by:
createSubTaskIssueTypein interfaceIssueTypeManager- 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
Description copied from interface:IssueTypeManagerCreate a new subtask issue type. The new issue type will be added to the default issue type scheme.- Specified by:
createSubTaskIssueTypein interfaceIssueTypeManager- 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:
- the new
IssueType
-
clearCaches
protected void clearCaches()- Overrides:
clearCachesin classAbstractIssueConstantsManager<IssueType>
-
editIssueType
Description copied from interface:IssueTypeManagerEdits an existing issue type.- Specified by:
editIssueTypein interfaceIssueTypeManager- Parameters:
issueType- existing issue typename- 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.
-
updateIssueType
Description copied from interface:IssueTypeManagerEdits an existing issue type. After successful update of an issue type, this method publishes an instance ofIssueTypeUpdatedEvent.- Specified by:
updateIssueTypein interfaceIssueTypeManager- Parameters:
issueType- existing issue typename- 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.
-
getIssueTypes
Description copied from interface:IssueTypeManagerReturns all issue types regular and subtask issue types.- Specified by:
getIssueTypesin interfaceIssueTypeManager- Returns:
- a collection of
IssueTypes
-
removeIssueType
Description copied from interface:IssueTypeManagerRemoves 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 ofIssueTypeDeletedEvent.- Specified by:
removeIssueTypein interfaceIssueTypeManager- Parameters:
id- id of the issue type to removenewIssueTypeId- 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
Description copied from interface:IssueTypeManagerReturns theIssueTypefor the specified id.- Specified by:
getIssueTypein interfaceIssueTypeManager- Parameters:
id- issue type id.- Returns:
- an
IssueType
-
getAvailableIssueTypes
Description copied from interface:IssueTypeManagerReturns a collection of suitable alternativeIssueTypes to which issues with the supplied issue type can be moved to. The suitable alternativeIssueTypes will have to use the same workflow, the same field configuration and the same screen scheme.- Specified by:
getAvailableIssueTypesin interfaceIssueTypeManager- Parameters:
issueType-- Returns:
- a collection of
IssueTypes
-
hasAssociatedIssues
Description copied from interface:IssueTypeManagerChecks if there are any issues associated with this issue type.- Specified by:
hasAssociatedIssuesin interfaceIssueTypeManager- Parameters:
issueType- for which issues are searched.- Returns:
- true if the issue type has any associated issues.
-
getIssueConstantField
- Specified by:
getIssueConstantFieldin classAbstractIssueConstantsManager<IssueType>
-
getAllValues
- Specified by:
getAllValuesin classAbstractIssueConstantsManager<IssueType>
-