|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javawebparts.misc.chain.ChainManager
This class is the top of the hierarchy, and all client application interaction with the Chain implementation should occur through this class.
Field Summary | |
static int |
CATALOG_ID
When this class is asked to execute a chain, it will be passed a string in the form CatalogID/ChainID. |
private static java.util.Map |
catalogs
The collection of Catalogs. |
static int |
CHAIN_ID
When this class is asked to execute a chain, it will be passed a string in the form CatalogID/ChainID. |
private static boolean |
configured
Flag to determine if initialization has taken place. |
static java.lang.String |
DEFAULT_FILE_NAME
The default name of the configuration file. |
private static org.apache.commons.logging.Log |
log
Log instance. |
Constructor Summary | |
ChainManager()
Constructor. |
|
ChainManager(java.lang.String inConfigFilename)
Constructor. |
Method Summary | |
void |
addCatalog(Catalog inCatalog)
Adds a Catalog to the collection of Catalogs. |
ChainContext |
createContext()
Returns a new ChainContext instance. |
void |
executeChain(java.lang.String catalogChainID,
ChainContext chainContext)
Executes a named Chain from a named Catalog. |
static Catalog |
findCatalog(java.lang.String catalogID)
Looks up and returns a named Catalog. |
static java.lang.String |
getCatalogOrChainID(java.lang.String catalogChainID,
int which)
Returns either the Catalog ID or Chain ID from a string in the form "xxxx/yyyy", where xxxx is the Catalog ID and yyyy is the Chain ID. |
java.lang.String |
toString()
Overridden toString method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_FILE_NAME
public static final int CATALOG_ID
public static final int CHAIN_ID
private static org.apache.commons.logging.Log log
private static java.util.Map catalogs
private static boolean configured
Constructor Detail |
public ChainManager()
public ChainManager(java.lang.String inConfigFilename)
inConfigFilename
- Name (and path technically) to the config file.Method Detail |
public void addCatalog(Catalog inCatalog)
inCatalog
- The Catalog instance to add.public static Catalog findCatalog(java.lang.String catalogID)
catalogID
- The ID of the Catalog to find.
public ChainContext createContext()
public void executeChain(java.lang.String catalogChainID, ChainContext chainContext)
catalogChainID
- The ID of the Catalog/Chain to execute.chainContext
- The ChainContext instance this execution will use.public static java.lang.String getCatalogOrChainID(java.lang.String catalogChainID, int which)
catalogChainID
- The Catalog/Chain ID to break up.which
- Which part to return Catalog ID or Chain ID.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |