com.raritantechnologies.searchApp
Class XMLConfigurationManager

java.lang.Object
  extended bycom.raritantechnologies.searchApp.ConfigurationManager
      extended bycom.raritantechnologies.searchApp.XMLConfigurationManager
Direct Known Subclasses:
QuickstartConfigurationManager, WebServiceConfigurationManager, XMLSourceConfigurationManager

public class XMLConfigurationManager
extends ConfigurationManager

Subclass of ConfigurationManager that initializes application configuration information from an XML file.

Uses XMLSearchFieldMapFactory to initialize SearchSource objects and user interface elements.

Subclasses of XMLConfigurationManager (e.g. FederatedConfigurationManager, QuickstartConfigurationManager, WebServicesConfigurationManager) perform additional initializations specific to a particular Application Framework.


Developed by Raritan Technologies .

Author:
Ted Sullivan, Glenn Robitaille

Field Summary
 
Fields inherited from class com.raritantechnologies.searchApp.ConfigurationManager
DEFAULT_FEDERATOR_CLASS, theScheduler, theSourceMapFactory
 
Constructor Summary
XMLConfigurationManager()
           
 
Method Summary
 void addConfigurableFactoryLink(java.lang.String objectType, java.lang.String objectName, java.lang.String factoryObject)
           
 void addSystemObjects(org.w3c.dom.Element configDocElem)
          Add System Objects: SystemObjects must implement the IConfigurable interface.
 void addUserInfoReaders(org.w3c.dom.Element configDocElem)
          Add User Information Readers from Configuration XML.
protected  boolean createSystemObject(java.lang.String name)
           
protected  org.w3c.dom.Document getConfigDoc()
           
 IQueryProcessor getQueryProcessor(java.lang.String sourceType)
          Returns an instance of an IQueryProcessor for a particular type of search source.
 ISearchFieldMapFactory getSearchFieldMapFactory()
          returns an instance of a SearchFieldMap Factory object.
 ISecurityManager getSecurityManager()
          returns an instance of the ISecurityManager that is used with this configuration.
 ISourceMapFactory getSourceMapFactory()
           
protected  XMLSearchFieldMapFactory getXMLSearchFieldMapFactory()
           
protected  void initialize(java.util.PropertyResourceBundle prb)
           
 void processSourceElement(org.w3c.dom.Element elem)
          Subclasses should override this to process new SourceType element
protected  java.lang.Object returnConfiguredObject(java.lang.String type, java.lang.String name, java.lang.Object sysObject)
           
 
Methods inherited from class com.raritantechnologies.searchApp.ConfigurationManager
addSecurityManager, addSourceMap, addSystemObject, changeBasePath, changeToSysPathSep, getAbstractSearchField, getBasePath, getConfigPath, getConfigPath, getDebugWriter, getFederatorClass, getInstance, getInstance, getLogger, getLoginPath, getPrb, getScheduler, getSearchFieldMap, getSearchSources, getSecurityManager, getSourceMap, getSourceMap, getStreamFactory, getSysConfigProperty, getSystemObject, getSystemObjects, initializeLog4JLogging, initializeLogger, listSystemProperties, printStackTrace, setFederatorClass, setStreamFactory, useLog4JLogging, write, writeDebug, writeDebug, writeDebug, writeDebug, writeDebug, writeError, writeError, writeError, writeError, writeError, writeFatal, writeFatal, writeFatal, writeFatal, writeFatal, writeInfo, writeInfo, writeInfo, writeWarning, writeWarning, writeWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLConfigurationManager

public XMLConfigurationManager()
Method Detail

initialize

protected void initialize(java.util.PropertyResourceBundle prb)
Specified by:
initialize in class ConfigurationManager

addSystemObjects

public void addSystemObjects(org.w3c.dom.Element configDocElem)
Add System Objects: SystemObjects must implement the IConfigurable interface. XML Schema:
 <SystemObjects>
    <SystemObject type="class or funtion type" name="specific name"
                     factoryClass="[optional implementation of IConfigurableFactory]"
                     configurableClass="[ ALTERNATE - IConfigurable class]"
                     instanceType="single|multiple(default)" >

       <!-- Configurable Object properties -->

    </SystemObject>
 </SystemObjects>
 


createSystemObject

protected boolean createSystemObject(java.lang.String name)
Overrides:
createSystemObject in class ConfigurationManager

addUserInfoReaders

public void addUserInfoReaders(org.w3c.dom.Element configDocElem)
Add User Information Readers from Configuration XML. XML Schema:
 <UserInfoReader
       class="[fully qualified class name of IUserInforReader implementation]" >

       <!-- UserInfoReader configuration properties -->
 </UserInfoReader>
 


processSourceElement

public void processSourceElement(org.w3c.dom.Element elem)
Subclasses should override this to process new SourceType element


getQueryProcessor

public IQueryProcessor getQueryProcessor(java.lang.String sourceType)
Returns an instance of an IQueryProcessor for a particular type of search source. Implements this by reading the SourceType tags in the config XML for their "queryProcessor" attribute - these are stored in a local hashtable

Specified by:
getQueryProcessor in class ConfigurationManager
Parameters:
sourceType - Identifies the processor to be used for a particular type of search.

getSecurityManager

public ISecurityManager getSecurityManager()
returns an instance of the ISecurityManager that is used with this configuration. This allows for the security implementation to change.

Specified by:
getSecurityManager in class ConfigurationManager

getSearchFieldMapFactory

public ISearchFieldMapFactory getSearchFieldMapFactory()
returns an instance of a SearchFieldMap Factory object.

Specified by:
getSearchFieldMapFactory in class ConfigurationManager

getSourceMapFactory

public ISourceMapFactory getSourceMapFactory()
Specified by:
getSourceMapFactory in class ConfigurationManager

getXMLSearchFieldMapFactory

protected XMLSearchFieldMapFactory getXMLSearchFieldMapFactory()

getConfigDoc

protected org.w3c.dom.Document getConfigDoc()

addConfigurableFactoryLink

public void addConfigurableFactoryLink(java.lang.String objectType,
                                       java.lang.String objectName,
                                       java.lang.String factoryObject)

returnConfiguredObject

protected java.lang.Object returnConfiguredObject(java.lang.String type,
                                                  java.lang.String name,
                                                  java.lang.Object sysObject)
Overrides:
returnConfiguredObject in class ConfigurationManager