Interface LifeCycle<T>
-
- Type Parameters:
T- defines the type of data managed through this life cycle
public interface LifeCycle<T>Complete life cycle that can be applied to work items. It defines set of phases and allow to get access to each of them by id.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tdata(WorkItem workItem)Returns current data set for given work itemLifeCyclePhasephaseById(String phaseId)Returns phase by its id if exists.Collection<LifeCyclePhase>phases()Returns all phases associated with this life cycleTtransitionTo(WorkItem workItem, WorkItemManager manager, Transition<T> transition)Perform actual transition to the target phase defined via given transition
-
-
-
Method Detail
-
phaseById
LifeCyclePhase phaseById(String phaseId)
Returns phase by its id if exists.- Parameters:
phaseId- phase id to be used for look up- Returns:
- life cycle phase if exists otherwise null
-
phases
Collection<LifeCyclePhase> phases()
Returns all phases associated with this life cycle- Returns:
- list of phases
-
transitionTo
T transitionTo(WorkItem workItem, WorkItemManager manager, Transition<T> transition)
Perform actual transition to the target phase defined via given transition- Parameters:
workItem- work item that is being transitionedmanager- work item manager for given work itemtransition- actual transition- Returns:
- returns work item data after the transition
-
-