com.raritantechnologies.searchApp.component
Class ComponentFactory

java.lang.Object
  extended bycom.raritantechnologies.searchApp.component.ComponentFactory
All Implemented Interfaces:
IConfigurable, IConfigurableFactory

public class ComponentFactory
extends java.lang.Object
implements IConfigurableFactory

Uses an IXMLDataSource to get Configuration XML for the factory.

XML Configuration Template:

  <SystemObject type="ConfigurableObjectFactory" name="[ name of this factory ]"
                   configurableClass="com.raritantechnologies.searchApp.component.ComponentFacory"
                   objectNameAttribute="[ Optional - name of XML attribute that contains object name(s) ]" >

    <ConfigurationSource class="[ class of com.raritantechnologies.xml.dataCollection.IXMLDataSource ]" >

    </ConfigurationSource>

  </SystemObject>
 


Constructor Summary
ComponentFactory()
           
 
Method Summary
 IConfigurable getConfiguredObject()
           
 IConfigurable getConfiguredObject(java.lang.String objectName)
          Returns a configured object given an object name.
 java.util.Iterator getConfiguredObjectNames()
          Returns a list of the configured objects that are available.
 org.w3c.dom.Element getInitializer()
           
 org.w3c.dom.Element getInitializer(java.lang.String objectName)
          Used by Configurable objects that need to have their own constructor.
 boolean hasConfiguredObject(java.lang.String objectName)
          Does this ConfigurableFactory support multiple Configurable Objects?
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 boolean isInitialized()
           
 void setConfigElement(org.w3c.dom.Element elem)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentFactory

public ComponentFactory()
Method Detail

setConfigElement

public void setConfigElement(org.w3c.dom.Element elem)
Specified by:
setConfigElement in interface IConfigurableFactory

getConfiguredObject

public IConfigurable getConfiguredObject()
Specified by:
getConfiguredObject in interface IConfigurableFactory

hasConfiguredObject

public boolean hasConfiguredObject(java.lang.String objectName)
Description copied from interface: IConfigurableFactory
Does this ConfigurableFactory support multiple Configurable Objects?

Specified by:
hasConfiguredObject in interface IConfigurableFactory

getConfiguredObjectNames

public java.util.Iterator getConfiguredObjectNames()
Returns a list of the configured objects that are available.

Specified by:
getConfiguredObjectNames in interface IConfigurableFactory

getConfiguredObject

public IConfigurable getConfiguredObject(java.lang.String objectName)
Returns a configured object given an object name.

Specified by:
getConfiguredObject in interface IConfigurableFactory

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface IConfigurableFactory

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurableFactory

getInitializer

public org.w3c.dom.Element getInitializer(java.lang.String objectName)
Used by Configurable objects that need to have their own constructor.

Specified by:
getInitializer in interface IConfigurableFactory

getInitializer

public org.w3c.dom.Element getInitializer()
Specified by:
getInitializer in interface IConfigurableFactory