|
||||||||||
| 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 user data Context that we are wrapping |
(package private) InternalHousekeepingContext |
icb
the ICB we are wrapping. |
(package private) InternalEventContext |
iec
The InternalEventContext that we are wrapping. |
| Constructor Summary | |
InternalContextAdapterImpl(Context c)
CTOR takes a Context and wraps it, delegating all 'data' calls to it. |
|
| Method Summary | |
EventCartridge |
attachEventCartridge(EventCartridge ec)
|
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 context that we are wrapping. |
Resource |
getCurrentResource()
temporary fix to enable #include() to figure out current encoding. |
java.lang.String |
getCurrentTemplateName()
get the current template name |
EventCartridge |
getEventCartridge()
|
Context |
getInternalUserContext()
returns the user data context that we are wrapping |
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. |
void |
setCurrentResource(Resource r)
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
Context context
InternalHousekeepingContext icb
InternalEventContext iec
| Constructor Detail |
public InternalContextAdapterImpl(Context c)
| Method Detail |
public void pushCurrentTemplateName(java.lang.String s)
InternalHousekeepingContextpushCurrentTemplateName in interface InternalHousekeepingContextorg.apache.velocity.context.InternalHousekeepingContexts - current template namepublic void popCurrentTemplateName()
InternalHousekeepingContextpopCurrentTemplateName in interface InternalHousekeepingContextpublic java.lang.String getCurrentTemplateName()
InternalHousekeepingContextgetCurrentTemplateName in interface InternalHousekeepingContextorg.apache.velocity.context.InternalHousekeepingContextpublic java.lang.Object[] getTemplateNameStack()
InternalHousekeepingContextgetTemplateNameStack in interface InternalHousekeepingContextorg.apache.velocity.context.InternalHousekeepingContextpublic IntrospectionCacheData icacheGet(java.lang.Object key)
InternalHousekeepingContexticacheGet in interface InternalHousekeepingContextorg.apache.velocity.context.InternalHousekeepingContextkey - key to find in cache
public void icachePut(java.lang.Object key,
IntrospectionCacheData o)
InternalHousekeepingContexticachePut in interface InternalHousekeepingContextorg.apache.velocity.context.InternalHousekeepingContextkey - keyo - IntrospectionCacheData object to place in cachepublic void setCurrentResource(Resource r)
setCurrentResource in interface InternalHousekeepingContextpublic Resource getCurrentResource()
InternalHousekeepingContextgetCurrentResource in interface InternalHousekeepingContext
public java.lang.Object put(java.lang.String key,
java.lang.Object value)
Contextput in interface Contextorg.apache.velocity.context.Contextkey - The name to key the provided value with.value - The corresponding value.public java.lang.Object get(java.lang.String key)
Contextget in interface Contextorg.apache.velocity.context.Contextkey - The name of the desired value.public boolean containsKey(java.lang.Object key)
ContextcontainsKey in interface Contextorg.apache.velocity.context.Contextkey - The key to look for.public java.lang.Object[] getKeys()
ContextgetKeys in interface Contextpublic java.lang.Object remove(java.lang.Object key)
Contextremove in interface Contextorg.apache.velocity.context.Contextkey - The name of the value to remove.null
if unmapped.public Context getInternalUserContext()
getInternalUserContext in interface InternalWrapperContextpublic InternalContextAdapter getBaseContext()
getBaseContext in interface InternalWrapperContextpublic EventCartridge attachEventCartridge(EventCartridge ec)
attachEventCartridge in interface InternalEventContextpublic EventCartridge getEventCartridge()
getEventCartridge in interface InternalEventContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||