atg.nucleus
Class MultipleConfigurationFinder

java.lang.Object
  extended by atg.nucleus.MultipleConfigurationFinder
All Implemented Interfaces:
ConfigurationFinder

public class MultipleConfigurationFinder
extends java.lang.Object
implements ConfigurationFinder

A MultipleConfigurationFinder contains other ConfigurationFinders, which are called in then order they were added to search for a configuration.


Nested Class Summary
 
Nested classes/interfaces inherited from interface atg.nucleus.ConfigurationFinder
ConfigurationFinder.ConfigurationList
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from interface atg.nucleus.ConfigurationFinder
CLASS_SUFFIX, CLASS_SUFFIX_LEN, GLOBAL_PROPERTIES, JAVA_SUFFIX, JAVA_SUFFIX_LEN, PROPERTIES_SUFFIX, PROPERTIES_SUFFIX_LEN
 
Constructor Summary
MultipleConfigurationFinder()
          Constructs a new MultipleConfigurationFinder
 
Method Summary
 void addConfigurationFinder(ConfigurationFinder pFinder)
          Adds a ConfigurationFinder to the end of the list of ConfigurationFinders to be consulted.
 Configuration findConfiguration(java.lang.String pName, boolean pSearchUp, java.lang.String pBaseName, ApplicationLogging pLog)
          Finds and returns the configuration for the specified name.
 void listConfigurations(java.lang.String pName, ConfigurationFinder.ConfigurationList pList)
          Finds and returns a list of configurable objects that could be found by this ConfigurationFinder within some naming context in the configuration namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

MultipleConfigurationFinder

public MultipleConfigurationFinder()
Constructs a new MultipleConfigurationFinder

Method Detail

addConfigurationFinder

public void addConfigurationFinder(ConfigurationFinder pFinder)
Adds a ConfigurationFinder to the end of the list of ConfigurationFinders to be consulted.


findConfiguration

public Configuration findConfiguration(java.lang.String pName,
                                       boolean pSearchUp,
                                       java.lang.String pBaseName,
                                       ApplicationLogging pLog)
Finds and returns the configuration for the specified name. Returns null if a configuration could not be found.

Specified by:
findConfiguration in interface ConfigurationFinder
Parameters:
pName - the name for which a configuration is to be found
pSearchUp - the flag indicating whether a search should be performed up the tree if the name is not found in its literal form.
pBaseName - if search up is on, then this is the portion of the name that will remain constant. For example, if the name is "/a/b/c/d/e/test1" and the base name is "/e/test1", then this will search for "/a/b/c/d/e/test1", "/a/b/c/e/test1", "/a/b/e/test1", "/a/e/test1", and "/e/test1".
pLog - the ApplicationLogging to which the configuration finder should print informative messages as it tries to find the configuration. If null, then no informative messages should be printed.
Returns:
the Configuration for the name, or null if not found.

listConfigurations

public void listConfigurations(java.lang.String pName,
                               ConfigurationFinder.ConfigurationList pList)
Finds and returns a list of configurable objects that could be found by this ConfigurationFinder within some naming context in the configuration namespace.

Specified by:
listConfigurations in interface ConfigurationFinder
Parameters:
pName - the name of the context in which to look
pList - a list into which the names of discovered collections can be found.