|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.velocity.context.VMContext
public class 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.
| 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(Object key)
not yet impl |
Object |
get(String key)
Impl of the Context.gut() method. |
boolean |
getAllowRendering()
Checks to see if rendering should be allowed. |
InternalContextAdapter |
getBaseContext()
returns the base full context impl |
Resource |
getCurrentResource()
temporary fix to enable #include() to figure out current encoding. |
String |
getCurrentTemplateName()
get the current template name |
EventCartridge |
getEventCartridge()
|
Context |
getInternalUserContext()
return the inner / user context |
Object[] |
getKeys()
impl badly |
Object[] |
getTemplateNameStack()
Returns the template name stack in form of an array. |
IntrospectionCacheData |
icacheGet(Object key)
returns an IntrospectionCache Data (@see IntrospectionCacheData) object if exists for the key |
void |
icachePut(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(String s)
set the current template name on top of stack |
Object |
put(String key,
Object value)
Impl of the Context.put() method. |
Object |
remove(Object key)
impl badly |
void |
setAllowRendering(boolean v)
Set whether rendering is allowed. |
void |
setCurrentResource(Resource r)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VMContext(InternalContextAdapter inner,
RuntimeServices rsvc)
| Method Detail |
|---|
public Context getInternalUserContext()
getInternalUserContext in interface InternalWrapperContextpublic InternalContextAdapter getBaseContext()
InternalWrapperContext
getBaseContext in interface InternalWrapperContextpublic void addVMProxyArg(VMProxyArg vmpa)
vmpa - VMProxyArg to add
public Object put(String key,
Object value)
put in interface Contextkey - name of item to setvalue - object to set to key
public Object get(String key)
get in interface Contextkey - name of item to get
public boolean containsKey(Object key)
containsKey in interface Contextkey - The key to look for.
public Object[] getKeys()
getKeys in interface Contextpublic Object remove(Object key)
remove in interface Contextkey - The name of the value to remove.
null
if unmapped.public void pushCurrentTemplateName(String s)
s - current template namepublic void popCurrentTemplateName()
public String getCurrentTemplateName()
public Object[] getTemplateNameStack()
public IntrospectionCacheData icacheGet(Object key)
key - key to find in cache
public void icachePut(Object key,
IntrospectionCacheData o)
key - keyo - IntrospectionCacheData object to place in cachepublic boolean getAllowRendering()
public void setAllowRendering(boolean v)
public EventCartridge attachEventCartridge(EventCartridge ec)
attachEventCartridge in interface InternalEventContextpublic EventCartridge getEventCartridge()
getEventCartridge in interface InternalEventContextpublic void setCurrentResource(Resource r)
public Resource getCurrentResource()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||