public class DefaultIssueTypeManager extends AbstractIssueConstantsManager<IssueType> implements IssueTypeManager, Startable
constantsManager, issueIndexingService, issueManager, ofBizDelegator, queryDslAccessor
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearCaches() |
IssueType |
createIssueType(String name,
String description,
Long avatarId)
Create a new (non-subtask) issue type.
|
IssueType |
createIssueType(String name,
String description,
String iconUrl)
Create a new (non-subtask) issue type.
|
IssueType |
createSubTaskIssueType(String name,
String description,
Long avatarId)
Create a new 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
IssueType s 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.
|
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.
|
createConstant, getMaxSequenceNo, getNextStringId, moveDown, moveUp, postProcess, removeConstant, removePropertySet
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)
public void start()
Startable
public IssueType createIssueType(String name, String description, String iconUrl)
IssueTypeManager
createIssueType
in interface IssueTypeManager
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.IssueType
public IssueType createIssueType(String name, String description, @Nullable Long avatarId)
IssueTypeManager
After successful creation of the new issue type, this method publishes an instance of IssueTypeCreatedEvent
.
createIssueType
in interface IssueTypeManager
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.IssueType
public IssueType createSubTaskIssueType(String name, String description, String iconUrl)
IssueTypeManager
createSubTaskIssueType
in interface IssueTypeManager
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.IssueType
public IssueType createSubTaskIssueType(String name, String description, @Nullable Long avatarId)
IssueTypeManager
createSubTaskIssueType
in interface IssueTypeManager
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.IssueType
protected void clearCaches()
clearCaches
in class AbstractIssueConstantsManager<IssueType>
public void editIssueType(IssueType issueType, String name, String description, String iconUrl)
IssueTypeManager
editIssueType
in interface IssueTypeManager
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.public void updateIssueType(IssueType issueType, String name, String description, Long avatarId)
IssueTypeManager
IssueTypeUpdatedEvent
.updateIssueType
in interface IssueTypeManager
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.public Collection<IssueType> getIssueTypes()
IssueTypeManager
getIssueTypes
in interface IssueTypeManager
IssueType
spublic void removeIssueType(String id, String newIssueTypeId)
IssueTypeManager
IssueTypeDeletedEvent
.removeIssueType
in interface IssueTypeManager
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.public IssueType getIssueType(String id)
IssueTypeManager
IssueType
for the specified id.getIssueType
in interface IssueTypeManager
id
- issue type id.IssueType
public Collection<IssueType> getAvailableIssueTypes(IssueType issueType)
IssueTypeManager
IssueType
s to which issues with the supplied issue type can be moved to.
The suitable alternative IssueType
s will have to use the same workflow, the same field configuration and the same screen scheme.getAvailableIssueTypes
in interface IssueTypeManager
IssueType
spublic boolean hasAssociatedIssues(IssueType issueType)
IssueTypeManager
hasAssociatedIssues
in interface IssueTypeManager
issueType
- for which issues are searched.protected String getIssueConstantField()
getIssueConstantField
in class AbstractIssueConstantsManager<IssueType>
protected List<IssueType> getAllValues()
getAllValues
in class AbstractIssueConstantsManager<IssueType>
Copyright © 2002-2022 Atlassian. All Rights Reserved.