org.apache.commons.workflow
Interface Registry

All Known Implementing Classes:
BaseRegistry

public interface Registry

A Registry is a Singleton that provides registration and lookup facilities for Activity instances. All Activity instances registered in a Registry must have unique id properties, but lookup facilities may be used to select zero or more Activities that match particular patterns. This can be used, for example, to select a Locale-specific version of a particular Activity.

FIXME - Initial version of this interface does not have any of the fancy lookup capabilities allued to above.

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

Method Summary
 void addActivity(Activity activity)
          Add a new Activity to the set of Activity instances known to this Registry.
 void clear()
          Clear any existing Activity instances registered with this Registry.
 Activity[] findActivities()
          Return the complete set of Activity instances associated with this Activity.
 Activity findActivity(String id)
          Return the registered Activity with the specified identifier, if any; otherwise return null.
 void removeActivity(Activity activity)
          Remove the specified Activity from this Registry.
 

Method Detail

addActivity

void addActivity(Activity activity)
Add a new Activity to the set of Activity instances known to this Registry.

Parameters:
activity - The new activity to be added

clear

void clear()
Clear any existing Activity instances registered with this Registry.


findActivities

Activity[] findActivities()
Return the complete set of Activity instances associated with this Activity. If there are no such registered Activity instances, a zero-length array is returned.


findActivity

Activity findActivity(String id)
Return the registered Activity with the specified identifier, if any; otherwise return null.

Parameters:
id - Identifier of the desired Activity

removeActivity

void removeActivity(Activity activity)
Remove the specified Activity from this Registry.

Parameters:
activity - The Activity to be removed


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