org.apache.commons.workflow.core
Class IfStep
java.lang.Object
org.apache.commons.workflow.base.BaseStep
org.apache.commons.workflow.base.DescriptorStep
org.apache.commons.workflow.base.BaseBlock
org.apache.commons.workflow.core.IfStep
- All Implemented Interfaces:
- org.apache.commons.workflow.Block, org.apache.commons.workflow.Descriptors, org.apache.commons.workflow.Owner, org.apache.commons.workflow.Step
- Direct Known Subclasses:
- IfAnyStep, IfNotAnyStep, IfNotStep
- public class IfStep
- extends BaseBlock
Evaluate properties specified by the associated Descriptors, and
execute the nested Steps if and only if they ALL
evaluate to a positive result. To avoid non-deterministic evaluation
stack behavior, all of the specified Descriptors are always
evaluated exactly once.
- Version:
- $Revision: 1.3 $ $Date: 2004/02/28 03:35:54 $
|
Constructor Summary |
IfStep()
Construct a default instance of this Step. |
IfStep(java.lang.String id)
Construct an instance of this Step with the specified identifier. |
IfStep(java.lang.String id,
org.apache.commons.workflow.Descriptor descriptor)
Construct a fully configured instance of this Step. |
|
Method Summary |
protected boolean |
evaluate(org.apache.commons.workflow.Context context)
Evaluate the condition specified by the Descriptors associated with
this Block, and return the resulting boolean value. |
protected void |
initial(org.apache.commons.workflow.Context context)
Process the initial entry into this Block. |
java.lang.String |
toString()
Render a string representation of this Step. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.commons.workflow.Step |
getId, getNextStep, getOwner, getPreviousStep, setId, setNextStep, setOwner, setPreviousStep |
IfStep
public IfStep()
- Construct a default instance of this Step.
IfStep
public IfStep(java.lang.String id)
- Construct an instance of this Step with the specified identifier.
- Parameters:
id - Step identifier
IfStep
public IfStep(java.lang.String id,
org.apache.commons.workflow.Descriptor descriptor)
- Construct a fully configured instance of this Step.
- Parameters:
id - Step identifier of this stepdescriptor - Initial descriptor to be added
toString
public java.lang.String toString()
- Render a string representation of this Step.
evaluate
protected boolean evaluate(org.apache.commons.workflow.Context context)
- Evaluate the condition specified by the Descriptors associated with
this Block, and return the resulting boolean value.
- Overrides:
evaluate in class BaseBlock
- Parameters:
context - Context within which to evaluate the descriptors
initial
protected void initial(org.apache.commons.workflow.Context context)
- Process the initial entry into this Block.
- Overrides:
initial in class BaseBlock
- Parameters:
context - Context within which to evaluate the condition
Copyright © 2001-2005 The Apache Software Foundation. All Rights Reserved.