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 cached registries.


Field Summary
protected  java.util.Hashtable registryMap
           
 
Constructor Summary
RegistryManager()
          RegistryManager constructor.
 
Method Summary
 void addRegistry(java.lang.String aRegistryName, Registry aRegistryObj)
          Adds a registry.
 void deleteRegistry(java.lang.String aRegistryName)
          Delete a registry .
 Registry getRegistry(java.lang.String aRegistryName)
          Gets a registry.
 void initialize()
          Initialize the registry manager.
 void initializeRegistryEntry(org.w3c.dom.Element node)
          Initialize a registry entry.
 void initializeRegistryEntry(java.lang.String name, Registry registry)
          Initialize a registry entry.
 void initializeRegistryEntry(java.lang.String name, java.lang.String className)
          Initialize a registry entry.
 java.util.Enumeration list()
          List the cache of all the registries maintained by the registry manager.
 void refresh(java.lang.String aRegistryName)
          Refresh cache of the registry information.
 void refreshAll()
          Refresh 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 key)
          Update 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()
RegistryManager constructor.
Method Detail

addRegistry

public void addRegistry(java.lang.String aRegistryName,
                        Registry aRegistryObj)
Adds a registry.
Parameters:
registryName - String
registry - Registry

deleteRegistry

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

getRegistry

public Registry getRegistry(java.lang.String aRegistryName)
Gets a registry.
Parameters:
registryName - String
Returns:
Registry

initialize

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

initializeRegistryEntry

public void initializeRegistryEntry(org.w3c.dom.Element node)
                             throws java.lang.Exception
Initialize a registry entry.

Parameters:
node - Element - a dom node that defines the registry to be initialized
Throws:
java.lang.Exception -  

initializeRegistryEntry

public void initializeRegistryEntry(java.lang.String name,
                                    Registry registry)
                             throws java.lang.Exception
Initialize a registry entry.

Parameters:
name - String - name of registry
registry - Registry - the registry object

initializeRegistryEntry

public void initializeRegistryEntry(java.lang.String name,
                                    java.lang.String className)
                             throws java.lang.Exception
Initialize a registry entry.

Parameters:
name - String - name of registry
className - String - fully qualified class name for the registry

list

public java.util.Enumeration list()
List the cache of all the registries maintained by the registry manager.
Returns:
Enumeration - a enumeration of all registries

refresh

public void refresh(java.lang.String aRegistryName)
             throws java.lang.Exception
Refresh cache of the registry information.

Parameters:
name - String - name of registry to be refreshed

refreshAll

public void refreshAll()
                throws java.lang.Exception
Refresh the cache of all registries.

singleton

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

update

public void update(java.lang.String aRegistryName,
                   java.lang.String action,
                   java.lang.String key)
            throws java.lang.Exception
Update the cached information of a given registry element. This method is only applicable for a registry that implements the ItemUpdate interface.

Parameters:
name - String - name of registry to be updated
action - String - action to be performed on the element
key - String - the key used to identify a particuler element
Throws:
java.lang.Exception -