Class ChainedVelocityContext

java.lang.Object
org.apache.velocity.context.AbstractContext
org.apache.velocity.VelocityContext
com.atlassian.confluence.velocity.context.ChainedVelocityContext
All Implemented Interfaces:
Cloneable, org.apache.velocity.context.Context, org.apache.velocity.context.InternalEventContext

public final class ChainedVelocityContext extends org.apache.velocity.VelocityContext
Extends the default VelocityContext to ensure that the getKeys() method returns all keys from the current context and the chained context.
  • Constructor Details

    • ChainedVelocityContext

      public ChainedVelocityContext(org.apache.velocity.context.Context delegate)
  • Method Details

    • 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 in AbstractContext.
      Specified by:
      getKeys in interface org.apache.velocity.context.Context
      Overrides:
      getKeys in class org.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 interface org.apache.velocity.context.InternalEventContext
    • getEventCartridge

      public org.apache.velocity.app.event.EventCartridge getEventCartridge()
      Specified by:
      getEventCartridge in interface org.apache.velocity.context.InternalEventContext