|
||||||||||
| 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
public abstract class 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 Step |
firstStep
The first Step associated with this Block. |
protected 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(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(Context context)
Evaluate the condition specified by the Descriptors associated with this Block, and return the resulting boolean value. |
void |
execute(Context context)
Perform the executable actions related to this Step, in the context of the specified Context. |
Step |
findStep(String id)
Return the identified Step from this Block, if it exists. |
Step |
getFirstStep()
Return the first Step associated with this Block. |
Step |
getLastStep()
Return the last Step associated with this Activity. |
Step[] |
getSteps()
Return the set of Steps associated with this Block. |
protected void |
initial(Context context)
Process the initial entry into this Block. |
void |
setSteps(Step[] steps)
Set the set of Steps associated with this Block, replacing any existing ones. |
protected BlockState |
state(Context context)
Peek at the top BlockState element on the stack
maintained by our Context, and return it. |
protected void |
subsequent(Context context,
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 Step firstStep
protected Step lastStep
| Constructor Detail |
|---|
public BaseBlock()
| Method Detail |
|---|
public Step getFirstStep()
getFirstStep in interface Ownerpublic Step getLastStep()
getLastStep in interface Ownerpublic void addStep(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 Ownerstep - The new step to be addedpublic void clearSteps()
clearSteps in interface Ownerpublic Step findStep(String id)
null.
findStep in interface Ownerid - Identifier of the desired Steppublic Step[] getSteps()
getSteps in interface Ownerpublic void setSteps(Step[] steps)
setSteps in interface Ownersteps - The new set of steps.
public void execute(Context context)
throws StepException
execute in interface Stepexecute in class BaseStepcontext - The Context that is tracking our execution state
StepException - if a processing error has occurredprotected boolean evaluate(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(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 BlockState state(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(Context context,
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 | |||||||||