Class ResourceBundleMapWrapper
- java.lang.Object
-
- org.apache.ofbiz.base.util.collections.ResourceBundleMapWrapper
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Map<java.lang.String,java.lang.Object>
public class ResourceBundleMapWrapper extends java.lang.Object implements java.util.Map<java.lang.String,java.lang.Object>, java.io.Serializable
Generic ResourceBundle Map Wrapper, given ResourceBundle allows it to be used as a Map- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResourceBundleMapWrapper.InternalRbmWrapper
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.Object>
context
protected java.util.ResourceBundle
initialResourceBundle
static java.lang.String
module
protected MapStack<java.lang.String>
rbmwStack
-
Constructor Summary
Constructors Modifier Constructor Description protected
ResourceBundleMapWrapper()
ResourceBundleMapWrapper(java.util.ResourceBundle initialResourceBundle)
When creating new from a ResourceBundle the one passed to the constructor should be the most specific or local ResourceBundle, with more common ones pushed onto the stack progressively.ResourceBundleMapWrapper(java.util.ResourceBundle initialResourceBundle, java.util.Map<java.lang.String,java.lang.Object> context)
When creating new from a ResourceBundle the one passed to the constructor should be the most specific or local ResourceBundle, with more common ones pushed onto the stack progressively.ResourceBundleMapWrapper(ResourceBundleMapWrapper.InternalRbmWrapper initialInternalRbmWrapper)
When creating new from a InternalRbmWrapper the one passed to the constructor should be the most specific or local InternalRbmWrapper, with more common ones pushed onto the stack progressively.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBottomResourceBundle(java.lang.String resource)
Don't pass the locale to make sure it has the same locale as the basevoid
addBottomResourceBundle(java.util.ResourceBundle topResourceBundle)
Puts ResourceBundle on the BOTTOM of the stack (bottom meaning will be overriden by higher layers on the stack, ie everything else already there)void
addBottomResourceBundle(ResourceBundleMapWrapper.InternalRbmWrapper topInternalRbmWrapper)
Puts InternalRbmWrapper on the BOTTOM of the stack (bottom meaning will be overriden by higher layers on the stack, ie everything else already there)void
clear()
boolean
containsKey(java.lang.Object arg0)
boolean
containsValue(java.lang.Object arg0)
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>>
entrySet()
java.lang.Object
get(java.lang.Object arg0)
java.util.ResourceBundle
getInitialResourceBundle()
boolean
isEmpty()
java.util.Set<java.lang.String>
keySet()
void
pushResourceBundle(java.util.ResourceBundle topResourceBundle)
In general we don't want to use this, better to start with the more specific ResourceBundle and add layers of common ones...java.lang.Object
put(java.lang.String key, java.lang.Object value)
void
putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> arg0)
java.lang.Object
remove(java.lang.Object arg0)
int
size()
java.util.Collection<java.lang.Object>
values()
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
rbmwStack
protected MapStack<java.lang.String> rbmwStack
-
initialResourceBundle
protected java.util.ResourceBundle initialResourceBundle
-
context
protected java.util.Map<java.lang.String,java.lang.Object> context
-
-
Constructor Detail
-
ResourceBundleMapWrapper
protected ResourceBundleMapWrapper()
-
ResourceBundleMapWrapper
public ResourceBundleMapWrapper(ResourceBundleMapWrapper.InternalRbmWrapper initialInternalRbmWrapper)
When creating new from a InternalRbmWrapper the one passed to the constructor should be the most specific or local InternalRbmWrapper, with more common ones pushed onto the stack progressively.
-
ResourceBundleMapWrapper
public ResourceBundleMapWrapper(java.util.ResourceBundle initialResourceBundle)
When creating new from a ResourceBundle the one passed to the constructor should be the most specific or local ResourceBundle, with more common ones pushed onto the stack progressively.
-
ResourceBundleMapWrapper
public ResourceBundleMapWrapper(java.util.ResourceBundle initialResourceBundle, java.util.Map<java.lang.String,java.lang.Object> context)
When creating new from a ResourceBundle the one passed to the constructor should be the most specific or local ResourceBundle, with more common ones pushed onto the stack progressively.
-
-
Method Detail
-
addBottomResourceBundle
public void addBottomResourceBundle(java.util.ResourceBundle topResourceBundle)
Puts ResourceBundle on the BOTTOM of the stack (bottom meaning will be overriden by higher layers on the stack, ie everything else already there)
-
addBottomResourceBundle
public void addBottomResourceBundle(ResourceBundleMapWrapper.InternalRbmWrapper topInternalRbmWrapper)
Puts InternalRbmWrapper on the BOTTOM of the stack (bottom meaning will be overriden by higher layers on the stack, ie everything else already there)
-
addBottomResourceBundle
public void addBottomResourceBundle(java.lang.String resource)
Don't pass the locale to make sure it has the same locale as the base
-
pushResourceBundle
public void pushResourceBundle(java.util.ResourceBundle topResourceBundle)
In general we don't want to use this, better to start with the more specific ResourceBundle and add layers of common ones... Puts ResourceBundle on the top of the stack (top meaning will override lower layers on the stack)
-
getInitialResourceBundle
public java.util.ResourceBundle getInitialResourceBundle()
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
containsKey
public boolean containsKey(java.lang.Object arg0)
- Specified by:
containsKey
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
containsValue
public boolean containsValue(java.lang.Object arg0)
- Specified by:
containsValue
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
- Specified by:
entrySet
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
get
public java.lang.Object get(java.lang.Object arg0)
- Specified by:
get
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
keySet
public java.util.Set<java.lang.String> keySet()
- Specified by:
keySet
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
put
public java.lang.Object put(java.lang.String key, java.lang.Object value)
- Specified by:
put
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
putAll
public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> arg0)
- Specified by:
putAll
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
remove
public java.lang.Object remove(java.lang.Object arg0)
- Specified by:
remove
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
size
public int size()
- Specified by:
size
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
values
public java.util.Collection<java.lang.Object> values()
- Specified by:
values
in interfacejava.util.Map<java.lang.String,java.lang.Object>
-
-