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:
- Block, Descriptors, Owner, 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: 155475 $ $Date: 2005-02-26 13:31:11 +0000 (Sat, 26 Feb 2005) $
- Author:
- Craig R. McClanahan
Constructor Summary |
IfStep()
Construct a default instance of this Step. |
IfStep(String id)
Construct an instance of this Step with the specified identifier. |
IfStep(String id,
Descriptor descriptor)
Construct a fully configured instance of this Step. |
Method Summary |
protected boolean |
evaluate(Context context)
Evaluate the condition specified by the Descriptors associated with
this Block, and return the resulting boolean value. |
protected void |
initial(Context context)
Process the initial entry into this Block. |
String |
toString()
Render a string representation of this Step. |
IfStep
public IfStep()
- Construct a default instance of this Step.
IfStep
public IfStep(String id)
- Construct an instance of this Step with the specified identifier.
- Parameters:
id
- Step identifier
IfStep
public IfStep(String id,
Descriptor descriptor)
- Construct a fully configured instance of this Step.
- Parameters:
id
- Step identifier of this stepdescriptor
- Initial descriptor to be added
toString
public String toString()
- Render a string representation of this Step.
- Overrides:
toString
in class Object
evaluate
protected boolean evaluate(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(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-2010 The Apache Software Foundation. All Rights Reserved.