Package com.atlassian.jira.config
Interface ResolutionManager
- All Known Implementing Classes:
DefaultResolutionManager
@PublicApi
public interface ResolutionManager
Manager for
Resolution
s.- Since:
- v5.0
-
Method Summary
Modifier and TypeMethodDescriptioncreateResolution
(String name, String description) Adds a new resolution.void
editResolution
(Resolution resolution, String name, String description) Edits an existing resolution.findResolutions
(String query) Returns the default resolution.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.void
removeResolution
(String resolutionId, String newResolutionId) Removes a resolution with the specified id.void
Sets the default resolution.
-
Method Details
-
createResolution
Adds a new resolution. The new resolution must have a unique name.- Parameters:
name
- resolution name. Cannot be null or blank.description
- the resolution description. Can be null or blank.- Returns:
- the new
Resolution
.
-
editResolution
Edits an existing resolution.- Parameters:
resolution
- resolution to edit.name
- the new name.description
- the new description
-
getResolutions
List<Resolution> getResolutions()Return all resolutions. The list is ordered by the sequence. The order can be modified by callingmoveResolutionDown(String)
ormoveResolutionUp(String)
.- Returns:
- a list of
Resolution
s
-
removeResolution
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.- Parameters:
resolutionId
- resolution to remove.newResolutionId
- new resolution for issues which have the resolution which has been removed. Cannot be null.
-
getResolutionByName
Returns the resolution with the specified name. It is case insensitive.- Parameters:
name
- the name of the resolution.- Returns:
- a
Resolution
with the specified name.
-
getResolution
Returns a resolution with the specified id.- Parameters:
id
- resolution id.- Returns:
- a
Resolution
with the specified id or null if no resolution whith this id exists.
-
moveResolutionUp
Move the resolution up in the order.- Parameters:
id
- id of the resolution.
-
moveResolutionDown
Move the resolution down in the order.- Parameters:
id
- id of the resolution.
-
setDefaultResolution
Sets the default resolution.You can pass null to clear the default.
- Parameters:
id
- resolution id or null.
-
getDefaultResolution
Resolution getDefaultResolution()Returns the default resolution.Will return null if no default is set.
- Returns:
- the default resolution.
-
findResolutions
- Returns:
- the resolutions matching query or all resolutions if a provided query is empty
-