Class ConfluenceStrutsVelocityContext

java.lang.Object
org.apache.velocity.context.AbstractContext
org.apache.velocity.VelocityContext
org.apache.struts2.views.velocity.StrutsVelocityContext
com.atlassian.confluence.setup.struts.ConfluenceStrutsVelocityContext
All Implemented Interfaces:
OutputMimeTypeAwareContext, Cloneable, org.apache.struts2.util.ValueStackProvider, org.apache.velocity.context.Context, org.apache.velocity.context.InternalEventContext

public final class ConfluenceStrutsVelocityContext extends org.apache.struts2.views.velocity.StrutsVelocityContext implements OutputMimeTypeAwareContext
A StrutsVelocityContext that is OutputMimeTypeAwareContext
  • Constructor Details

    • ConfluenceStrutsVelocityContext

      public ConfluenceStrutsVelocityContext(List<org.apache.velocity.VelocityContext> chainedContexts, com.opensymphony.xwork2.util.ValueStack stack)
  • Method Details

    • stackGet

      protected Object stackGet(String key)
      Velocity keys that cannot be resolved in the ordinary context map are looked up in the ValueStack. However, this fall back behaviour can trigger forbidden access warnings in SecurityMemberAccess if these keys happen to exist as protected fields or methods in the Action class. This method override suppresses such warnings from flooding the logs.
      Overrides:
      stackGet in class org.apache.struts2.views.velocity.StrutsVelocityContext
    • getOutputMimeType

      public String getOutputMimeType()
      Specified by:
      getOutputMimeType in interface OutputMimeTypeAwareContext
      Returns:
      the MIME type of the destination format for this context.
    • setOutputMimeType

      public void setOutputMimeType(String outputMimeType)
    • 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