Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.chain
Interface Catalog  view Catalog download Catalog.java


public interface Catalog

A Catalog is a collection of named Commands (or Chains) that can be used retrieve the set of commands that should be performed based on a symbolic identifier. Use of catalogs is optional, but convenient when there are multiple possible chains that can be selected and executed based on environmental conditions.

Version:
$Revision: 410386 $ $Date: 2006-05-30 22:48:31 +0100 (Tue, 30 May 2006) $

Field Summary
static java.lang.String CATALOG_KEY
          A default context attribute for storing a default Catalog, provided as a convenience only.
 
Method Summary
 void addCommand(java.lang.String name, Command command)
          Add a new name and associated Command or Chain to the set of named commands known to this Catalog, replacing any previous command for that name.
 Command getCommand(java.lang.String name)
          Return the Command or Chain associated with the specified name, if any; otherwise, return null.
 java.util.Iterator getNames()
          Return an Iterator over the set of named commands known to this Catalog.
 

Field Detail

CATALOG_KEY

public static final java.lang.String CATALOG_KEY

A default context attribute for storing a default Catalog, provided as a convenience only.

See Also:
Constant Field Values
Method Detail

addCommand

public void addCommand(java.lang.String name,
                       Command command)

Add a new name and associated Command or Chain to the set of named commands known to this Catalog, replacing any previous command for that name.


getCommand

public Command getCommand(java.lang.String name)

Return the Command or Chain associated with the specified name, if any; otherwise, return null.


getNames

public java.util.Iterator getNames()

Return an Iterator over the set of named commands known to this Catalog. If there are no known commands, an empty Iterator is returned.