|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.velocity.context.ChainedInternalContextAdapter org.apache.velocity.context.EvaluateContext
public class EvaluateContext
This is a special, internal-use-only context implementation to be
used for the #evaluate directive.
We use this context to chain the existing context, preventing any changes
from impacting the parent context. By separating this context into a
separate class it also allows for the future possibility of changing
the context behavior for the #evaluate directive.
Note that the context used to store values local to #evaluate()
is user defined but defaults to VelocityContext
.
Field Summary |
---|
Fields inherited from class org.apache.velocity.context.ChainedInternalContextAdapter |
---|
innerContext |
Constructor Summary | |
---|---|
EvaluateContext(InternalContextAdapter inner,
RuntimeServices rsvc)
Deprecated. CTOR, wraps an ICA |
Method Summary | |
---|---|
boolean |
containsKey(Object key)
Deprecated. Indicates whether the specified key is in the context. |
Object |
get(String key)
Deprecated. Retrieves from local or global context. |
Object[] |
getKeys()
Deprecated. Get all the keys for the values in the context. |
Object |
localPut(String key,
Object value)
Deprecated. Allows callers to explicitly put objects in the local context. |
Object |
put(String key,
Object value)
Deprecated. Put method also stores values in local scope |
Object |
remove(Object key)
Deprecated. Removes the value associated with the specified key from the context. |
Methods inherited from class org.apache.velocity.context.ChainedInternalContextAdapter |
---|
attachEventCartridge, getBaseContext, getCurrentMacroCallDepth, getCurrentMacroName, getCurrentResource, getCurrentTemplateName, getEventCartridge, getInternalUserContext, getMacroLibraries, getMacroNameStack, getTemplateNameStack, icacheGet, icachePut, popCurrentMacroName, popCurrentTemplateName, pushCurrentMacroName, pushCurrentTemplateName, setCurrentResource, setMacroLibraries |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EvaluateContext(InternalContextAdapter inner, RuntimeServices rsvc)
inner
- context for parent templatersvc
- Method Detail |
---|
public Object put(String key, Object value)
put
in interface Context
put
in class ChainedInternalContextAdapter
key
- name of item to setvalue
- object to set to key
public Object get(String key)
get
in interface Context
get
in class ChainedInternalContextAdapter
key
- name of item to get
public boolean containsKey(Object key)
Context
containsKey
in interface Context
containsKey
in class ChainedInternalContextAdapter
key
- The key to look for.
Context.containsKey(java.lang.Object)
public Object[] getKeys()
Context
getKeys
in interface Context
getKeys
in class ChainedInternalContextAdapter
Context.getKeys()
public Object remove(Object key)
Context
remove
in interface Context
remove
in class ChainedInternalContextAdapter
key
- The name of the value to remove.
null
if unmapped.Context.remove(java.lang.Object)
public Object localPut(String key, Object value)
localPut
in interface InternalWrapperContext
localPut
in class ChainedInternalContextAdapter
key
- name of item to set.value
- object to set to key.
InternalWrapperContext.localPut(java.lang.String,java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |