org.apache.lenya.workflow.impl
Class WorkflowEngineImpl

java.lang.Object
  extended by org.apache.lenya.workflow.impl.WorkflowEngineImpl
All Implemented Interfaces:
org.apache.lenya.workflow.WorkflowEngine

public class WorkflowEngineImpl
extends java.lang.Object
implements org.apache.lenya.workflow.WorkflowEngine

Workflow engine implementation.

Version:
$Id: WorkflowEngineImpl.java 473861 2006-11-12 03:51:14Z gregor $

Constructor Summary
WorkflowEngineImpl()
           
 
Method Summary
 boolean canFire(org.apache.lenya.workflow.Transition transition, org.apache.lenya.workflow.Workflow workflow, org.apache.lenya.workflow.Workflowable workflowable)
          Checks if a transition can fire.
 boolean canInvoke(org.apache.lenya.workflow.Workflowable workflowable, org.apache.lenya.workflow.Workflow workflow, java.lang.String event)
           
protected  org.apache.lenya.workflow.Version createNewVersion(org.apache.lenya.workflow.Workflowable workflowable, org.apache.lenya.workflow.Workflow workflow, java.lang.String event, java.lang.String destination)
          Creates a new version.
protected  java.util.List getFiringTransitions(org.apache.lenya.workflow.Workflowable workflowable, org.apache.lenya.workflow.Workflow workflow, java.lang.String event)
          Returns the transitions that would fire in a certain situation.
 void invoke(org.apache.lenya.workflow.Workflowable workflowable, org.apache.lenya.workflow.Workflow workflow, java.lang.String event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowEngineImpl

public WorkflowEngineImpl()
Method Detail

canInvoke

public boolean canInvoke(org.apache.lenya.workflow.Workflowable workflowable,
                         org.apache.lenya.workflow.Workflow workflow,
                         java.lang.String event)
                  throws org.apache.lenya.workflow.WorkflowException
Specified by:
canInvoke in interface org.apache.lenya.workflow.WorkflowEngine
Throws:
org.apache.lenya.workflow.WorkflowException
See Also:
WorkflowEngine.canInvoke(org.apache.lenya.workflow.Workflowable, org.apache.lenya.workflow.Workflow, java.lang.String)

invoke

public void invoke(org.apache.lenya.workflow.Workflowable workflowable,
                   org.apache.lenya.workflow.Workflow workflow,
                   java.lang.String event)
            throws org.apache.lenya.workflow.WorkflowException
Specified by:
invoke in interface org.apache.lenya.workflow.WorkflowEngine
Throws:
org.apache.lenya.workflow.WorkflowException
See Also:
WorkflowEngine.invoke(org.apache.lenya.workflow.Workflowable, org.apache.lenya.workflow.Workflow, java.lang.String)

createNewVersion

protected org.apache.lenya.workflow.Version createNewVersion(org.apache.lenya.workflow.Workflowable workflowable,
                                                             org.apache.lenya.workflow.Workflow workflow,
                                                             java.lang.String event,
                                                             java.lang.String destination)
                                                      throws org.apache.lenya.workflow.WorkflowException
Creates a new version.

Parameters:
workflowable - The workflowable.
workflow - The workflow.
event - The event.
destination - The destination.
Returns:
A version.
Throws:
org.apache.lenya.workflow.WorkflowException - if an error occurs.

getFiringTransitions

protected java.util.List getFiringTransitions(org.apache.lenya.workflow.Workflowable workflowable,
                                              org.apache.lenya.workflow.Workflow workflow,
                                              java.lang.String event)
                                       throws org.apache.lenya.workflow.WorkflowException
Returns the transitions that would fire in a certain situation.

Parameters:
workflowable - The workflowable.
workflow - The workflow.
event - The event.
Returns:
A list of transitions.
Throws:
org.apache.lenya.workflow.WorkflowException - if an error occurs.

canFire

public boolean canFire(org.apache.lenya.workflow.Transition transition,
                       org.apache.lenya.workflow.Workflow workflow,
                       org.apache.lenya.workflow.Workflowable workflowable)
                throws org.apache.lenya.workflow.WorkflowException
Checks if a transition can fire.

Parameters:
transition - The transition.
workflow - The workflow.
workflowable - The workflowable.
Returns:
A boolean value.
Throws:
org.apache.lenya.workflow.WorkflowException - if an error occurs.


Copyright $ Apache Software Foundation. All Rights Reserved.