Class LifeCycleImpl
- java.lang.Object
-
- org.nuxeo.ecm.core.lifecycle.impl.LifeCycleImpl
-
-
Constructor Summary
Constructors Constructor Description LifeCycleImpl(String name, String defaultInitialStateName, Collection<String> initialStateNames, Collection<LifeCycleState> states, Collection<LifeCycleTransition> transitions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>
getAllowedStateTransitionsFrom(String stateName)
Gets the allowed state transitions from a given state.String
getDefaultInitialStateName()
Returns the default initial state name.Collection<String>
getInitialStateNames()
Returns the list of allowed initial state names.String
getName()
Gets the life cycle name.LifeCycleState
getStateByName(String stateName)
Returns a life cycle state instance given its name.Collection<LifeCycleState>
getStates()
Returns the list of life cycle state instances.LifeCycleTransition
getTransitionByName(String transitionName)
Returns a life cycle transition instance given its name.Collection<LifeCycleTransition>
getTransitions()
Returns a list of life cycle transition instances.
-
-
-
Constructor Detail
-
LifeCycleImpl
public LifeCycleImpl(String name, String defaultInitialStateName, Collection<String> initialStateNames, Collection<LifeCycleState> states, Collection<LifeCycleTransition> transitions)
-
-
Method Detail
-
getDefaultInitialStateName
public String getDefaultInitialStateName()
Description copied from interface:LifeCycle
Returns the default initial state name.- Specified by:
getDefaultInitialStateName
in interfaceLifeCycle
-
getInitialStateNames
public Collection<String> getInitialStateNames()
Description copied from interface:LifeCycle
Returns the list of allowed initial state names.- Specified by:
getInitialStateNames
in interfaceLifeCycle
-
getName
public String getName()
Description copied from interface:LifeCycle
Gets the life cycle name.
-
getStates
public Collection<LifeCycleState> getStates()
Description copied from interface:LifeCycle
Returns the list of life cycle state instances.
-
getStateByName
public LifeCycleState getStateByName(String stateName)
Description copied from interface:LifeCycle
Returns a life cycle state instance given its name.- Specified by:
getStateByName
in interfaceLifeCycle
- Parameters:
stateName
- the state name- Returns:
- the life cycle state instance
-
getAllowedStateTransitionsFrom
public Collection<String> getAllowedStateTransitionsFrom(String stateName)
Description copied from interface:LifeCycle
Gets the allowed state transitions from a given state.- Specified by:
getAllowedStateTransitionsFrom
in interfaceLifeCycle
- Parameters:
stateName
- the current state name- Returns:
- collection of allowed state transition names.
-
getTransitions
public Collection<LifeCycleTransition> getTransitions()
Description copied from interface:LifeCycle
Returns a list of life cycle transition instances.- Specified by:
getTransitions
in interfaceLifeCycle
- Returns:
- a list of life cycle transition instances.
-
getTransitionByName
public LifeCycleTransition getTransitionByName(String transitionName)
Description copied from interface:LifeCycle
Returns a life cycle transition instance given its name.- Specified by:
getTransitionByName
in interfaceLifeCycle
- Parameters:
transitionName
- the transition name- Returns:
- the life cycle transition instance
-
-