Class SprintManagerImpl
java.lang.Object
com.atlassian.greenhopper.service.sprint.SprintManagerImpl
- All Implemented Interfaces:
GreenHopperCache
,SprintManager
Implementation of SprintManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSprint
(Sprint sprint) Create a sprint given the objectcreateSprint
(Map<String, Object> fields) Create a sprint given the fieldsdeleteSprint
(Sprint sprint) Delete a sprintvoid
Invoked when all caches in the plugin need to be cleared.Get all sprintsReturns sprints in the given state managed by the auto start/stop sprints functionality.getSprint
(long id) Get a sprint given its id.getSprints
(EnumSet<Sprint.State> states) Collects all sprints with the given statesgetSprintsByNameAndState
(String searchQuery, EnumSet<Sprint.State> states) getSprintsByNameAndStateAndRapidViews
(String searchQuery, EnumSet<Sprint.State> states, Set<Long> rapidViewIds) getSprintsForView
(RapidView rapidView) Get all sprints owned by the passed rapid viewgetSprintsForView
(Long rapidViewId, EnumSet<Sprint.State> states) Collects all sprints owned by the passed rapid view with one of the given statesgetSprintStateAuditLog
(Sprint sprint) Gets the audit log data for a sprintvoid
init()
logStateChange
(Sprint updatedSprint, com.atlassian.jira.user.ApplicationUser user) Create an AuditEntry log for a user who is opening/closing a sprint as part of a sprint updateswapSprints
(Sprint sprintA, Sprint sprintB) Swap the sequence of the two sprint objects.updateSprint
(Sprint sprint) Update a sprint
-
Constructor Details
-
SprintManagerImpl
public SprintManagerImpl()
-
-
Method Details
-
init
@PostConstruct public void init() -
getSprint
Description copied from interface:SprintManager
Get a sprint given its id.- Specified by:
getSprint
in interfaceSprintManager
-
getAllSprints
Description copied from interface:SprintManager
Get all sprints- Specified by:
getAllSprints
in interfaceSprintManager
-
getAllSprintIdsByState
- Specified by:
getAllSprintIdsByState
in interfaceSprintManager
-
getSprints
Description copied from interface:SprintManager
Collects all sprints with the given states- Specified by:
getSprints
in interfaceSprintManager
- Parameters:
states
- the states to include- Returns:
- a set of sprints
-
getSprintsForView
Description copied from interface:SprintManager
Get all sprints owned by the passed rapid view- Specified by:
getSprintsForView
in interfaceSprintManager
-
getSprintsForView
@Nonnull public ServiceOutcome<Collection<Sprint>> getSprintsForView(Long rapidViewId, EnumSet<Sprint.State> states) Description copied from interface:SprintManager
Collects all sprints owned by the passed rapid view with one of the given states- Specified by:
getSprintsForView
in interfaceSprintManager
-
createSprint
Description copied from interface:SprintManager
Create a sprint given the object- Specified by:
createSprint
in interfaceSprintManager
-
createSprint
Description copied from interface:SprintManager
Create a sprint given the fields- Specified by:
createSprint
in interfaceSprintManager
-
updateSprint
Description copied from interface:SprintManager
Update a sprint- Specified by:
updateSprint
in interfaceSprintManager
-
swapSprints
Description copied from interface:SprintManager
Swap the sequence of the two sprint objects.- Specified by:
swapSprints
in interfaceSprintManager
- Parameters:
sprintA
- the first sprintsprintB
- the other sprint- Returns:
- outcome of the operation
-
logStateChange
@Nonnull public ServiceResult logStateChange(Sprint updatedSprint, com.atlassian.jira.user.ApplicationUser user) Create an AuditEntry log for a user who is opening/closing a sprint as part of a sprint update- Specified by:
logStateChange
in interfaceSprintManager
- Parameters:
updatedSprint
- the sprint being opened/closeduser
- the user who performed the change
-
getSprintStateAuditLog
Description copied from interface:SprintManager
Gets the audit log data for a sprint- Specified by:
getSprintStateAuditLog
in interfaceSprintManager
-
deleteSprint
Description copied from interface:SprintManager
Delete a sprint- Specified by:
deleteSprint
in interfaceSprintManager
-
unmapAllSprints
- Specified by:
unmapAllSprints
in interfaceSprintManager
-
getSprintsByNameAndState
@Nonnull public ServiceOutcome<Collection<Sprint>> getSprintsByNameAndState(String searchQuery, EnumSet<Sprint.State> states) - Specified by:
getSprintsByNameAndState
in interfaceSprintManager
-
getAutoStartStopSprintsByState
@Nonnull public ServiceOutcome<Collection<Sprint>> getAutoStartStopSprintsByState(@Nonnull Sprint.State state) Description copied from interface:SprintManager
Returns sprints in the given state managed by the auto start/stop sprints functionality.- Specified by:
getAutoStartStopSprintsByState
in interfaceSprintManager
- Parameters:
state
- state of sprints- Returns:
- a collection of sprints
-
flushCache
public void flushCache()Description copied from interface:GreenHopperCache
Invoked when all caches in the plugin need to be cleared.- Specified by:
flushCache
in interfaceGreenHopperCache
-
getSprintsByNameAndStateAndRapidViews
@Nonnull public ServiceOutcome<Collection<Sprint>> getSprintsByNameAndStateAndRapidViews(String searchQuery, EnumSet<Sprint.State> states, Set<Long> rapidViewIds) - Specified by:
getSprintsByNameAndStateAndRapidViews
in interfaceSprintManager
-