|
||||||||||
| 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
protected class 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 |
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)
get in interface Contextkey - The name of the desired value.
Context.get(java.lang.String)
public Object put(String key,
Object value)
Context
put in interface Contextkey - The name to key the provided value with.value - The corresponding value.Context.put(java.lang.String key, java.lang.Object value)public boolean containsKey(Object key)
containsKey in interface Contextkey - The key to look for.
Context.containsKey(java.lang.Object key)public Object[] getKeys()
Context
getKeys in interface ContextContext.getKeys()public Object remove(Object key)
remove in interface Contextkey - The name of the value to remove.
null
if unmapped.Context.remove(java.lang.Object key)public void pushCurrentTemplateName(String s)
s - current template nameInternalHousekeepingContext.pushCurrentTemplateName(java.lang.String s)public void popCurrentTemplateName()
InternalHousekeepingContext.popCurrentTemplateName()public String getCurrentTemplateName()
InternalHousekeepingContext.getCurrentTemplateName()public Object[] getTemplateNameStack()
InternalHousekeepingContext.getTemplateNameStack()public IntrospectionCacheData icacheGet(Object key)
key - key to find in cache
InternalHousekeepingContext.icacheGet(java.lang.Object key)
public void icachePut(Object key,
IntrospectionCacheData o)
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)
InternalHousekeepingContext.setCurrentResource(org.apache.velocity.runtime.resource.Resource r)public Resource getCurrentResource()
InternalHousekeepingContext.getCurrentResource()public InternalContextAdapter getBaseContext()
InternalWrapperContext
getBaseContext in interface InternalWrapperContextInternalWrapperContext.getBaseContext()public Context getInternalUserContext()
InternalWrapperContext
getInternalUserContext in interface InternalWrapperContextInternalWrapperContext.getInternalUserContext()public EventCartridge attachEventCartridge(EventCartridge ec)
attachEventCartridge in interface InternalEventContextInternalEventContext.attachEventCartridge(org.apache.velocity.app.event.EventCartridge ec)public EventCartridge getEventCartridge()
getEventCartridge in interface InternalEventContextInternalEventContext.getEventCartridge()public boolean getAllowRendering()
InternalHousekeepingContext.getAllowRendering()public void setAllowRendering(boolean v)
InternalHousekeepingContext.setAllowRendering(boolean v)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||