org.apache.lenya.workflow.impl
Class SynchronizedWorkflowInstancesImpl

java.lang.Object
  extended by org.apache.lenya.workflow.impl.SynchronizedWorkflowInstancesImpl
All Implemented Interfaces:
SynchronizedWorkflowInstances
Direct Known Subclasses:
WorkflowDocumentSet

public class SynchronizedWorkflowInstancesImpl
extends java.lang.Object
implements SynchronizedWorkflowInstances

An object of this class encapsulates a set of synchronized workflow instances.


Constructor Summary
SynchronizedWorkflowInstancesImpl()
          Ctor.
SynchronizedWorkflowInstancesImpl(WorkflowInstance[] instances, WorkflowInstance mainInstance)
          Ctor.
 
Method Summary
 Event[] getExecutableEvents(Situation situation)
          Returns all executable events.
 WorkflowInstance[] getInstances()
           
 void invoke(Situation situation, Event event)
          Invokes an event on all documents.
 void setInstances(WorkflowInstance[] instances)
           
 void setMainInstance(WorkflowInstance mainInstance)
          Sets the main workflow instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchronizedWorkflowInstancesImpl

public SynchronizedWorkflowInstancesImpl()
Ctor.


SynchronizedWorkflowInstancesImpl

public SynchronizedWorkflowInstancesImpl(WorkflowInstance[] instances,
                                         WorkflowInstance mainInstance)
Ctor.

Parameters:
instances - The set of workflow instances to synchronize.
mainInstance - The main workflow instance to invoke for non-synchronized transitions.
Method Detail

setMainInstance

public void setMainInstance(WorkflowInstance mainInstance)
Sets the main workflow instance.

Parameters:
mainInstance - The main workflow instance to invoke for non-synchronized transitions.

setInstances

public void setInstances(WorkflowInstance[] instances)

getInstances

public WorkflowInstance[] getInstances()

getExecutableEvents

public Event[] getExecutableEvents(Situation situation)
                            throws WorkflowException
Returns all executable events.

Specified by:
getExecutableEvents in interface SynchronizedWorkflowInstances
Throws:
WorkflowException
See Also:
WorkflowInstance.getExecutableEvents(org.apache.lenya.workflow.Situation)

invoke

public void invoke(Situation situation,
                   Event event)
            throws WorkflowException
Invokes an event on all documents.

Specified by:
invoke in interface SynchronizedWorkflowInstances
Throws:
WorkflowException
See Also:
WorkflowInstance.invoke(org.apache.lenya.workflow.Situation, org.apache.lenya.workflow.Event)


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.