com.ibm.commerce.server
Class ComponentManager

java.lang.Object
  |
  +--com.ibm.commerce.server.ComponentManager

public class ComponentManager
extends java.lang.Object

The component manager is responsible for initialization of all components and for enabling and disabling components.


Field Summary
protected  java.util.Hashtable componentTable
           
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Constructor Summary
ComponentManager()
          Constructor for RegistryManager.
 
Method Summary
 void deleteComponent(java.lang.String aComponentName)
          Deletes a component given the name.
 void destroy()
          Refreshes cache of registry information of all the registry entries in the hashtable.
 void destroyComponent(java.lang.String aComponent)
          Destroys a component given the name.
 void disableComponent(java.lang.String aComponentName)
          Disables a component given the name.
 void enableComponent(java.lang.String aComponentName)
          Re-enables a component that has been disabled or a compoent that has never been enabled.
  ComponentConfiguration getComponent(java.lang.String aComponentName)
          Gets an instance of the component given the component name.
 int getComponentHashcode(java.lang.String aComponentName)
          Gets the hashcode of a component.
 boolean getComponentStatus(java.lang.String aComponentName)
          Return the status of a component given the component name
 int getSize()
          Gets the size of table.
 void initComponent( ComponentDescriptor desc)
          Initalizes a component given a component descriptor.
 void initComponent(org.w3c.dom.Element node)
          Initalizes a component given a component node from the configuration file.
 void initComponent(java.lang.String aComponentName)
          Initalizes a component with a component given name.
 void initialize()
          Initializes the component manager
 java.util.Enumeration list()
          Lists all the components maintained by the component manager.
static  ComponentManager singleton()
          Gets the singleton of the component manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values

componentTable

protected java.util.Hashtable componentTable
Constructor Detail

ComponentManager

public ComponentManager()
Constructor for RegistryManager.
Method Detail

deleteComponent

public void deleteComponent(java.lang.String aComponentName)
                     throws java.lang.Exception
Deletes a component given the name.
Parameters:
aComponentName - name of component to be deleted
java.lang.Exception

destroy

public void destroy()
Refreshes cache of registry information of all the registry entries in the hashtable.

destroyComponent

public void destroyComponent(java.lang.String aComponent)
Destroys a component given the name.
Parameters:
aComponent - name of component to be destroyed.

disableComponent

public void disableComponent(java.lang.String aComponentName)
                      throws java.lang.Exception
Disables a component given the name. The enabled method of the component will be called with a value of "false".
Parameters:
aComponentName - name of component to be disabled.
Throws:
java.lang.Exception

enableComponent

public void enableComponent(java.lang.String aComponentName)
                     throws java.lang.Exception
Re-enables a component that has been disabled or a compoent that has never been enabled. The enabled method of the component will be called with a value of true.
Parameters:
aComponentName - name of the component
Throws:
java.lang.Exception

getComponent

public ComponentConfiguration getComponent(java.lang.String aComponentName)
Gets an instance of the component given the component name.
Parameters:
aComponentName - name of the component

getComponentHashcode

public int getComponentHashcode(java.lang.String aComponentName)
Gets the hashcode of a component.
Parameters:
aComponentName - name of the component
Returns:
hashcode of a component

getComponentStatus

public boolean getComponentStatus(java.lang.String aComponentName)
Return the status of a component given the component name
Parameters:
aComponentName - name of the component
Returns:
true for enabled; false for disabled

getSize

public int getSize()
Gets the size of table.
Returns:
number of components defined

initComponent

public void initComponent(ComponentDescriptor desc)
                   throws java.lang.Exception
Initalizes a component given a component descriptor.
Parameters:
desc - the component descriptor
Throws:
java.lang.Exception

initComponent

public void initComponent(java.lang.String aComponentName)
                   throws java.lang.Exception
Initalizes a component with a component given name.
Parameters:
aComponentName - component name
Throws:
java.lang.Exception

initComponent

public void initComponent(org.w3c.dom.Element node)
                   throws java.lang.Exception
Initalizes a component given a component node from the configuration file.
Parameters:
node - component node from configuration file
Throws:
java.lang.Exception

initialize

public void initialize()
                throws java.lang.Exception
Initializes the component manager
Throws:
java.lang.Exception

list

public java.util.Enumeration list()
Lists all the components maintained by the component manager.
Returns:
an enumeration of all components

singleton

public static ComponentManager singleton()
Gets the singleton of the component manager.
Returns:
the singleton of the component manager