Class ChainedVelocityContext
- java.lang.Object
-
- org.apache.velocity.context.AbstractContext
-
- org.apache.velocity.VelocityContext
-
- com.atlassian.confluence.velocity.context.ChainedVelocityContext
-
- All Implemented Interfaces:
DefaultValueStackProvider
,Cloneable
,org.apache.struts2.util.ValueStackProvider
,org.apache.velocity.context.Context
,org.apache.velocity.context.InternalEventContext
public final class ChainedVelocityContext extends org.apache.velocity.VelocityContext implements DefaultValueStackProvider
Extends the defaultVelocityContext
to ensure that thegetKeys()
method returns all keys from the current context and the chained context.
-
-
Constructor Summary
Constructors Constructor Description ChainedVelocityContext(org.apache.velocity.context.Context delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.velocity.app.event.EventCartridge
attachEventCartridge(org.apache.velocity.app.event.EventCartridge arg0)
boolean
getAllowRendering()
int
getCurrentMacroCallDepth()
String
getCurrentMacroName()
org.apache.velocity.runtime.resource.Resource
getCurrentResource()
String
getCurrentTemplateName()
org.apache.velocity.app.event.EventCartridge
getEventCartridge()
Object[]
getKeys()
This method is inherently unreliable because if the chained context has another chained context, it may not delegate correctly if it is using the default implementation inAbstractContext
.List
getMacroLibraries()
Object[]
getMacroNameStack()
Object[]
getTemplateNameStack()
org.apache.velocity.util.introspection.IntrospectionCacheData
icacheGet(Object arg0)
void
icachePut(Object arg0, org.apache.velocity.util.introspection.IntrospectionCacheData arg1)
void
popCurrentMacroName()
void
popCurrentTemplateName()
void
pushCurrentMacroName(String arg0)
void
pushCurrentTemplateName(String arg0)
void
setAllowRendering(boolean arg0)
void
setCurrentResource(org.apache.velocity.runtime.resource.Resource arg0)
void
setMacroLibraries(List arg0)
-
Methods inherited from class org.apache.velocity.VelocityContext
clone, internalContainsKey, internalGet, internalGetKeys, internalPut, internalRemove
-
Methods inherited from class org.apache.velocity.context.AbstractContext
containsKey, get, getChainedContext, put, remove
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.velocity.context.DefaultValueStackProvider
getValueStack
-
-
-
-
Method Detail
-
getKeys
public Object[] getKeys()
This method is inherently unreliable because if the chained context has another chained context, it may not delegate correctly if it is using the default implementation inAbstractContext
.- Specified by:
getKeys
in interfaceorg.apache.velocity.context.Context
- Overrides:
getKeys
in classorg.apache.velocity.context.AbstractContext
-
pushCurrentTemplateName
public void pushCurrentTemplateName(String arg0)
-
popCurrentTemplateName
public void popCurrentTemplateName()
-
getCurrentTemplateName
public String getCurrentTemplateName()
-
getTemplateNameStack
public Object[] getTemplateNameStack()
-
pushCurrentMacroName
public void pushCurrentMacroName(String arg0)
-
popCurrentMacroName
public void popCurrentMacroName()
-
getCurrentMacroName
public String getCurrentMacroName()
-
getCurrentMacroCallDepth
public int getCurrentMacroCallDepth()
-
getMacroNameStack
public Object[] getMacroNameStack()
-
icacheGet
public org.apache.velocity.util.introspection.IntrospectionCacheData icacheGet(Object arg0)
-
icachePut
public void icachePut(Object arg0, org.apache.velocity.util.introspection.IntrospectionCacheData arg1)
-
setCurrentResource
public void setCurrentResource(org.apache.velocity.runtime.resource.Resource arg0)
-
getCurrentResource
public org.apache.velocity.runtime.resource.Resource getCurrentResource()
-
getAllowRendering
public boolean getAllowRendering()
-
setAllowRendering
public void setAllowRendering(boolean arg0)
-
setMacroLibraries
public void setMacroLibraries(List arg0)
-
getMacroLibraries
public List getMacroLibraries()
-
attachEventCartridge
public org.apache.velocity.app.event.EventCartridge attachEventCartridge(org.apache.velocity.app.event.EventCartridge arg0)
- Specified by:
attachEventCartridge
in interfaceorg.apache.velocity.context.InternalEventContext
-
getEventCartridge
public org.apache.velocity.app.event.EventCartridge getEventCartridge()
- Specified by:
getEventCartridge
in interfaceorg.apache.velocity.context.InternalEventContext
-
-