org.apache.commons.workflow.base
Class BaseStep

java.lang.Object
  extended by org.apache.commons.workflow.base.BaseStep
All Implemented Interfaces:
Step
Direct Known Subclasses:
BreakStep, CallStep, ContinueStep, DescriptorStep, DuplicateStep, ExitStep, ForwardStep, GetStep, GotoStep, IncludeStep23, LoadStep, PeekStep, PopStep, ReadStep, StringStep, SuspendStep, SwapStep, WriteStep

public abstract class BaseStep
extends Object
implements Step

BaseStep is a convenient base class for more sophisticated Step implementations. It includes management of the static relationships of Steps to each other, and to their owning Activity, but requires the implementation to provide an execute() method.

Version:
$Revision: 155475 $ $Date: 2005-02-26 13:31:11 +0000 (Sat, 26 Feb 2005) $
Author:
Craig R. McClanahan

Field Summary
protected  String id
          The unique identifier (within this Activity) of this Step.
protected  Step nextStep
          The next Step in our associated Activity.
protected  Owner owner
          The Activity or Block that owns this Step.
protected  Step previousStep
          The previous Step in our associated Activity.
 
Constructor Summary
BaseStep()
           
 
Method Summary
abstract  void execute(Context context)
          Perform the executable actions related to this Step, in the context of the specified Context.
 String getId()
          Return the unique identifier (within this Activity or Block) of this Step.
 Step getNextStep()
          Return the next Step in our associated Activity or Block.
 Owner getOwner()
          Return the Activity or Block that owns this Step.
 Step getPreviousStep()
          Return the previous Step in our associated Activity or Block.
 void setId(String id)
          Set the unique identifier (within this Activity or Block) of this Step.
 void setNextStep(Step nextStep)
          Set the next Step in our associated Activity or Block.
 void setOwner(Owner owner)
          Set the Activity or Block that owns this Step.
 void setPreviousStep(Step previousStep)
          Set the previous Step in our associated Activity or Block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected String id
The unique identifier (within this Activity) of this Step.


nextStep

protected Step nextStep
The next Step in our associated Activity.


owner

protected Owner owner
The Activity or Block that owns this Step.


previousStep

protected Step previousStep
The previous Step in our associated Activity.

Constructor Detail

BaseStep

public BaseStep()
Method Detail

getId

public String getId()
Return the unique identifier (within this Activity or Block) of this Step.

Specified by:
getId in interface Step

setId

public void setId(String id)
Set the unique identifier (within this Activity or Block) of this Step.

Specified by:
setId in interface Step
Parameters:
id - The new unique identifier

getNextStep

public Step getNextStep()
Return the next Step in our associated Activity or Block.

Specified by:
getNextStep in interface Step

setNextStep

public void setNextStep(Step nextStep)
Set the next Step in our associated Activity or Block.

Specified by:
setNextStep in interface Step
Parameters:
nextStep - The new next Step

getOwner

public Owner getOwner()
Return the Activity or Block that owns this Step.

Specified by:
getOwner in interface Step

setOwner

public void setOwner(Owner owner)
Set the Activity or Block that owns this Step.

Specified by:
setOwner in interface Step
Parameters:
owner - The new owning Activity or Block

getPreviousStep

public Step getPreviousStep()
Return the previous Step in our associated Activity or Block.

Specified by:
getPreviousStep in interface Step

setPreviousStep

public void setPreviousStep(Step previousStep)
Set the previous Step in our associated Activity or Block.

Specified by:
setPreviousStep in interface Step
Parameters:
previousStep - The new previous Step

execute

public abstract void execute(Context context)
                      throws StepException
Perform the executable actions related to this Step, in the context of the specified Context.

Specified by:
execute in interface Step
Parameters:
context - The Context that is tracking our execution state
Throws:
StepException - if a processing error has occurred


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.