Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.lenya.workflow.impl
Class WorkflowImpl  view WorkflowImpl download WorkflowImpl.java

java.lang.Object
  extended byorg.apache.lenya.workflow.impl.WorkflowImpl
All Implemented Interfaces:
org.apache.lenya.workflow.Workflow

public class WorkflowImpl
extends java.lang.Object
implements org.apache.lenya.workflow.Workflow

Implementation of a workflow schema.


Field Summary
private  java.util.Map events
           
private  org.apache.lenya.workflow.State initialState
           
private  java.util.Map states
           
private  java.util.Set transitions
           
private  java.util.Map variables
           
 
Fields inherited from interface org.apache.lenya.workflow.Workflow
DEFAULT_PREFIX, NAMESPACE
 
Constructor Summary
protected WorkflowImpl(StateImpl initialState)
          Creates a new instance of WorkflowImpl.
 
Method Summary
protected  void addEvent(EventImpl event)
          Adds an event.
private  void addState(StateImpl state)
          Adds a state.
protected  void addTransition(TransitionImpl transition)
          Adds a transition.
protected  void addVariable(BooleanVariableImpl variable)
          Adds a variable.
protected  boolean containsState(org.apache.lenya.workflow.State state)
          Checks if this workflow contains a state.
protected  org.apache.lenya.workflow.State getDestination(org.apache.lenya.workflow.Transition transition)
          Returns the destination state of a transition.
 EventImpl getEvent(java.lang.String name)
          Returns the event for a certain event name.
 org.apache.lenya.workflow.State getInitialState()
          Returns the initial state of this workflow.
 org.apache.lenya.workflow.Transition[] getLeavingTransitions(org.apache.lenya.workflow.State state)
          Returns the transitions that leave a state.
protected  StateImpl getState(java.lang.String name)
          Returns the state with a certain name.
protected  StateImpl[] getStates()
          Returns the states.
protected  TransitionImpl[] getTransitions()
          Returns the transitions.
 BooleanVariableImpl getVariable(java.lang.String name)
          Returns the variable for a certain name.
 java.lang.String[] getVariableNames()
          Returns the variable names.
protected  BooleanVariableImpl[] getVariables()
          Returns the variables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialState

private org.apache.lenya.workflow.State initialState

transitions

private java.util.Set transitions

states

private java.util.Map states

events

private java.util.Map events

variables

private java.util.Map variables
Constructor Detail

WorkflowImpl

protected WorkflowImpl(StateImpl initialState)
Creates a new instance of WorkflowImpl.

Method Detail

getInitialState

public org.apache.lenya.workflow.State getInitialState()
Returns the initial state of this workflow.

Specified by:
getInitialState in interface org.apache.lenya.workflow.Workflow

addState

private void addState(StateImpl state)
Adds a state.


addTransition

protected void addTransition(TransitionImpl transition)
Adds a transition.


getTransitions

protected TransitionImpl[] getTransitions()
Returns the transitions.


getDestination

protected org.apache.lenya.workflow.State getDestination(org.apache.lenya.workflow.Transition transition)
Returns the destination state of a transition.


getLeavingTransitions

public org.apache.lenya.workflow.Transition[] getLeavingTransitions(org.apache.lenya.workflow.State state)
Returns the transitions that leave a state.

Specified by:
getLeavingTransitions in interface org.apache.lenya.workflow.Workflow

containsState

protected boolean containsState(org.apache.lenya.workflow.State state)
Checks if this workflow contains a state.


getStates

protected StateImpl[] getStates()
Returns the states.


getState

protected StateImpl getState(java.lang.String name)
                      throws org.apache.lenya.workflow.WorkflowException
Returns the state with a certain name.


addEvent

protected void addEvent(EventImpl event)
Adds an event.


getEvent

public EventImpl getEvent(java.lang.String name)
                   throws org.apache.lenya.workflow.WorkflowException
Returns the event for a certain event name.


addVariable

protected void addVariable(BooleanVariableImpl variable)
Adds a variable.


getVariable

public BooleanVariableImpl getVariable(java.lang.String name)
                                throws org.apache.lenya.workflow.WorkflowException
Returns the variable for a certain name.


getVariables

protected BooleanVariableImpl[] getVariables()
Returns the variables.


getVariableNames

public java.lang.String[] getVariableNames()
Description copied from interface: org.apache.lenya.workflow.Workflow
Returns the variable names.

Specified by:
getVariableNames in interface org.apache.lenya.workflow.Workflow