org.mmbase.bridge.jsp.taglib.util
Class BasicBacking

java.lang.Object
  extended byjava.util.AbstractMap
      extended byorg.mmbase.bridge.jsp.taglib.util.BasicBacking
All Implemented Interfaces:
Backing, Map

public class BasicBacking
extends AbstractMap
implements Backing

A basic implementation for the backing of a ContextContainter. It uses a HashMap, but is also writes every entry to the temporary to the page-context, to make them available to JSP2's expression language, unless the 'ELIgnored' parameter of the MMBase taglib is true, or no pageContext is given in the constructor.

Since:
MMBase-1.8
Version:
$Id: BasicBacking.java,v 1.7 2006/07/08 16:43:35 michiel Exp $
Author:
Michiel Meeuwissen

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Field Summary
protected  Map originalPageContextValues
           
 
Constructor Summary
BasicBacking(PageContext pc)
           
 
Method Summary
 boolean containsOwnKey(Object key)
          Whether this map contains the given key, but by its own, so not because of possible reflection of another structure (like the page context).
 Set entrySet()
           
 Object get(Object key)
           
 Object getOriginal(Object key)
          Get the original value as stored in this Map, so without every wrapping which may have been done.
protected  void mirrorPut(Object key, Object value)
           
 void pullPageContext(PageContext pc)
           
 void pushPageContext(PageContext pc)
          When the container gets used in a different page-context (e.g.
 Object put(Object key, Object value)
           
 void setJspVar(PageContext pc, String jspvar, int vartype, Object value)
           
 String toString()
           
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, values
 

Field Detail

originalPageContextValues

protected Map originalPageContextValues
Constructor Detail

BasicBacking

public BasicBacking(PageContext pc)
Parameters:
pc - The page-context to which variables must be reflected or null if this must not happen.
Method Detail

pushPageContext

public void pushPageContext(PageContext pc)
Description copied from interface: Backing
When the container gets used in a different page-context (e.g. because it was stored in the request or in the session), the new one must be pushed. And pulled again when ready.

Specified by:
pushPageContext in interface Backing

pullPageContext

public void pullPageContext(PageContext pc)
Specified by:
pullPageContext in interface Backing
See Also:
Backing.pushPageContext(PageContext)

setJspVar

public void setJspVar(PageContext pc,
                      String jspvar,
                      int vartype,
                      Object value)
Specified by:
setJspVar in interface Backing

entrySet

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

mirrorPut

protected void mirrorPut(Object key,
                         Object value)

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map

get

public Object get(Object key)
Specified by:
get in interface Map

getOriginal

public Object getOriginal(Object key)
Description copied from interface: Backing
Get the original value as stored in this Map, so without every wrapping which may have been done.

Specified by:
getOriginal in interface Backing

containsOwnKey

public boolean containsOwnKey(Object key)
Description copied from interface: Backing
Whether this map contains the given key, but by its own, so not because of possible reflection of another structure (like the page context).

Specified by:
containsOwnKey in interface Backing

toString

public String toString()


MMBase build 1.8.1.20060716