|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.velocity.context.InternalContextAdapterImpl
This adapter class is the container for all context types for internal use. The AST now uses this class rather than the app-level Context interface to allow flexibility in the future. Currently, we have two context interfaces which must be supported :
Field Summary | |
(package private) Context |
context
the Context that we are wrapping |
(package private) InternalHousekeepingContext |
icb
the ICB we are wrapping. |
Constructor Summary | |
InternalContextAdapterImpl(Context c)
CTOR takes a Context and wraps it, delegating all 'data' calls to it. |
|
InternalContextAdapterImpl(Context c,
boolean avoid)
|
Method Summary | |
boolean |
containsKey(java.lang.Object key)
Indicates whether the specified key is in the context. |
java.lang.Object |
get(java.lang.String key)
Gets the value corresponding to the provided key from the context. |
InternalContextAdapter |
getBaseContext()
returns the base full context impl |
java.lang.String |
getCurrentTemplateName()
get the current template name |
Context |
getInternalUserContext()
returns the wrapped user context |
java.lang.Object[] |
getKeys()
Get all the keys for the values in the context |
java.lang.Object[] |
getTemplateNameStack()
Returns the template name stack in form of an array. |
IntrospectionCacheData |
icacheGet(java.lang.Object key)
returns an IntrospectionCache Data (@see IntrospectionCacheData) object if exists for the key |
void |
icachePut(java.lang.Object key,
IntrospectionCacheData o)
places an IntrospectionCache Data (@see IntrospectionCacheData) element in the cache for specified key |
void |
popCurrentTemplateName()
remove the current template name from stack |
void |
pushCurrentTemplateName(java.lang.String s)
set the current template name on top of stack |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Adds a name/value pair to the context. |
java.lang.Object |
remove(java.lang.Object key)
Removes the value associated with the specified key from the context. |
Methods inherited from class java.lang.Object |
|
Field Detail |
Context context
InternalHousekeepingContext icb
Constructor Detail |
public InternalContextAdapterImpl(Context c)
public InternalContextAdapterImpl(Context c, boolean avoid)
Method Detail |
public Context getInternalUserContext()
InternalWrapperContext
getInternalUserContext
in interface InternalWrapperContext
public void pushCurrentTemplateName(java.lang.String s)
InternalHousekeepingContext
pushCurrentTemplateName
in interface InternalHousekeepingContext
org.apache.velocity.context.InternalHousekeepingContext
s
- current template namepublic void popCurrentTemplateName()
InternalHousekeepingContext
popCurrentTemplateName
in interface InternalHousekeepingContext
public java.lang.String getCurrentTemplateName()
InternalHousekeepingContext
getCurrentTemplateName
in interface InternalHousekeepingContext
org.apache.velocity.context.InternalHousekeepingContext
public java.lang.Object[] getTemplateNameStack()
InternalHousekeepingContext
getTemplateNameStack
in interface InternalHousekeepingContext
org.apache.velocity.context.InternalHousekeepingContext
public IntrospectionCacheData icacheGet(java.lang.Object key)
InternalHousekeepingContext
icacheGet
in interface InternalHousekeepingContext
org.apache.velocity.context.InternalHousekeepingContext
key
- key to find in cachepublic void icachePut(java.lang.Object key, IntrospectionCacheData o)
InternalHousekeepingContext
icachePut
in interface InternalHousekeepingContext
org.apache.velocity.context.InternalHousekeepingContext
key
- keyo
- IntrospectionCacheData object to place in cachepublic java.lang.Object put(java.lang.String key, java.lang.Object value)
Context
put
in interface Context
org.apache.velocity.context.Context
key
- The name to key the provided value with.value
- The corresponding value.public java.lang.Object get(java.lang.String key)
Context
get
in interface Context
org.apache.velocity.context.Context
key
- The name of the desired value.public boolean containsKey(java.lang.Object key)
Context
containsKey
in interface Context
org.apache.velocity.context.Context
key
- The key to look for.public java.lang.Object[] getKeys()
Context
getKeys
in interface Context
public java.lang.Object remove(java.lang.Object key)
Context
remove
in interface Context
org.apache.velocity.context.Context
key
- The name of the value to remove.null
if unmapped.public InternalContextAdapter getBaseContext()
InternalWrapperContext
getBaseContext
in interface InternalWrapperContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |