|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.beasys.commerce.foundation.StateMachine
@Deprecated public class StateMachine
This is the reference implemenation of a Workflow object. It provides a simple implemenation based on a set of states and transitions.
Workflow
,
Serialized FormField Summary | |
---|---|
protected State |
currentState
Deprecated |
protected State |
initialState
Deprecated |
protected TreeSet |
states
Deprecated |
protected String |
TRANSITION_KEY_TOKEN
Deprecated |
protected TreeMap |
transitions
Deprecated |
Constructor Summary | |
---|---|
StateMachine()
Deprecated Use WorkflowHome.create("com.beasys.commerce.foundation.StateMachine") to instantiate the workflow. |
Method Summary | |
---|---|
protected void |
addTransition(Transition t)
Deprecated |
String |
doTransition(String transitionName)
Deprecated Given the name of the transition, perform the transition and return the new state. |
WorkflowContext |
getContext()
Deprecated Get the context of the Workflow. |
String |
getCurrentStateName()
Deprecated Get the name of the current state |
String |
getInitialStateName()
Deprecated Get the name of the initial state |
String[] |
getOutgoingTransitions(String state)
Deprecated Given the name of the state, return all transitions starting from that state |
String[] |
getStateNames()
Deprecated Get all State names in an array of Strings. |
String[] |
getTransitionNames()
Deprecated Get all transition names in an array of Strings. |
String |
lookAheadTransition(String transition)
Deprecated Given the name of the transition, look ahead the transition and return the predicted new state. |
void |
reset()
Deprecated Reset the current workflow state to the initial state |
void |
setContext(WorkflowContext workflowContext)
Deprecated Set the new context for the underlying workflow engine. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String TRANSITION_KEY_TOKEN
protected State currentState
protected State initialState
protected TreeMap transitions
protected TreeSet states
Constructor Detail |
---|
public StateMachine()
Method Detail |
---|
public String doTransition(String transitionName) throws IllegalWorkflowTransitionException
doTransition
in interface Workflow
transition
- the name of the transition to be performed
IllegalWorkflowTransitionException
- if the transition is invalidpublic WorkflowContext getContext()
getContext
in interface Workflow
public String getCurrentStateName()
getCurrentStateName
in interface Workflow
public String getInitialStateName()
getInitialStateName
in interface Workflow
public String[] getStateNames()
getStateNames
in interface Workflow
public String[] getTransitionNames()
getTransitionNames
in interface Workflow
public String lookAheadTransition(String transition) throws IllegalWorkflowTransitionException
lookAheadTransition
in interface Workflow
transition
- the name of the transition to be performed
IllegalWorkflowTransitionException
- if the transition is invalidpublic String[] getOutgoingTransitions(String state) throws IllegalWorkflowTransitionException
getOutgoingTransitions
in interface Workflow
state
- the name of the state
IllegalWorkflowTransitionException
- if the transition is invalidpublic void reset()
reset
in interface Workflow
public void setContext(WorkflowContext workflowContext)
setContext
in interface Workflow
WorkflowContext
- the new context for the underlying workflow engine.protected void addTransition(Transition t)
|
Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |