Package org.opencms.i18n
Class CmsListResourceBundle
- java.lang.Object
-
- java.util.ResourceBundle
-
- java.util.ListResourceBundle
-
- org.opencms.i18n.CmsListResourceBundle
-
- All Implemented Interfaces:
I_CmsResourceBundle
public class CmsListResourceBundle extends java.util.ListResourceBundle implements I_CmsResourceBundle
A list based resource bundle that with increased visibility of some key methods.- Since:
- 8.0.1
- See Also:
CmsResourceBundleLoader
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Locale
m_locale
The locale to use.
-
Constructor Summary
Constructors Constructor Description CmsListResourceBundle()
Create a new list resource bundle for the XML.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMessage(java.lang.String key, java.lang.String value)
Adds a message to this list bundle.CmsListResourceBundle
getClone()
Returns a typed clone of this resource bundle.java.lang.Object[][]
getContents()
java.util.Locale
getLocale()
void
setLocale(java.util.Locale l)
Sets the locale used for this resource bundle.void
setParent(java.util.ResourceBundle p)
Sets the parent bundle.
-
-
-
Field Detail
-
m_locale
protected java.util.Locale m_locale
The locale to use.
-
-
Constructor Detail
-
CmsListResourceBundle
public CmsListResourceBundle()
Create a new list resource bundle for the XML.
-
-
Method Detail
-
addMessage
public void addMessage(java.lang.String key, java.lang.String value)
Adds a message to this list bundle.Please note: All additions after the initial call to
getContents()
are ignored.- Parameters:
key
- the message keyvalue
- the message itself
-
getClone
public CmsListResourceBundle getClone()
Returns a typed clone of this resource bundle.This is required in order to make sure the objects in the permanent cache of the list based resource bundles which are usually read from the XML are never changed.
- Specified by:
getClone
in interfaceI_CmsResourceBundle
- Returns:
- a typed clone of this resource bundle
-
getContents
public java.lang.Object[][] getContents()
- Specified by:
getContents
in classjava.util.ListResourceBundle
- See Also:
ListResourceBundle.getContents()
-
getLocale
public java.util.Locale getLocale()
- Overrides:
getLocale
in classjava.util.ResourceBundle
- See Also:
ResourceBundle.getLocale()
-
setLocale
public void setLocale(java.util.Locale l)
Sets the locale used for this resource bundle.- Specified by:
setLocale
in interfaceI_CmsResourceBundle
- Parameters:
l
- the locale to set
-
setParent
public void setParent(java.util.ResourceBundle p)
Description copied from interface:I_CmsResourceBundle
Sets the parent bundle.- Specified by:
setParent
in interfaceI_CmsResourceBundle
- Overrides:
setParent
in classjava.util.ResourceBundle
- Parameters:
p
- the parent bundle to set- See Also:
ResourceBundle.setParent(java.util.ResourceBundle)
-
-