com.ibm.commerce.registry
Class LanguageRegistry
- java.lang.Object
-
- com.ibm.commerce.registry.LanguageRegistry
-
-
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 aLanguageAccessBean
to the local cache.void
addElement(java.lang.Integer langId, java.lang.Object bean, java.util.Hashtable aCache)
This method adds aLanguageAccessBean
to the given cache.LanguageAccessBean
find(java.lang.Integer langId)
This method finds aLanguage
object from theLanguage Registry
.java.util.Enumeration
getAll()
This method returns anEnumeration
of allLanguageAccessBean
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 theLanguage
object from theLanguage Registry
.void
initialize()
This method initializes theLanguageRegistry
.void
refresh()
This method refreshes the local cache ofLanguage
objects by retrieving them from the database.void
removeAllElements()
This method removes allLanguageAccessBean
objects from the local cache.void
removeElement(java.lang.Integer langId)
This method removes anLanguageAccessBean
object from the local cache.static LanguageRegistry
singleton()
This method returns a singletonLanguageRegistry
object
-
-
-
Method Detail
-
addElement
public void addElement(java.lang.Integer langId, java.lang.Object bean)
This method adds aLanguageAccessBean
to the local cache.- Parameters:
langId
- The language id.bean
- TheLanguageAccessBean
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 aLanguageAccessBean
to the given cache.- Parameters:
langId
- The language id.bean
- TheLanguageAccessBean
to be added.aCache
- The cache object to be used.
-
find
public LanguageAccessBean find(java.lang.Integer langId)
This method finds aLanguage
object from theLanguage Registry
.- Parameters:
langId
- The language id.- Returns:
- A
LanguageAccessBean
object.
-
getAll
public java.util.Enumeration getAll()
This method returns anEnumeration
of allLanguageAccessBean
objects defined.- Returns:
- An
Enumeration
of allLanguageAccessBean
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 theLanguage
object from theLanguage Registry
.- Returns:
- The locale associated with the language.
-
initialize
public void initialize() throws java.lang.Exception
This method initializes theLanguageRegistry
. This will include the initialization of theWcsApp
with this instance of the registry.- Specified by:
initialize
in interfaceRegistry
- Throws:
java.lang.Exception
-
refresh
public void refresh() throws java.lang.Exception
This method refreshes the local cache ofLanguage
objects by retrieving them from the database.
-
removeAllElements
public void removeAllElements()
This method removes allLanguageAccessBean
objects from the local cache.
-
removeElement
public void removeElement(java.lang.Integer langId)
This method removes anLanguageAccessBean
object from the local cache.- Parameters:
langId
- The language id associated with theLanguageAccessBean
to be removed.
-
singleton
public static LanguageRegistry singleton()
This method returns a singletonLanguageRegistry
object- Returns:
- a singleton
LanguageRegistry
object.
-
-