|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<String,Object>
org.mmbase.bridge.jsp.taglib.util.ContextContainer
public abstract class ContextContainer
This is basicly a Map, and it also implements Map. This map is however not
completely normal, because its get(Object) method can return non-null for keys it does
not actually contain (as e.g. returend by entrySet().
Firstly, the keys can contain 'dots', in which case this key is 'split' by the dot, and the
second part is interpreted as a key in the Map stored undert the first part in this Map.
Secondly, this Map can have a 'parent'. If a key cannot be found in this map itself, it will also
try it in the parent (if there is one).
Both 'dotted' keys, and parent keys, do not appear in size, keySet and entrySet
methods. You can use keySet(boolean) and entrySet(boolean).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
static int |
LOCATION_APPLICATION
|
static int |
LOCATION_ATTRIBUTES
|
static int |
LOCATION_COOKIE
|
static int |
LOCATION_MULTIPART
|
static int |
LOCATION_MULTIPART_OPT
|
static int |
LOCATION_NOTSET
|
static int |
LOCATION_PAGE
|
static int |
LOCATION_PARAMETERS
|
static int |
LOCATION_PARENT
|
static int |
LOCATION_REQUEST
|
static int |
LOCATION_SESSION
|
static int |
LOCATION_THIS
|
| Constructor Summary | |
|---|---|
ContextContainer(String i)
Since a ContextContainer can contain other ContextContainer, it has to know which ContextContainer contains this. |
|
| Method Summary | |
|---|---|
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsKey(String key,
boolean checkParent)
Like the containsKey of HashMap. |
Set<Map.Entry<String,Object>> |
entrySet()
|
Set<Map.Entry<String,Object>> |
entrySet(boolean checkParent)
|
Object |
find(PageContext pageContext,
int from,
String referId)
|
Object |
find(PageContext pageContext,
String externid)
|
Object |
findAndRegister(PageContext pageContext,
int from,
String referId,
String newId)
Searches a key in request, postparameters, session, parent context and registers it in this one. |
Object |
findAndRegister(PageContext pageContext,
int from,
String referId,
String newId,
boolean check)
|
Object |
findAndRegister(PageContext pageContext,
String id)
|
Object |
findAndRegister(PageContext pageContext,
String externid,
String newId)
|
Object |
findAndRegister(PageContext pageContext,
String externid,
String newId,
boolean check)
|
String |
findAndRegisterString(PageContext pageContext,
String id)
|
String |
findAndRegisterString(PageContext pageContext,
String id,
boolean check)
|
static Object |
fixEncoding(Object value,
PageContext pageContext)
|
protected static Object |
fixEncoding(Object value,
String encoding)
Java Servlet Specification Version 2.3 SRV.4.9 says that a servlet engine should read a request as ISO-8859-1 if request.getCharacterEncoding() returns null. |
Object |
get(Object key)
|
Object |
get(String key,
boolean checkParent)
Like get, but you can explicity indicate if to search 'parent' Contextes as well. |
abstract Backing |
getBacking()
Returns the Map which will be used for actually storing stuff. |
(package private) static String |
getDefaultCharacterEncoding(PageContext pageContext)
|
String |
getId()
|
Object |
getObject(String key)
|
PageContext |
getPageContext()
|
(package private) Pair |
getPair(String key,
boolean checkParent)
This function takes a key, which can contain dots. |
abstract ContextContainer |
getParent()
|
(package private) static boolean |
isContextIdentifierChar(char c)
|
boolean |
isPresent(String key)
|
boolean |
isRegistered(String key)
|
protected Set<String> |
keySet(boolean checkParent)
|
static String |
locationToString(int i)
|
Object |
put(String key,
Object value)
Not all Strings can be allowed as keys. |
void |
register(String newId,
Object n)
|
void |
register(String newId,
Object n,
boolean check)
|
protected void |
register(String newId,
Object n,
boolean check,
boolean checkParent)
|
void |
register(String newId,
WriterHelper helper,
boolean check)
|
(package private) void |
registerAll(Map<String,Object> map)
|
void |
registerNode(String newId,
Node n)
|
void |
release(PageContext pc,
ContextContainer p)
|
Object |
remove(Object key)
|
void |
reregister(String id,
Object n)
|
void |
setJspVar(PageContext pageContext,
String jspvar,
int type,
Object value)
|
void |
setParent(PageContext pc,
ContextContainer p)
|
protected boolean |
simpleContainsKey(String key,
boolean checkParent)
Like containsKey but doesn't check for dots. |
protected Object |
simpleGet(String key,
boolean checkParent)
Like get, but does not try to search dots, because you know already that there aren't. |
static int |
stringToLocation(String s)
|
String |
toString()
|
void |
unRegister(String key)
|
protected void |
unRegister(String key,
boolean checkParent)
|
(package private) void |
unRegisterAll(Set<String> set)
|
| Methods inherited from class java.util.AbstractMap |
|---|
clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
containsValue, equals, hashCode, isEmpty, keySet, putAll, size, values |
| Field Detail |
|---|
public static final int LOCATION_NOTSET
public static final int LOCATION_PAGE
public static final int LOCATION_PARENT
public static final int LOCATION_PARAMETERS
public static final int LOCATION_MULTIPART
public static final int LOCATION_MULTIPART_OPT
public static final int LOCATION_SESSION
public static final int LOCATION_COOKIE
public static final int LOCATION_ATTRIBUTES
public static final int LOCATION_REQUEST
public static final int LOCATION_APPLICATION
public static final int LOCATION_THIS
| Constructor Detail |
|---|
public ContextContainer(String i)
| Method Detail |
|---|
public static int stringToLocation(String s)
throws JspTagException
JspTagExceptionpublic static String locationToString(int i)
static boolean isContextIdentifierChar(char c)
public abstract Backing getBacking()
public void release(PageContext pc,
ContextContainer p)
public Set<Map.Entry<String,Object>> entrySet()
entrySet in interface Map<String,Object>entrySet in class AbstractMap<String,Object>public Set<Map.Entry<String,Object>> entrySet(boolean checkParent)
public String getId()
public void setParent(PageContext pc,
ContextContainer p)
public abstract ContextContainer getParent()
public PageContext getPageContext()
public Object put(String key,
Object value)
put in interface Map<String,Object>put in class AbstractMap<String,Object>
Pair getPair(String key,
boolean checkParent)
throws JspTagException
JspTagException
protected boolean simpleContainsKey(String key,
boolean checkParent)
public boolean containsKey(String key,
boolean checkParent)
throws JspTagException
key - The key to searchcheckParent - If this is false, it will only look in the current Container (and below).
JspTagExceptionpublic boolean containsKey(Object key)
containsKey in interface Map<String,Object>containsKey in class AbstractMap<String,Object>
protected Object simpleGet(String key,
boolean checkParent)
public Object get(String key,
boolean checkParent)
throws JspTagException
JspTagExceptionpublic Object get(Object key)
get in interface Map<String,Object>get in class AbstractMap<String,Object>protected Set<String> keySet(boolean checkParent)
public Object getObject(String key)
throws JspTagException
JspTagException
public void register(String newId,
Object n,
boolean check)
throws JspTagException
JspTagException
public void register(String newId,
WriterHelper helper,
boolean check)
throws JspTagException
JspTagException
protected void register(String newId,
Object n,
boolean check,
boolean checkParent)
throws JspTagException
JspTagException
public void register(String newId,
Object n)
throws JspTagException
JspTagException
void registerAll(Map<String,Object> map)
throws JspTagException
JspTagException
void unRegisterAll(Set<String> set)
throws JspTagException
JspTagException
public void registerNode(String newId,
Node n)
throws JspTagException
JspTagException
public boolean isRegistered(String key)
throws JspTagException
JspTagExceptionpublic Object remove(Object key)
remove in interface Map<String,Object>remove in class AbstractMap<String,Object>public void clear()
clear in interface Map<String,Object>clear in class AbstractMap<String,Object>
public void unRegister(String key)
throws JspTagException
JspTagException
protected void unRegister(String key,
boolean checkParent)
throws JspTagException
JspTagException
public void reregister(String id,
Object n)
throws JspTagException
JspTagException
protected static Object fixEncoding(Object value,
String encoding)
throws TaglibException
TaglibException
public static Object fixEncoding(Object value,
PageContext pageContext)
throws TaglibException
TaglibException
public Object find(PageContext pageContext,
int from,
String referId)
throws JspTagException
JspTagException
public Object find(PageContext pageContext,
String externid)
throws JspTagException
JspTagException
public Object findAndRegister(PageContext pageContext,
int from,
String referId,
String newId)
throws JspTagException
JspTagException
public Object findAndRegister(PageContext pageContext,
int from,
String referId,
String newId,
boolean check)
throws JspTagException
JspTagException
public Object findAndRegister(PageContext pageContext,
String externid,
String newId)
throws JspTagException
JspTagException
public Object findAndRegister(PageContext pageContext,
String externid,
String newId,
boolean check)
throws JspTagException
JspTagException
public Object findAndRegister(PageContext pageContext,
String id)
throws JspTagException
JspTagException
public String findAndRegisterString(PageContext pageContext,
String id)
throws JspTagException
JspTagException
public String findAndRegisterString(PageContext pageContext,
String id,
boolean check)
throws JspTagException
JspTagException
public boolean isPresent(String key)
throws JspTagException
JspTagException
public void setJspVar(PageContext pageContext,
String jspvar,
int type,
Object value)
static String getDefaultCharacterEncoding(PageContext pageContext)
public String toString()
toString in class AbstractMap<String,Object>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||