|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.velocity.runtime.directive.Foreach.NullHolderContext
A special context to use when the foreach iterator returns a null. This is required since the standard context may not support nulls. All puts and gets are passed through, except for the foreach iterator key.
Method Summary | |
EventCartridge |
attachEventCartridge(EventCartridge ec)
|
boolean |
containsKey(Object key)
Does the context contain the key |
Object |
get(String key)
Get an object from the context, or null if the key is equal to the loop variable |
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()
Returns the wrapped user context. |
Object[] |
getKeys()
Get all the keys for the values in the context. |
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 |
Object |
localPut(String key,
Object value)
Allows callers to explicitly put objects in the local context. |
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)
Adds a name/value pair to the context. |
Object |
remove(Object key)
Remove an object from the context |
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 |
Method Detail |
public Object get(String key) throws MethodInvocationException
get
in interface Context
key
- The name of the desired value.
MethodInvocationException
- passes on potential exception from reference method callContext.get(java.lang.String)
public Object put(String key, Object value)
Context
put
in interface Context
key
- The name to key the provided value with.value
- The corresponding value.
Context.put(java.lang.String key, java.lang.Object value)
public Object localPut(String key, Object value)
localPut
in interface InternalWrapperContext
key
- name of item to set.value
- object to set to key.
InternalWrapperContext.localPut(String, Object)
public boolean containsKey(Object key)
containsKey
in interface Context
key
- The key to look for.
Context.containsKey(java.lang.Object key)
public Object[] getKeys()
Context
getKeys
in interface Context
Context.getKeys()
public Object remove(Object key)
remove
in interface Context
key
- The name of the value to remove.
null
if unmapped.Context.remove(java.lang.Object key)
public void pushCurrentTemplateName(String s)
org.apache.velocity.context.InternalHousekeepingContext
pushCurrentTemplateName
in interface org.apache.velocity.context.InternalHousekeepingContext
s
- current template nameInternalHousekeepingContext.pushCurrentTemplateName(java.lang.String s)
public void popCurrentTemplateName()
org.apache.velocity.context.InternalHousekeepingContext
popCurrentTemplateName
in interface org.apache.velocity.context.InternalHousekeepingContext
InternalHousekeepingContext.popCurrentTemplateName()
public String getCurrentTemplateName()
org.apache.velocity.context.InternalHousekeepingContext
getCurrentTemplateName
in interface org.apache.velocity.context.InternalHousekeepingContext
InternalHousekeepingContext.getCurrentTemplateName()
public Object[] getTemplateNameStack()
org.apache.velocity.context.InternalHousekeepingContext
getTemplateNameStack
in interface org.apache.velocity.context.InternalHousekeepingContext
InternalHousekeepingContext.getTemplateNameStack()
public IntrospectionCacheData icacheGet(Object key)
org.apache.velocity.context.InternalHousekeepingContext
icacheGet
in interface org.apache.velocity.context.InternalHousekeepingContext
key
- key to find in cache
InternalHousekeepingContext.icacheGet(java.lang.Object key)
public void icachePut(Object key, IntrospectionCacheData o)
org.apache.velocity.context.InternalHousekeepingContext
icachePut
in interface org.apache.velocity.context.InternalHousekeepingContext
key
- keyo
- IntrospectionCacheData object to place in cacheInternalHousekeepingContext.icachePut(java.lang.Object key, org.apache.velocity.util.introspection.IntrospectionCacheData o)
public void setCurrentResource(Resource r)
setCurrentResource
in interface org.apache.velocity.context.InternalHousekeepingContext
r
- InternalHousekeepingContext.setCurrentResource(org.apache.velocity.runtime.resource.Resource r)
public Resource getCurrentResource()
org.apache.velocity.context.InternalHousekeepingContext
getCurrentResource
in interface org.apache.velocity.context.InternalHousekeepingContext
InternalHousekeepingContext.getCurrentResource()
public InternalContextAdapter getBaseContext()
InternalWrapperContext
getBaseContext
in interface InternalWrapperContext
InternalWrapperContext.getBaseContext()
public Context getInternalUserContext()
InternalWrapperContext
getInternalUserContext
in interface InternalWrapperContext
InternalWrapperContext.getInternalUserContext()
public EventCartridge attachEventCartridge(EventCartridge ec)
attachEventCartridge
in interface InternalEventContext
ec
-
InternalEventContext.attachEventCartridge(org.apache.velocity.app.event.EventCartridge ec)
public EventCartridge getEventCartridge()
getEventCartridge
in interface InternalEventContext
InternalEventContext.getEventCartridge()
public boolean getAllowRendering()
org.apache.velocity.context.InternalHousekeepingContext
getAllowRendering
in interface org.apache.velocity.context.InternalHousekeepingContext
InternalHousekeepingContext.getAllowRendering()
public void setAllowRendering(boolean v)
org.apache.velocity.context.InternalHousekeepingContext
setAllowRendering
in interface org.apache.velocity.context.InternalHousekeepingContext
v
- InternalHousekeepingContext.setAllowRendering(boolean v)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |