|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.workflow.base.BaseStep
org.apache.commons.workflow.base.DescriptorStep
org.apache.commons.workflow.base.BaseBlock
BaseBlock is a convenient base class for more
sophisticated Block implementations. It includes management
of the static relationships of nested Steps for this Step (each of which
could conceptually also be a Block and have its own nested Steps).
| Field Summary | |
protected org.apache.commons.workflow.Step |
firstStep
The first Step associated with this Block. |
protected org.apache.commons.workflow.Step |
lastStep
The last Step associated with this Block. |
| 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 | |
BaseBlock()
|
|
| Method Summary | |
void |
addStep(org.apache.commons.workflow.Step step)
Add a new Step to the end of the sequence of Steps associated with this Block. |
void |
clearSteps()
Clear any existing Steps associated with this Block. |
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. |
void |
execute(org.apache.commons.workflow.Context context)
Perform the executable actions related to this Step, in the context of the specified Context. |
org.apache.commons.workflow.Step |
findStep(java.lang.String id)
Return the identified Step from this Block, if it exists. |
org.apache.commons.workflow.Step |
getFirstStep()
Return the first Step associated with this Block. |
org.apache.commons.workflow.Step |
getLastStep()
Return the last Step associated with this Activity. |
org.apache.commons.workflow.Step[] |
getSteps()
Return the set of Steps associated with this Block. |
protected void |
initial(org.apache.commons.workflow.Context context)
Process the initial entry into this Block. |
void |
setSteps(org.apache.commons.workflow.Step[] steps)
Set the set of Steps associated with this Block, replacing any existing ones. |
protected org.apache.commons.workflow.BlockState |
state(org.apache.commons.workflow.Context context)
Peek at the top BlockState element on the stack
maintained by our Context, and return it. |
protected void |
subsequent(org.apache.commons.workflow.Context context,
org.apache.commons.workflow.BlockState state)
Process the return from nested execution of the Steps associated with this Block. |
| 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, toString, wait, wait, wait |
| Methods inherited from interface org.apache.commons.workflow.Step |
getId, getNextStep, getOwner, getPreviousStep, setId, setNextStep, setOwner, setPreviousStep |
| Field Detail |
protected org.apache.commons.workflow.Step firstStep
protected org.apache.commons.workflow.Step lastStep
| Constructor Detail |
public BaseBlock()
| Method Detail |
public org.apache.commons.workflow.Step getFirstStep()
getFirstStep in interface org.apache.commons.workflow.Ownerpublic org.apache.commons.workflow.Step getLastStep()
getLastStep in interface org.apache.commons.workflow.Ownerpublic void addStep(org.apache.commons.workflow.Step step)
Add a new Step to the end of the sequence of Steps associated with this Block.
IMPLEMENTATION NOTE - The last nested Step is looped back to the owning Block in order to support the execution flow of control required by our BaseContext.
addStep in interface org.apache.commons.workflow.Ownerstep - The new step to be addedpublic void clearSteps()
clearSteps in interface org.apache.commons.workflow.Ownerpublic org.apache.commons.workflow.Step findStep(java.lang.String id)
null.
findStep in interface org.apache.commons.workflow.Ownerid - Identifier of the desired Steppublic org.apache.commons.workflow.Step[] getSteps()
getSteps in interface org.apache.commons.workflow.Ownerpublic void setSteps(org.apache.commons.workflow.Step[] steps)
setSteps in interface org.apache.commons.workflow.Ownersteps - The new set of steps.
public void execute(org.apache.commons.workflow.Context context)
throws org.apache.commons.workflow.StepException
execute in interface org.apache.commons.workflow.Stepexecute in class BaseStepcontext - The Context that is tracking our execution state
org.apache.commons.workflow.StepException - if a processing error has occurredprotected 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. The default
implementation returns false unconditionally.
context - Context within which to evaluate the descriptorsprotected void initial(org.apache.commons.workflow.Context context)
Process the initial entry into this Block. The default implementation unconditionally skips the nested Steps.
context - Context within which to evaluate the conditionprotected org.apache.commons.workflow.BlockState state(org.apache.commons.workflow.Context context)
Peek at the top BlockState element on the stack
maintained by our Context, and return it. If there
is no such top element, return null instead.
context - Context within which to evaluate the current BlockState
protected void subsequent(org.apache.commons.workflow.Context context,
org.apache.commons.workflow.BlockState state)
Process the return from nested execution of the Steps associated with this Block. The default implementation unconditionally proceeds to the next Step at the current nesting level, without iterating again.
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 | ||||||||||