© 2005 BEA Systems, Inc.

com.beasys.commerce.foundation
Interface State

All Superinterfaces:
Belonging, BusinessSmartComponent, Cloneable, Comparable, Serializable
All Known Implementing Classes:
StateImpl

public interface State
extends Belonging

Represents a discrete state in a state machine or workflow. It is contained by a StateMachine and refered to by Transitions A name that identifies the state uniquely within the context of a state machine.

                  name
 [State] <*>------> [java.lang.String] 

 

See Also:
StateHome, StateImpl

Method Summary
 void enter(Transition trans)
          This method is invoked whenever the state is entered.
 void error(Transition trans)
          This method is invoked whenever the state is transitioned from in erro.
 void exit(Transition trans)
          This method is invoked whenever the state is transitioned from.
 TransitionPolicy getEnterPolicy()
          Get the transition policy that is invoked when the state is entered.
 TransitionPolicy getErrorPolicy()
          Set the transition policy that is invoked when the state is exited with an invalid transition.
 TransitionPolicy getExitPolicy()
          Get the transition policy that is invoked when the state is exited.
 String getName()
          Get the value of name
 void setEnterPolicy(TransitionPolicy policy)
          Set a transition policy that is invoked when the state is entered.
 void setErrorPolicy(TransitionPolicy policy)
          Set a transition policy that is invoked when the state is exited with an invalid transition.
 void setExitPolicy(TransitionPolicy policy)
          Set a transition policy that is invoked when the state is exited.
 void setName(String name)
          Set the value of name
 
Methods inherited from interface com.beasys.commerce.foundation.Belonging
clone, equals, interfaceName, setByValue, value
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

enter

public void enter(Transition trans)
This method is invoked whenever the state is entered. It searches for an enter policy and invokes it.


error

public void error(Transition trans)
This method is invoked whenever the state is transitioned from in erro. It searches for an Error Policy and invokes it if present


exit

public void exit(Transition trans)
This method is invoked whenever the state is transitioned from. It searches for an Exit Policy and invokes it if present.


getEnterPolicy

public TransitionPolicy getEnterPolicy()
Get the transition policy that is invoked when the state is entered.


getErrorPolicy

public TransitionPolicy getErrorPolicy()
Set the transition policy that is invoked when the state is exited with an invalid transition.


getExitPolicy

public TransitionPolicy getExitPolicy()
Get the transition policy that is invoked when the state is exited.


getName

public String getName()
Get the value of name

Returns:
name.

setEnterPolicy

public void setEnterPolicy(TransitionPolicy policy)
Set a transition policy that is invoked when the state is entered.


setErrorPolicy

public void setErrorPolicy(TransitionPolicy policy)
Set a transition policy that is invoked when the state is exited with an invalid transition.


setExitPolicy

public void setExitPolicy(TransitionPolicy policy)
Set a transition policy that is invoked when the state is exited.


setName

public void setName(String name)
Set the value of name


© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved