|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.apache.velocity.context.VMContext
This is a special, internal-use-only context implementation to be used for the new Velocimacro implementation. The main distinguishing feature is the management of the VMProxyArg objects in the put() and get() methods. Further, this context also supports the 'VM local context' mode, where any get() or put() of references that aren't args to the VM are considered local to the vm, protecting the global context.
| Field Summary | |
(package private) InternalContextAdapter |
innerContext
the base context store. |
(package private) java.util.HashMap |
localcontext
container for any local or constant VMProxy items |
private boolean |
localcontextscope
support for local context scope feature, where all references are local |
(package private) java.util.HashMap |
vmproxyhash
container for our VMProxy Objects |
(package private) InternalContextAdapter |
wrappedContext
context that we are wrapping |
| Constructor Summary | |
VMContext(InternalContextAdapter inner,
RuntimeServices rsvc)
CTOR, wraps an ICA |
|
| Method Summary | |
void |
addVMProxyArg(VMProxyArg vmpa)
Used to put VMProxyArgs into this context. |
EventCartridge |
attachEventCartridge(EventCartridge ec)
|
boolean |
containsKey(java.lang.Object key)
not yet impl |
java.lang.Object |
get(java.lang.String key)
Impl of the Context.gut() method. |
InternalContextAdapter |
getBaseContext()
returns the base full context impl |
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()
return the inner / user context |
java.lang.Object[] |
getKeys()
impl badly |
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)
Impl of the Context.put() method. |
java.lang.Object |
remove(java.lang.Object key)
impl badly |
void |
setCurrentResource(Resource r)
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
java.util.HashMap vmproxyhash
java.util.HashMap localcontext
InternalContextAdapter innerContext
InternalContextAdapter wrappedContext
private boolean localcontextscope
| Constructor Detail |
public VMContext(InternalContextAdapter inner,
RuntimeServices rsvc)
| Method Detail |
public Context getInternalUserContext()
getInternalUserContext in interface InternalWrapperContextpublic InternalContextAdapter getBaseContext()
InternalWrapperContextgetBaseContext in interface InternalWrapperContextpublic void addVMProxyArg(VMProxyArg vmpa)
vmpa - VMProxyArg to add
public java.lang.Object put(java.lang.String key,
java.lang.Object value)
put in interface Contextkey - name of item to setvalue - object to set to keypublic java.lang.Object get(java.lang.String key)
get in interface Contextkey - name of item to getpublic boolean containsKey(java.lang.Object key)
containsKey in interface Contextorg.apache.velocity.context.Contextkey - The key to look for.public java.lang.Object[] getKeys()
getKeys in interface Contextpublic java.lang.Object remove(java.lang.Object key)
remove in interface Contextorg.apache.velocity.context.Contextkey - The name of the value to remove.null
if unmapped.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 EventCartridge attachEventCartridge(EventCartridge ec)
attachEventCartridge in interface InternalEventContextpublic EventCartridge getEventCartridge()
getEventCartridge in interface InternalEventContextpublic void setCurrentResource(Resource r)
setCurrentResource in interface InternalHousekeepingContextpublic Resource getCurrentResource()
InternalHousekeepingContextgetCurrentResource in interface InternalHousekeepingContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||