com.ibm.commerce.registry
Class DeviceFmtRegistry

java.lang.Object
  |
  +--com.ibm.commerce.registry.DeviceFmtRegistry
All Implemented Interfaces:
Registry

public class DeviceFmtRegistry
extends java.lang.Object
implements Registry

This is the DeviceFmtRegistry.


Field Summary
protected  java.util.Hashtable cache
           
protected  int cacheSize
           
protected static DeviceFmtRegistry singleton
           
 
Fields inherited from interface com.ibm.commerce.registry.Registry
COPYRIGHT
 
Constructor Summary
protected DeviceFmtRegistry()
          Default constructor for device format registry.
 
Method Summary
 void addElement(java.lang.String fmtid, com.ibm.commerce.registry.DeviceFormatAccessBean bean)
          Adds a DeviceFormatAccessBean to the cache.
 void addElement(java.lang.String fmtid, com.ibm.commerce.registry.DeviceFormatAccessBean bean, java.util.Hashtable aCache)
          Adds a DeviceFormatAccessBean to the given cache.
 com.ibm.commerce.registry.DeviceFormatAccessBean find(java.lang.String fmtid)
          Returns a DeviceFormatAccessBean given a device format id.
 void initialize()
          Initializes the DeviceFmtRegistry.
 void refresh()
          This method refreshes the device format regsitry from the database again.
 void removeAllElements()
          Removes all DeviceFormatAccessBean from cache.
 void removeElement(java.lang.String fmtid)
          Removes a Device format from the cache.
static DeviceFmtRegistry singleton()
          This method returns a singleton DeviceFmtRegistry object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected java.util.Hashtable cache

cacheSize

protected int cacheSize

singleton

protected static DeviceFmtRegistry singleton
Constructor Detail

DeviceFmtRegistry

protected DeviceFmtRegistry()
Default constructor for device format registry.
Method Detail

addElement

public void addElement(java.lang.String fmtid,
                       com.ibm.commerce.registry.DeviceFormatAccessBean bean)
Adds a DeviceFormatAccessBean to the cache.
Parameters:
fmtId - String - device format id
bean - DeviceFormatAccessBean

addElement

public void addElement(java.lang.String fmtid,
                       com.ibm.commerce.registry.DeviceFormatAccessBean bean,
                       java.util.Hashtable aCache)
Adds a DeviceFormatAccessBean to the given cache.
Parameters:
fmtId - String - device format id
bean - DeviceFormatAccessBean
cache - Hashtable - cache where acess bean is to be added to.

find

public com.ibm.commerce.registry.DeviceFormatAccessBean find(java.lang.String fmtid)
Returns a DeviceFormatAccessBean given a device format id.
Parameters:
fmtId - String - device format id
Returns:
DeivceFornatAccessBean,

initialize

public void initialize()
                throws java.lang.Exception
Initializes the DeviceFmtRegistry. This will include the initialization of the WcsApp with this instance of the registry.

Specified by:
initialize in interface Registry

refresh

public void refresh()
             throws java.lang.Exception
This method refreshes the device format regsitry from the database again.

Specified by:
refresh in interface Registry
Throws:
java.lang.Exception -  

removeAllElements

public void removeAllElements()
Removes all DeviceFormatAccessBean from cache.

removeElement

public void removeElement(java.lang.String fmtid)
Removes a Device format from the cache.

Parameters:
fmtId - String - device format id.

singleton

public static DeviceFmtRegistry singleton()
This method returns a singleton DeviceFmtRegistry object

Returns:
DeviceFmtRegistry