org.apache.commons.workflow.base
Class BaseActivity

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

public class BaseActivity
extends java.lang.Object
implements org.apache.commons.workflow.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: 1.7 $ $Date: 2004/02/28 03:35:54 $

Field Summary
protected  org.apache.commons.workflow.Step firstStep
          The first Step associated with this Activity.
protected  java.lang.String id
          The unique identifier of this Activity.
protected  org.apache.commons.workflow.Step lastStep
          The last Step associated with this Activity.
 
Constructor Summary
BaseActivity()
           
 
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 Activity.
 void clearSteps()
          Clear any existing Steps associated with this Activity.
 org.apache.commons.workflow.Step findStep(java.lang.String id)
          Return the identified Step from this Activity, if it exists.
 org.apache.commons.workflow.Step getFirstStep()
          Return the first Step associated with this Activity.
 java.lang.String getId()
          Return the unique identifier of this Activity.
 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 Activity.
 void setId(java.lang.String id)
          Set the unique identifier of this Activity.
 void setSteps(org.apache.commons.workflow.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 org.apache.commons.workflow.Step firstStep
The first Step associated with this Activity.


id

protected java.lang.String id
The unique identifier of this Activity.


lastStep

protected org.apache.commons.workflow.Step lastStep
The last Step associated with this Activity.

Constructor Detail

BaseActivity

public BaseActivity()
Method Detail

getFirstStep

public org.apache.commons.workflow.Step getFirstStep()
Return the first Step associated with this Activity.

Specified by:
getFirstStep in interface org.apache.commons.workflow.Owner

getId

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

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

setId

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

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

getLastStep

public org.apache.commons.workflow.Step getLastStep()
Return the last Step associated with this Activity.

Specified by:
getLastStep in interface org.apache.commons.workflow.Owner

addStep

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

Specified by:
addStep in interface org.apache.commons.workflow.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 org.apache.commons.workflow.Owner

findStep

public org.apache.commons.workflow.Step findStep(java.lang.String id)
Return the identified Step from this Activity, if it exists. Otherwise, return null.

Specified by:
findStep in interface org.apache.commons.workflow.Owner
Parameters:
id - Identifier of the desired Step

getSteps

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

Specified by:
getSteps in interface org.apache.commons.workflow.Owner

setSteps

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

Specified by:
setSteps in interface org.apache.commons.workflow.Owner
Parameters:
steps - The new set of steps.


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