Package de.hybris.platform.jalo.c2l
Class HybrisResourceBundle
java.lang.Object
java.util.ResourceBundle
de.hybris.platform.jalo.c2l.HybrisResourceBundle
- All Implemented Interfaces:
Serializable
Resource bundle to store locale-specific objects in a serialized form.
HybrisResourceBundle is a
concrete subclass of ResourceBundle 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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.ResourceBundle
ResourceBundle.Control -
Field Summary
Fields inherited from class java.util.ResourceBundle
parent -
Constructor Summary
ConstructorsConstructorDescriptionHybrisResourceBundle(Locale locale) Creates a newHybrisResourceBundleinstance for the specifiedLocale. -
Method Summary
Modifier and TypeMethodDescriptiongetKeys()Implementation ofResourceBundle.getKeys().Return theLocalefor thisHybrisResourceBundle.protected ObjecthandleGetObject(String key) Implementation ofResourceBundle.handleGetObject(String).voidsetObject(String key, Serializable value) Puts a serializable object with the specified key into the resource bundle.voidsetParent(ResourceBundle parent) Overrides setParent of ResourceBundle, but requires aHybrisResourceBundleas parameter.voidPuts aStringwith the specified key into the resource bundle.Methods inherited from class java.util.ResourceBundle
clearCache, clearCache, containsKey, getBaseBundleName, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getObject, getString, getStringArray, handleKeySet, keySet
-
Constructor Details
-
HybrisResourceBundle
Creates a newHybrisResourceBundleinstance for the specifiedLocale.- Parameters:
locale- theLocale
-
-
Method Details
-
handleGetObject
Implementation ofResourceBundle.handleGetObject(String).- Specified by:
handleGetObjectin classResourceBundle- Parameters:
key- the key of theObject, which should be returned. If there exists no resources for the specified key,Nullis returned.- Throws:
MissingResourceException- See Also:
-
getKeys
Implementation ofResourceBundle.getKeys().- Specified by:
getKeysin classResourceBundle- See Also:
-
setParent
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 classResourceBundle- Parameters:
parent- aHybrisResourceBundleobject- Throws:
IllegalArgumentException- if parent is not aHybrisResourceBundleinstance.
-
getLocale
Return theLocalefor thisHybrisResourceBundle.- Overrides:
getLocalein classResourceBundle- Returns:
- the
Localeof thisHybrisResourceBundle
-
setObject
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:
IllegalArgumentException- if key is null
-
setString
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:
IllegalArgumentException- if key is null
-