org.apache.beehive.netui.script.common
Class BundleMap

Object
  extended by AbstractMap
      extended by AbstractScriptableMap
          extended by 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


Nested Class Summary
 class BundleMap.ScriptableBundle
          Provide a Map implementation that exposes a BundleContext.BundleNode object to an expression language as a Map.
 
Constructor Summary
BundleMap(HttpServletRequest request, ServletContext application, BundleContext bundleContext)
          Create a BundleMap object that is used for data binding to resource bundles.
 
Method Summary
 boolean containsKey(Object key)
           
 Set entrySet()
           
 Object get(Object name)
           
 BundleContext getBundleContext()
           
 
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
 

Constructor Detail

BundleMap

public BundleMap(HttpServletRequest request,
                 ServletContext application,
                 BundleContext bundleContext)
Create a BundleMap object that is used for data binding to resource bundles.

Parameters:
request - the current HttpServletRequest object
application - a ServletContext object that facilitates binding to resource bundles declared in Struts modules
bundleContext - optional BundleContext object that describes any existing, data bindable resource bundles
Method Detail

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)
Specified by:
containsKey in interface Map
Overrides:
containsKey in class AbstractMap

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map
Specified by:
entrySet in class AbstractMap