org.apache.commons.workflow.base
Class BaseStep

java.lang.Object
  extended byorg.apache.commons.workflow.base.BaseStep
All Implemented Interfaces:
org.apache.commons.workflow.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 java.lang.Object
implements org.apache.commons.workflow.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: 1.6 $ $Date: 2004/07/28 03:49:24 $

Field Summary
protected  java.lang.String id
          The unique identifier (within this Activity) of this Step.
protected  org.apache.commons.workflow.Step nextStep
          The next Step in our associated Activity.
protected  org.apache.commons.workflow.Owner owner
          The Activity or Block that owns this Step.
protected  org.apache.commons.workflow.Step previousStep
          The previous Step in our associated Activity.
 
Constructor Summary
BaseStep()
           
 
Method Summary
abstract  void execute(org.apache.commons.workflow.Context context)
          Perform the executable actions related to this Step, in the context of the specified Context.
 java.lang.String getId()
          Return the unique identifier (within this Activity or Block) of this Step.
 org.apache.commons.workflow.Step getNextStep()
          Return the next Step in our associated Activity or Block.
 org.apache.commons.workflow.Owner getOwner()
          Return the Activity or Block that owns this Step.
 org.apache.commons.workflow.Step getPreviousStep()
          Return the previous Step in our associated Activity or Block.
 void setId(java.lang.String id)
          Set the unique identifier (within this Activity or Block) of this Step.
 void setNextStep(org.apache.commons.workflow.Step nextStep)
          Set the next Step in our associated Activity or Block.
 void setOwner(org.apache.commons.workflow.Owner owner)
          Set the Activity or Block that owns this Step.
 void setPreviousStep(org.apache.commons.workflow.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 java.lang.String id
The unique identifier (within this Activity) of this Step.


nextStep

protected org.apache.commons.workflow.Step nextStep
The next Step in our associated Activity.


owner

protected org.apache.commons.workflow.Owner owner
The Activity or Block that owns this Step.


previousStep

protected org.apache.commons.workflow.Step previousStep
The previous Step in our associated Activity.

Constructor Detail

BaseStep

public BaseStep()
Method Detail

getId

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

Specified by:
getId in interface org.apache.commons.workflow.Step

setId

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

Specified by:
setId in interface org.apache.commons.workflow.Step
Parameters:
id - The new unique identifier

getNextStep

public org.apache.commons.workflow.Step getNextStep()
Return the next Step in our associated Activity or Block.

Specified by:
getNextStep in interface org.apache.commons.workflow.Step

setNextStep

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

Specified by:
setNextStep in interface org.apache.commons.workflow.Step
Parameters:
nextStep - The new next Step

getOwner

public org.apache.commons.workflow.Owner getOwner()
Return the Activity or Block that owns this Step.

Specified by:
getOwner in interface org.apache.commons.workflow.Step

setOwner

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

Specified by:
setOwner in interface org.apache.commons.workflow.Step
Parameters:
owner - The new owning Activity or Block

getPreviousStep

public org.apache.commons.workflow.Step getPreviousStep()
Return the previous Step in our associated Activity or Block.

Specified by:
getPreviousStep in interface org.apache.commons.workflow.Step

setPreviousStep

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

Specified by:
setPreviousStep in interface org.apache.commons.workflow.Step
Parameters:
previousStep - The new previous Step

execute

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

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


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