com.raritantechnologies.searchApp
Interface IConfigurableFactory

All Superinterfaces:
IConfigurable
All Known Implementing Classes:
ComponentFactory, ComponentTemplate, ConfigurableObjectFactory

public interface IConfigurableFactory
extends IConfigurable

Base interface for Factory objects that can instantiate IConfigurable objects.

The default implementation of this interface is com.raritantechnologies.searchApp.ConfigurableObjectFactory. IConfigurable objects that need special initializations may designate a class of IConfigurableFactory in their configuration using the "factoryClass" attribute of the <SystemObject> element:
  <SystemObjects>

    <!-- ================================================================== -->
    <!--   Use this configuration to create a ConfigurableFactory instance  -->
    <!--   that is used by more than one SystemObjects. Make sure that this -->
    <!--   object is declared as a 'singleton' instanceType.                -->
    <!-- ================================================================== -->
    <SystemObject type="ConfigurableObjectFactory" name="[ name of Object Factory ]"
                     configurableClass="[ this factory class name ]"
                     instanceType="singleton" >
       <!-- configuration for this ConfigurableFactory Object -->
    </SystemObject>

    <!-- Other System Objects can use this type -->
    <SystemObject type="[the object type]" name="[the system object instance name]" 
                     configurableClass="[ fully qualified class name of IConfigurable class ]"
                     factoryClass="[ implementation of IConfigurableObjectFactory ]"
                     factoryObject="[ name of a IConfigurableFactory Object (as configured above ) ]" >
       <!-- other attributes and parameters required by the IConfigurable object's
               initialize( ) method -->
    </SystemObject>


  </SystemObjects>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

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)
           
 

Method Detail

setConfigElement

public void setConfigElement(org.w3c.dom.Element elem)

getConfiguredObject

public IConfigurable getConfiguredObject()

hasConfiguredObject

public boolean hasConfiguredObject(java.lang.String objectName)
Does this ConfigurableFactory support multiple Configurable Objects?


getConfiguredObjectNames

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


getConfiguredObject

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


isInitialized

public boolean isInitialized()

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 IConfigurable

getInitializer

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


getInitializer

public org.w3c.dom.Element getInitializer()