Package com.atlassian.jira.config
Class DefaultResolutionManager
java.lang.Object
com.atlassian.jira.config.AbstractIssueConstantsManager<Resolution>
com.atlassian.jira.config.DefaultResolutionManager
- All Implemented Interfaces:
ResolutionManager
,Startable
public class DefaultResolutionManager
extends AbstractIssueConstantsManager<Resolution>
implements ResolutionManager, Startable
- Since:
- v5.0
-
Field Summary
Fields inherited from class com.atlassian.jira.config.AbstractIssueConstantsManager
constantsManager, issueIndexingService, issueManager, ofBizDelegator, queryDslAccessor
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultResolutionManager
(ConstantsManager constantsManager, IssueIndexingService issueIndexingService, OfBizDelegator ofBizDelegator, ApplicationProperties applicationProperties, IssueConstantFactory factory, com.atlassian.beehive.ClusterLockService clusterLockService, IssueManager issueManager, QueryDslAccessor queryDslAccessor, ResolutionAuditHandler resolutionAuditHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createResolution
(String name, String description) Adds a new resolution.void
editResolution
(Resolution resolution, String name, String description) Edits an existing resolution.findResolutions
(String substring) protected List<Resolution>
Returns the default resolution.protected String
getResolution
(String id) Returns a resolution with the specified id.getResolutionByName
(String name) Returns the resolution with the specified name.Return all resolutions.void
Move the resolution down in the order.void
Move the resolution up in the order.protected void
postProcess
(Resolution resolution) void
removeResolution
(String removedResolutionId, String replacementResolutionId) Removes a resolution with the specified id.void
setDefaultResolution
(String newDefaultResolutionId) Sets the default resolution.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
-
DefaultResolutionManager
public DefaultResolutionManager(ConstantsManager constantsManager, IssueIndexingService issueIndexingService, OfBizDelegator ofBizDelegator, ApplicationProperties applicationProperties, IssueConstantFactory factory, com.atlassian.beehive.ClusterLockService clusterLockService, IssueManager issueManager, QueryDslAccessor queryDslAccessor, ResolutionAuditHandler resolutionAuditHandler)
-
-
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. -
createResolution
Description copied from interface:ResolutionManager
Adds a new resolution. The new resolution must have a unique name.- Specified by:
createResolution
in interfaceResolutionManager
- Parameters:
name
- resolution name. Cannot be null or blank.description
- the resolution description. Can be null or blank.- Returns:
- the new
Resolution
.
-
editResolution
Description copied from interface:ResolutionManager
Edits an existing resolution.- Specified by:
editResolution
in interfaceResolutionManager
- Parameters:
resolution
- resolution to edit.name
- the new name.description
- the new description
-
getResolutions
Description copied from interface:ResolutionManager
Return all resolutions. The list is ordered by the sequence. The order can be modified by callingResolutionManager.moveResolutionDown(String)
orResolutionManager.moveResolutionUp(String)
.- Specified by:
getResolutions
in interfaceResolutionManager
- Returns:
- a list of
Resolution
s
-
removeResolution
Description copied from interface:ResolutionManager
Removes a resolution with the specified id. When removing a resolution all issues which have this resolution will have to be migrated to use a different resolution specified by the second argument.- Specified by:
removeResolution
in interfaceResolutionManager
- Parameters:
removedResolutionId
- resolution to remove.replacementResolutionId
- new resolution for issues which have the resolution which has been removed. Cannot be null.
-
getResolutionByName
Description copied from interface:ResolutionManager
Returns the resolution with the specified name. It is case insensitive.- Specified by:
getResolutionByName
in interfaceResolutionManager
- Parameters:
name
- the name of the resolution.- Returns:
- a
Resolution
with the specified name.
-
getResolution
Description copied from interface:ResolutionManager
Returns a resolution with the specified id.- Specified by:
getResolution
in interfaceResolutionManager
- Parameters:
id
- resolution id.- Returns:
- a
Resolution
with the specified id or null if no resolution whith this id exists.
-
moveResolutionUp
Description copied from interface:ResolutionManager
Move the resolution up in the order.- Specified by:
moveResolutionUp
in interfaceResolutionManager
- Parameters:
id
- id of the resolution.
-
moveResolutionDown
Description copied from interface:ResolutionManager
Move the resolution down in the order.- Specified by:
moveResolutionDown
in interfaceResolutionManager
- Parameters:
id
- id of the resolution.
-
setDefaultResolution
Description copied from interface:ResolutionManager
Sets the default resolution.You can pass null to clear the default.
- Specified by:
setDefaultResolution
in interfaceResolutionManager
- Parameters:
newDefaultResolutionId
- resolution id or null.
-
getDefaultResolution
Description copied from interface:ResolutionManager
Returns the default resolution.Will return null if no default is set.
- Specified by:
getDefaultResolution
in interfaceResolutionManager
- Returns:
- the default resolution.
-
findResolutions
- Specified by:
findResolutions
in interfaceResolutionManager
- Returns:
- the resolutions matching query or all resolutions if a provided query is empty
-
postProcess
- Overrides:
postProcess
in classAbstractIssueConstantsManager<Resolution>
-
clearCaches
protected void clearCaches()- Overrides:
clearCaches
in classAbstractIssueConstantsManager<Resolution>
-
getIssueConstantField
- Specified by:
getIssueConstantField
in classAbstractIssueConstantsManager<Resolution>
-
getAllValues
- Specified by:
getAllValues
in classAbstractIssueConstantsManager<Resolution>
-