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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.apache.lenya.workflow.impl.TransitionImpl
All Implemented Interfaces:
org.apache.lenya.workflow.Transition

public class TransitionImpl
extends java.lang.Object
implements org.apache.lenya.workflow.Transition

Implementation of a transition.


Field Summary
private  java.util.List actions
           
private  java.util.List conditions
           
private  StateImpl destination
           
private  org.apache.lenya.workflow.Event event
           
private  boolean isSynchronized
           
private static org.apache.log4j.Category log
           
private  StateImpl source
           
 
Constructor Summary
protected TransitionImpl(StateImpl sourceState, StateImpl destinationState)
          Ctor.
 
Method Summary
 void addAction(org.apache.lenya.workflow.Action action)
          Assigns an action to this transition.
 void addCondition(org.apache.lenya.workflow.Condition condition)
          Assigns a condition to this transition.
 boolean canFire(org.apache.lenya.workflow.Situation situation, org.apache.lenya.workflow.WorkflowInstance instance)
          Returns if the transition can fire in a certain situation.
 org.apache.lenya.workflow.Action[] getActions()
          Returns the actions which are assigned tothis transition.
 org.apache.lenya.workflow.Condition[] getConditions()
          Returns the conditions which are assigned to this transition.
 StateImpl getDestination()
          Returns the destination state of this transition.
 org.apache.lenya.workflow.Event getEvent()
          Returns the event which invokes this transition.
 StateImpl getSource()
          Returns the source state of this transition.
 boolean isSynchronized()
          Returns if this transition is synchronized.
 void setEvent(org.apache.lenya.workflow.Event anEvent)
          Sets the event to invoke this transition.
protected  void setSynchronized(boolean isSynchronized)
          Sets if this transition is synchronized.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static final org.apache.log4j.Category log

actions

private java.util.List actions

isSynchronized

private boolean isSynchronized

conditions

private java.util.List conditions

event

private org.apache.lenya.workflow.Event event

source

private StateImpl source

destination

private StateImpl destination
Constructor Detail

TransitionImpl

protected TransitionImpl(StateImpl sourceState,
                         StateImpl destinationState)
Ctor.

Method Detail

getActions

public org.apache.lenya.workflow.Action[] getActions()
Returns the actions which are assigned tothis transition.

Specified by:
getActions in interface org.apache.lenya.workflow.Transition

addAction

public void addAction(org.apache.lenya.workflow.Action action)
Assigns an action to this transition.


getConditions

public org.apache.lenya.workflow.Condition[] getConditions()
Returns the conditions which are assigned to this transition.


addCondition

public void addCondition(org.apache.lenya.workflow.Condition condition)
Assigns a condition to this transition.


getEvent

public org.apache.lenya.workflow.Event getEvent()
Returns the event which invokes this transition.

Specified by:
getEvent in interface org.apache.lenya.workflow.Transition

setEvent

public void setEvent(org.apache.lenya.workflow.Event anEvent)
Sets the event to invoke this transition.


getSource

public StateImpl getSource()
Returns the source state of this transition.


getDestination

public StateImpl getDestination()
Returns the destination state of this transition.


canFire

public boolean canFire(org.apache.lenya.workflow.Situation situation,
                       org.apache.lenya.workflow.WorkflowInstance instance)
                throws org.apache.lenya.workflow.WorkflowException
Returns if the transition can fire in a certain situation.

Specified by:
canFire in interface org.apache.lenya.workflow.Transition

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


isSynchronized

public boolean isSynchronized()
Returns if this transition is synchronized.

Specified by:
isSynchronized in interface org.apache.lenya.workflow.Transition

setSynchronized

protected void setSynchronized(boolean isSynchronized)
Sets if this transition is synchronized.