com.ibm.commerce.registry

Class LanguageRegistry

  • java.lang.Object
    • com.ibm.commerce.registry.LanguageRegistry
  • All Implemented Interfaces:
    Registry


    public class LanguageRegistry
    extends java.lang.Object
    implements Registry
    This class defines a runtime cache of the language table.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addElement(java.lang.Integer langId, java.lang.Object bean)
      This method adds a LanguageAccessBean to the local cache.
      void addElement(java.lang.Integer langId, java.lang.Object bean, java.util.Hashtable aCache)
      This method adds a LanguageAccessBean to the given cache.
      LanguageAccessBean find(java.lang.Integer langId)
      This method finds a Language object from the Language Registry.
      java.util.Enumeration getAll()
      This method returns an Enumeration of all LanguageAccessBean objects defined.
      java.lang.String getEncoding(java.lang.Integer langId)
      This method returns the encoding string associated with a language id.
      java.util.Locale getLocale(java.lang.Integer langId)
      This method returns the locale associated with the Language object from the Language Registry.
      void initialize()
      This method initializes the LanguageRegistry.
      void refresh()
      This method refreshes the local cache of Language objects by retrieving them from the database.
      void removeAllElements()
      This method removes all LanguageAccessBean objects from the local cache.
      void removeElement(java.lang.Integer langId)
      This method removes an LanguageAccessBean object from the local cache.
      static LanguageRegistry singleton()
      This method returns a singleton LanguageRegistry object
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addElement

        public void addElement(java.lang.Integer langId,
                               java.lang.Object bean)
        This method adds a LanguageAccessBean to the local cache.
        Parameters:
        langId - The language id.
        bean - The LanguageAccessBean to be added to the local cache.
      • addElement

        public void addElement(java.lang.Integer langId,
                               java.lang.Object bean,
                               java.util.Hashtable aCache)
        This method adds a LanguageAccessBean to the given cache.
        Parameters:
        langId - The language id.
        bean - The LanguageAccessBean to be added.
        aCache - The cache object to be used.
      • find

        public LanguageAccessBean find(java.lang.Integer langId)
        This method finds a Language object from the Language Registry.
        Parameters:
        langId - The language id.
        Returns:
        A LanguageAccessBean object.
      • getAll

        public java.util.Enumeration getAll()
        This method returns an Enumeration of all LanguageAccessBean objects defined.
        Returns:
        An Enumeration of all LanguageAccessBean objects.
      • getEncoding

        public java.lang.String getEncoding(java.lang.Integer langId)
        This method returns the encoding string associated with a language id.
        Returns:
        An encoding string.
      • getLocale

        public java.util.Locale getLocale(java.lang.Integer langId)
        This method returns the locale associated with the Language object from the Language Registry.
        Returns:
        The locale associated with the language.
      • initialize

        public void initialize()
                        throws java.lang.Exception
        This method initializes the LanguageRegistry. This will include the initialization of the WcsApp with this instance of the registry.
        Specified by:
        initialize in interface Registry
        Throws:
        java.lang.Exception
      • refresh

        public void refresh()
                     throws java.lang.Exception
        This method refreshes the local cache of Language objects by retrieving them from the database.
        Specified by:
        refresh in interface Registry
        Throws:
        java.lang.Exception
      • removeAllElements

        public void removeAllElements()
        This method removes all LanguageAccessBean objects from the local cache.
      • removeElement

        public void removeElement(java.lang.Integer langId)
        This method removes an LanguageAccessBean object from the local cache.
        Parameters:
        langId - The language id associated with the LanguageAccessBean to be removed.
      • singleton

        public static LanguageRegistry singleton()
        This method returns a singleton LanguageRegistry object
        Returns:
        a singleton LanguageRegistry object.