org.apache.beehive.netui.script.common
Class BundleMap
Object
AbstractMap
AbstractScriptableMap
BundleMap
- All Implemented Interfaces:
- Map
public class BundleMap
- extends AbstractScriptableMap
Provide a Map
of BundleMap.ScriptableBundle
objects that can expose
various implementations of BundleContext.BundleNode
to expression languages.
This Map
implementation is optimized for read as the entrySet()
is created lazily. In addition, the entrySet does not contain all possible ScriptableBundle
objects as named "message-resources" bundles are discovered at runtime and requested by name.
todo: need to implement Serializable here as this ends up in the request
Constructor Summary |
BundleMap(HttpServletRequest servletRequest,
ServletContext servletContext,
BundleContext bundleContext)
Create a BundleMap object that is used for data binding to resource bundles. |
Methods inherited from class AbstractMap |
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values |
Methods inherited from class Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
BundleMap
public BundleMap(HttpServletRequest servletRequest,
ServletContext servletContext,
BundleContext bundleContext)
- Create a BundleMap object that is used for data binding to resource bundles.
- Parameters:
servletRequest
- the current HttpServletRequest
objectservletContext
- a ServletContext
object that facilitates binding to
resource bundles declared in Struts modulesbundleContext
- optional BundleContext
object that describes any existing, data bindable
resource bundles
getBundleContext
public BundleContext getBundleContext()
get
public Object get(Object name)
- Specified by:
get
in interface Map
- Overrides:
get
in class AbstractMap
containsKey
public boolean containsKey(Object key)
- Implementation of Map.containsKey for the bundle implicit object.
This method is required by JSP 2.0 EL and performs the lookups of
the various available bundles which have been registered either
explicitly or implicitly.
- Specified by:
containsKey
in interface Map
- Overrides:
containsKey
in class AbstractMap
- Parameters:
key
- The name of a bundle to lookup
- Returns:
true
if the bundle is available; false
otherwise
entrySet
public Set entrySet()
- Specified by:
entrySet
in interface Map
- Specified by:
entrySet
in class AbstractMap