Package de.hybris.platform.jalo.c2l
Class HybrisResourceBundle
- java.lang.Object
-
- java.util.ResourceBundle
-
- de.hybris.platform.jalo.c2l.HybrisResourceBundle
-
- All Implemented Interfaces:
java.io.Serializable
public class HybrisResourceBundle extends java.util.ResourceBundle implements java.io.Serializable
Resource bundle to store locale-specific objects in a serialized form.HybrisResourceBundle
is a concrete subclass ofResourceBundle
that manages resources for a locale using a set of objects from a serializable map.See
ResourceBundle
for more information about resource bundles.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HybrisResourceBundle(java.util.Locale locale)
Creates a newHybrisResourceBundle
instance for the specifiedLocale
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Enumeration
getKeys()
Implementation ofResourceBundle.getKeys()
.java.util.Locale
getLocale()
Return theLocale
for thisHybrisResourceBundle
.protected java.lang.Object
handleGetObject(java.lang.String key)
Implementation ofResourceBundle.handleGetObject(String)
.void
setObject(java.lang.String key, java.io.Serializable value)
Puts a serializable object with the specified key into the resource bundle.void
setParent(java.util.ResourceBundle parent)
Overrides setParent of ResourceBundle, but requires aHybrisResourceBundle
as parameter.void
setString(java.lang.String key, java.lang.String value)
Puts aString
with the specified key into the resource bundle.
-
-
-
Method Detail
-
handleGetObject
protected java.lang.Object handleGetObject(java.lang.String key) throws java.util.MissingResourceException
Implementation ofResourceBundle.handleGetObject(String)
.- Specified by:
handleGetObject
in classjava.util.ResourceBundle
- Parameters:
key
- the key of theObject
, which should be returned. If there exists no resources for the specified key,Null
is returned.- Throws:
java.util.MissingResourceException
- See Also:
ResourceBundle.handleGetObject(String)
-
getKeys
public java.util.Enumeration getKeys()
Implementation ofResourceBundle.getKeys()
.- Specified by:
getKeys
in classjava.util.ResourceBundle
- See Also:
ResourceBundle.getKeys()
-
setParent
public void setParent(java.util.ResourceBundle parent)
Overrides setParent of ResourceBundle, but requires aHybrisResourceBundle
as parameter. The parent will provide fall-back functionality if a resource is not found in the current bundle.- Overrides:
setParent
in classjava.util.ResourceBundle
- Parameters:
parent
- aHybrisResourceBundle
object- Throws:
java.lang.IllegalArgumentException
- if parent is not aHybrisResourceBundle
instance.
-
getLocale
public java.util.Locale getLocale()
Return theLocale
for thisHybrisResourceBundle
.- Overrides:
getLocale
in classjava.util.ResourceBundle
- Returns:
- the
Locale
of thisHybrisResourceBundle
-
setObject
public void setObject(java.lang.String key, java.io.Serializable value)
Puts a serializable object with the specified key into the resource bundle. If there exists an entry for the specified key, this entry will be overwritten.- Parameters:
key
- the key of the new entryvalue
- the value of the new entry- Throws:
java.lang.IllegalArgumentException
- if key is null
-
setString
public void setString(java.lang.String key, java.lang.String value)
Puts aString
with the specified key into the resource bundle. If there exists an entry for the specified key, this entry will be overwritten.- Parameters:
key
- the key of the new entryvalue
- theString
value of the new entry- Throws:
java.lang.IllegalArgumentException
- if key is null
-
-