Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.lifecycle.impl
Class LifeCycleImpl

java.lang.Object
  extended by org.nuxeo.ecm.core.lifecycle.impl.LifeCycleImpl
All Implemented Interfaces:
LifeCycle

public class LifeCycleImpl
extends Object
implements LifeCycle

Life cycle implementation.

Author:
Julien Anguenot, Florent Guillaume
See Also:
LifeCycle

Constructor Summary
LifeCycleImpl(String name, String defaultInitialStateName, Collection<String> initialStateNames, Collection<LifeCycleState> states, Collection<LifeCycleTransition> transitions)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface LifeCycle

getInitialStateNames

public Collection<String> getInitialStateNames()
Description copied from interface: LifeCycle
Returns the list of allowed initial state names.

Specified by:
getInitialStateNames in interface LifeCycle

getName

public String getName()
Description copied from interface: LifeCycle
Gets the life cycle name.

Specified by:
getName in interface LifeCycle
Returns:
the life cycle name

getStates

public Collection<LifeCycleState> getStates()
Description copied from interface: LifeCycle
Returns the list of life cycle state instances.

Specified by:
getStates in 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 interface LifeCycle
Parameters:
stateName - the state name
Returns:
the life cycle state instance

getAllowedStateTransitionsFrom

public Collection<String> getAllowedStateTransitionsFrom(String stateName)
                                                  throws LifeCycleException
Description copied from interface: LifeCycle
Gets the allowed state transitions from a given state.

Specified by:
getAllowedStateTransitionsFrom in interface LifeCycle
Parameters:
stateName - the current state name
Returns:
collection of allowed state transition names.
Throws:
LifeCycleException

getTransitions

public Collection<LifeCycleTransition> getTransitions()
Description copied from interface: LifeCycle
Returns a list of life cycle transition instances.

Specified by:
getTransitions in interface LifeCycle
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 interface LifeCycle
Parameters:
transitionName - the transition name
Returns:
the life cycle transition instance

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.