|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.WhileStep
public class WhileStep
Repeatedly evaluate the properties specified by the associated Descriptors, and execute the nested Steps if and only if ALL of them evaluate to a positive result. To avoid non-deterministic evaluation stack behavior, all of the specified Descriptors are always evaluated exactly once.
Field Summary |
---|
Fields inherited from class org.apache.commons.workflow.base.BaseBlock |
---|
firstStep, lastStep |
Fields inherited from class org.apache.commons.workflow.base.DescriptorStep |
---|
descriptors |
Fields inherited from class org.apache.commons.workflow.base.BaseStep |
---|
id, nextStep, owner, previousStep |
Constructor Summary | |
---|---|
WhileStep()
Construct a default instance of this Step. |
|
WhileStep(String id)
Construct an instance of this Step with the specified identifier. |
|
WhileStep(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. |
protected void |
subsequent(Context context,
BlockState state)
Process the return from nested execution of the Steps assocaited with this Block. |
String |
toString()
Render a string representation of this Step. |
Methods inherited from class org.apache.commons.workflow.base.BaseBlock |
---|
addStep, clearSteps, execute, findStep, getFirstStep, getLastStep, getSteps, setSteps, state |
Methods inherited from class org.apache.commons.workflow.base.DescriptorStep |
---|
addDescriptor, findDescriptors, removeDescriptor |
Methods inherited from class org.apache.commons.workflow.base.BaseStep |
---|
getId, getNextStep, getOwner, getPreviousStep, setId, setNextStep, setOwner, setPreviousStep |
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.Owner |
---|
addStep, clearSteps, findStep, getFirstStep, getLastStep, getSteps, setSteps |
Methods inherited from interface org.apache.commons.workflow.Step |
---|
execute, getId, getNextStep, getOwner, getPreviousStep, setId, setNextStep, setOwner, setPreviousStep |
Constructor Detail |
---|
public WhileStep()
public WhileStep(String id)
id
- Step identifierpublic WhileStep(String id, Descriptor descriptor)
id
- Step identifier of this stepdescriptor
- Initial descriptor to be addedMethod Detail |
---|
public String toString()
toString
in class Object
protected boolean evaluate(Context context)
evaluate
in class BaseBlock
context
- Context within which to evaluate the descriptorsprotected void initial(Context context)
initial
in class BaseBlock
context
- Context within which to evaluate the conditionprotected void subsequent(Context context, BlockState state)
subsequent
in class BaseBlock
context
- Context within which to evaluate the conditionstate
- BlockState for our block
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |