org.apache.commons.workflow.base
Class BaseActivity

java.lang.Object
  extended by org.apache.commons.workflow.base.BaseActivity
All Implemented Interfaces:
Activity, Owner

public class BaseActivity
extends Object
implements Activity

BaseActivity is a convenient base class for more sophisticated Activity implementations. It includes management of the static relationships of Steps to each other as part of an owning Activity.

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

Field Summary
protected  Step firstStep
          The first Step associated with this Activity.
protected  String id
          The unique identifier of this Activity.
protected  Step lastStep
          The last Step associated with this Activity.
 
Constructor Summary
BaseActivity()
           
 
Method Summary
 void addStep(Step step)
          Add a new Step to the end of the sequence of Steps associated with this Activity.
 void clearSteps()
          Clear any existing Steps associated with this Activity.
 Step findStep(String id)
          Return the identified Step from this Activity, if it exists.
 Step getFirstStep()
          Return the first Step associated with this Activity.
 String getId()
          Return the unique identifier of this Activity.
 Step getLastStep()
          Return the last Step associated with this Activity.
 Step[] getSteps()
          Return the set of Steps associated with this Activity.
 void setId(String id)
          Set the unique identifier of this Activity.
 void setSteps(Step[] steps)
          Set the set of Steps associated with this Activity, replacing any existing ones.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstStep

protected Step firstStep
The first Step associated with this Activity.


id

protected String id
The unique identifier of this Activity.


lastStep

protected Step lastStep
The last Step associated with this Activity.

Constructor Detail

BaseActivity

public BaseActivity()
Method Detail

getFirstStep

public Step getFirstStep()
Return the first Step associated with this Activity.

Specified by:
getFirstStep in interface Owner

getId

public String getId()
Return the unique identifier of this Activity.

Specified by:
getId in interface Activity

setId

public void setId(String id)
Set the unique identifier of this Activity.

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

getLastStep

public Step getLastStep()
Return the last Step associated with this Activity.

Specified by:
getLastStep in interface Owner

addStep

public void addStep(Step step)
Add a new Step to the end of the sequence of Steps associated with this Activity.

Specified by:
addStep in interface Owner
Parameters:
step - The new step to be added

clearSteps

public void clearSteps()
Clear any existing Steps associated with this Activity.

Specified by:
clearSteps in interface Owner

findStep

public Step findStep(String id)
Return the identified Step from this Activity, if it exists. Otherwise, return null.

Specified by:
findStep in interface Owner
Parameters:
id - Identifier of the desired Step

getSteps

public Step[] getSteps()
Return the set of Steps associated with this Activity.

Specified by:
getSteps in interface Owner

setSteps

public void setSteps(Step[] steps)
Set the set of Steps associated with this Activity, replacing any existing ones.

Specified by:
setSteps in interface Owner
Parameters:
steps - The new set of steps.


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