|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 Context
key
- The name of the desired value.
Context.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 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)
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 InternalWrapperContext
InternalWrapperContext.getBaseContext()
public Context getInternalUserContext()
InternalWrapperContext
getInternalUserContext
in interface InternalWrapperContext
InternalWrapperContext.getInternalUserContext()
public EventCartridge attachEventCartridge(EventCartridge ec)
attachEventCartridge
in interface InternalEventContext
InternalEventContext.attachEventCartridge(org.apache.velocity.app.event.EventCartridge ec)
public EventCartridge getEventCartridge()
getEventCartridge
in interface InternalEventContext
InternalEventContext.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 |