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.SerializableResource bundle to store locale-specific objects in a serialized form.HybrisResourceBundleis a concrete subclass ofResourceBundlethat manages resources for a locale using a set of objects from a serializable map.See
ResourceBundlefor more information about resource bundles.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HybrisResourceBundle(java.util.Locale locale)Creates a newHybrisResourceBundleinstance for the specifiedLocale.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.EnumerationgetKeys()Implementation ofResourceBundle.getKeys().java.util.LocalegetLocale()Return theLocalefor thisHybrisResourceBundle.protected java.lang.ObjecthandleGetObject(java.lang.String key)Implementation ofResourceBundle.handleGetObject(String).voidsetObject(java.lang.String key, java.io.Serializable value)Puts a serializable object with the specified key into the resource bundle.voidsetParent(java.util.ResourceBundle parent)Overrides setParent of ResourceBundle, but requires aHybrisResourceBundleas parameter.voidsetString(java.lang.String key, java.lang.String value)Puts aStringwith the specified key into the resource bundle.
-
-
-
Method Detail
-
handleGetObject
protected java.lang.Object handleGetObject(java.lang.String key) throws java.util.MissingResourceExceptionImplementation ofResourceBundle.handleGetObject(String).- Specified by:
handleGetObjectin classjava.util.ResourceBundle- Parameters:
key- the key of theObject, which should be returned. If there exists no resources for the specified key,Nullis returned.- Throws:
java.util.MissingResourceException- See Also:
ResourceBundle.handleGetObject(String)
-
getKeys
public java.util.Enumeration getKeys()
Implementation ofResourceBundle.getKeys().- Specified by:
getKeysin classjava.util.ResourceBundle- See Also:
ResourceBundle.getKeys()
-
setParent
public void setParent(java.util.ResourceBundle parent)
Overrides setParent of ResourceBundle, but requires aHybrisResourceBundleas parameter. The parent will provide fall-back functionality if a resource is not found in the current bundle.- Overrides:
setParentin classjava.util.ResourceBundle- Parameters:
parent- aHybrisResourceBundleobject- Throws:
java.lang.IllegalArgumentException- if parent is not aHybrisResourceBundleinstance.
-
getLocale
public java.util.Locale getLocale()
Return theLocalefor thisHybrisResourceBundle.- Overrides:
getLocalein classjava.util.ResourceBundle- Returns:
- the
Localeof 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 aStringwith 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- theStringvalue of the new entry- Throws:
java.lang.IllegalArgumentException- if key is null
-
-