|
|||||||||||
| 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.
| Field Summary | |
private boolean |
active
|
private InternalContextAdapter |
innerContext
|
private java.lang.String |
loopVariableKey
|
| Constructor Summary | |
private |
Foreach.NullHolderContext(java.lang.String key,
InternalContextAdapter context)
Create the context as a wrapper to be used within the foreach |
| Method Summary | |
EventCartridge |
attachEventCartridge(EventCartridge ec)
|
boolean |
containsKey(java.lang.Object key)
Does the context contain the key |
java.lang.Object |
get(java.lang.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. |
java.lang.String |
getCurrentTemplateName()
get the current template name |
EventCartridge |
getEventCartridge()
|
Context |
getInternalUserContext()
returns the wrapped user context |
java.lang.Object[] |
getKeys()
Get all the keys for the values in the context |
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)
Adds a name/value pair to the context. |
java.lang.Object |
remove(java.lang.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 |
| Field Detail |
private InternalContextAdapter innerContext
private java.lang.String loopVariableKey
private boolean active
| Constructor Detail |
private Foreach.NullHolderContext(java.lang.String key,
InternalContextAdapter context)
key - the reference used in the foreachcontext - the parent context| Method Detail |
public java.lang.Object get(java.lang.String key)
get in interface Contextkey - The name of the desired value.
Context.get(java.lang.String)
public java.lang.Object put(java.lang.String key,
java.lang.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(java.lang.Object key)
containsKey in interface Contextkey - The key to look for.
Context.containsKey(java.lang.Object key)public java.lang.Object[] getKeys()
Context
getKeys in interface ContextContext.getKeys()public java.lang.Object remove(java.lang.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(java.lang.String s)
InternalHousekeepingContext
pushCurrentTemplateName in interface InternalHousekeepingContexts - current template nameInternalHousekeepingContext.pushCurrentTemplateName(java.lang.String s)public void popCurrentTemplateName()
InternalHousekeepingContext
popCurrentTemplateName in interface InternalHousekeepingContextInternalHousekeepingContext.popCurrentTemplateName()public java.lang.String getCurrentTemplateName()
InternalHousekeepingContext
getCurrentTemplateName in interface InternalHousekeepingContextInternalHousekeepingContext.getCurrentTemplateName()public java.lang.Object[] getTemplateNameStack()
InternalHousekeepingContext
getTemplateNameStack in interface InternalHousekeepingContextInternalHousekeepingContext.getTemplateNameStack()public IntrospectionCacheData icacheGet(java.lang.Object key)
InternalHousekeepingContext
icacheGet in interface InternalHousekeepingContextkey - key to find in cache
InternalHousekeepingContext.icacheGet(java.lang.Object key)
public void icachePut(java.lang.Object key,
IntrospectionCacheData o)
InternalHousekeepingContext
icachePut in interface InternalHousekeepingContextkey - 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 InternalHousekeepingContextInternalHousekeepingContext.setCurrentResource(org.apache.velocity.runtime.resource.Resource r)public Resource getCurrentResource()
InternalHousekeepingContext
getCurrentResource in interface InternalHousekeepingContextInternalHousekeepingContext.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 in interface InternalHousekeepingContextInternalHousekeepingContext.getAllowRendering()public void setAllowRendering(boolean v)
InternalHousekeepingContext
setAllowRendering in interface InternalHousekeepingContextInternalHousekeepingContext.setAllowRendering(boolean v)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||