com.ibm.commerce.registry
Class RegistryManager

java.lang.Object
  |
  +--com.ibm.commerce.registry.RegistryManager

public class RegistryManager
extends java.lang.Object

The RegistryManager manages all the registered registries.


Field Summary
protected  java.util.Hashtable registryMap
           
 
Constructor Summary
RegistryManager()
          Constructor for RegistryManager.
 
Method Summary
 void addRegistry(java.lang.String aRegistryName, Registry aRegistryObj)
          Adds a registry.
 void deleteRegistry(java.lang.String aRegistryName)
          Deletes a registry .
  Registry getRegistry(java.lang.String aRegistryName)
          Gets a registry given by the registry name.
 void initialize()
          Initializes the registry manager.
 void initializeRegistryEntry(org.w3c.dom.Element node)
          Initializes a registry entry.
 void initializeRegistryEntry(java.lang.String name, Registry registry)
          Initializes a registry entry.
 void initializeRegistryEntry(java.lang.String name, java.lang.String className)
          Initializes a registry entry.
 java.util.Enumeration list()
          Lists the cache of all the registries maintained by the registry manager.
 void refresh(java.lang.String aRegistryName)
          Refreshes cache information of the given registry.
 void refreshAll()
          Refreshes the cache of all registries.
static  RegistryManager singleton()
          Returns a singleton object of the Registry Manager.
 void update(java.lang.String aRegistryName, java.lang.String action, java.lang.String strKey)
          Updates the cached information of a given registry element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

registryMap

protected java.util.Hashtable registryMap
Constructor Detail

RegistryManager

public RegistryManager()
Constructor for RegistryManager.
Method Detail

addRegistry

public void addRegistry(java.lang.String aRegistryName,
Registry aRegistryObj)
Adds a registry.
Parameters:
aRegistryName - name of the registry
aRegistryObj - the Registry object

deleteRegistry

public void deleteRegistry(java.lang.String aRegistryName)
Deletes a registry .
Parameters:
aRegistryName - name of registry to be deleted

getRegistry

public Registry getRegistry(java.lang.String aRegistryName)
Gets a registry given by the registry name.
Parameters:
aRegistryName - String
Returns:
the Registry object

initialize

public void initialize()
                throws java.lang.Exception
Initializes the registry manager. The registry manager will initialize all the registries defined in the configuation file.
Throws:
java.lang.Exception

initializeRegistryEntry

public void initializeRegistryEntry(java.lang.String name,
Registry registry)
                             throws java.lang.Exception
Initializes a registry entry.
Parameters:
name - the name of registry
registry - the registry object
Throws:
java.lang.Exception

initializeRegistryEntry

public void initializeRegistryEntry(java.lang.String name,
                                    java.lang.String className)
                             throws java.lang.Exception
Initializes a registry entry.
Parameters:
name - name of registry
className - fully qualified class name for the registry
Throws:
java.lang.Exception

initializeRegistryEntry

public void initializeRegistryEntry(org.w3c.dom.Element node)
                             throws java.lang.Exception
Initializes a registry entry.
Parameters:
node - a dom node that defines the registry to be initialized
Throws:
java.lang.Exception

list

public java.util.Enumeration list()
Lists the cache of all the registries maintained by the registry manager.
Returns:
an enumeration of all registries names

refresh

public void refresh(java.lang.String aRegistryName)
             throws java.lang.Exception
Refreshes cache information of the given registry.
Parameters:
aRegistryName - name of registry to be refreshed
Throws:
java.lang.Exception

refreshAll

public void refreshAll()
                throws java.lang.Exception
Refreshes the cache of all registries.
Throws:
java.lang.Exception

singleton

public static RegistryManager singleton()
Returns a singleton object of the Registry Manager.
Returns:
RegistryManager singleton object

update

public void update(java.lang.String aRegistryName,
                   java.lang.String action,
                   java.lang.String strKey)
            throws java.lang.Exception
Updates the cached information of a given registry element. This method is only applicable for a registry that implements the ItemUpdate interface.
Parameters:
aRegistryName - name of registry to be updated
action - action to be performed on the element
strKey - representation of the cache key
Throws:
java.lang.Exception