Package com.atlassian.jira.config
Class DefaultPriorityManager
java.lang.Object
com.atlassian.jira.config.AbstractIssueConstantsManager<Priority>
com.atlassian.jira.config.DefaultPriorityManager
- All Implemented Interfaces:
PriorityManager
,Startable
public class DefaultPriorityManager
extends AbstractIssueConstantsManager<Priority>
implements PriorityManager, Startable
- Since:
- v5.0
-
Field Summary
Fields inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
constantsManager, issueIndexingService, issueManager, ofBizDelegator, queryDslAccessor
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPriorityManager
(ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexingService issueIndexingService, ApplicationProperties applicationProperties, IssueConstantFactory issueConstantFactory, com.atlassian.beehive.ClusterLockService clusterLockService, IssueManager issueManager, QueryDslAccessor queryDslAccessor, PrioritySchemeManager prioritySchemeManager, com.atlassian.event.api.EventPublisher eventPublisher, I18nHelper i18nHelper, ProjectManager projectManager, PrioritySchemeUtil prioritySchemeUtil) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createPriority
(String name, String description, String iconUrl, String color) Create a new priority.void
Edit an existing priority.findPriorities
(String substring, Set<Long> projectIds) Returns priorities whose names start with or fully match given substring.Returns the default priority.protected String
Returns all priorities.getPriority
(String id) Returns a priority.void
Move the resolution down in the order.void
movePriorityUp
(String id) Move the resolution up in the order.protected void
postProcess
(Priority priority) void
removePriority
(String id, String newPriorityId) Removes a priority.void
Sets the default priority.void
start()
This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.Methods inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
createConstant, getMaxSequenceNo, getNextStringId, moveDown, moveUp, removeConstant, removePropertySet
-
Constructor Details
-
DefaultPriorityManager
public DefaultPriorityManager(ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, IssueIndexingService issueIndexingService, ApplicationProperties applicationProperties, IssueConstantFactory issueConstantFactory, com.atlassian.beehive.ClusterLockService clusterLockService, IssueManager issueManager, QueryDslAccessor queryDslAccessor, PrioritySchemeManager prioritySchemeManager, com.atlassian.event.api.EventPublisher eventPublisher, I18nHelper i18nHelper, ProjectManager projectManager, PrioritySchemeUtil prioritySchemeUtil)
-
-
Method Details
-
start
public void start()Description copied from interface:Startable
This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework. -
createPriority
Description copied from interface:PriorityManager
Create a new priority. Newly added priority will be added to default priority scheme.- Specified by:
createPriority
in interfacePriorityManager
- Parameters:
name
- name of the priority. Cannot be blank or null. Must be unique.description
- description of the priorityiconUrl
- icon url of the prioritycolor
- color for the priority.- Returns:
- the new
Priority
-
editPriority
public void editPriority(Priority priority, String name, String description, String iconUrl, String color) Description copied from interface:PriorityManager
Edit an existing priority.- Specified by:
editPriority
in interfacePriorityManager
- Parameters:
priority
- existing priority.name
- name of the prioritydescription
- description of the priorityiconUrl
- icon Url of the prioritycolor
- color of the priority
-
getPriorities
Description copied from interface:PriorityManager
Returns all priorities. Sorted by sequence. The order can be modified by callingPriorityManager.movePriorityDown(String)
orPriorityManager.movePriorityUp(String)
- Specified by:
getPriorities
in interfacePriorityManager
- Returns:
- a List of
Priority
-
removePriority
Description copied from interface:PriorityManager
Removes a priority. When removing the priority it will change the priority of all issues which have the priority that has been deleted to the priority with id specified as the second argument. Priority will be also removed from all priority schemes.- Specified by:
removePriority
in interfacePriorityManager
- Parameters:
id
- priority id to remove.newPriorityId
- priority to use for all issues which have the priority which has been removed. Cannot be null.
-
getPriority
Description copied from interface:PriorityManager
Returns a priority.- Specified by:
getPriority
in interfacePriorityManager
- Parameters:
id
- priority id- Returns:
- a
Priority
or null if no priority with the specified id could be found.
-
setDefaultPriority
Description copied from interface:PriorityManager
Sets the default priority.- Specified by:
setDefaultPriority
in interfacePriorityManager
- Parameters:
id
- priority id
-
getDefaultPriority
Description copied from interface:PriorityManager
Returns the default priority.- Specified by:
getDefaultPriority
in interfacePriorityManager
- Returns:
- the default
Priority
or if none configured null.
-
movePriorityUp
Description copied from interface:PriorityManager
Move the resolution up in the order.- Specified by:
movePriorityUp
in interfacePriorityManager
- Parameters:
id
- id of the resolution.
-
movePriorityDown
Description copied from interface:PriorityManager
Move the resolution down in the order.- Specified by:
movePriorityDown
in interfacePriorityManager
- Parameters:
id
- id of the resolution.
-
getValues
-
postProcess
- Overrides:
postProcess
in classAbstractIssueConstantsManager<Priority>
-
clearCaches
protected void clearCaches()- Overrides:
clearCaches
in classAbstractIssueConstantsManager<Priority>
-
getIssueConstantField
- Specified by:
getIssueConstantField
in classAbstractIssueConstantsManager<Priority>
-
getAllValues
- Specified by:
getAllValues
in classAbstractIssueConstantsManager<Priority>
-
findPriorities
Description copied from interface:PriorityManager
Returns priorities whose names start with or fully match given substring.- Specified by:
findPriorities
in interfacePriorityManager
- Parameters:
substring
- the string that priority names will be matched withprojectIds
- the set of project ids to filter priorities
-