Package org.apache.struts2.views.velocity

# Class StrutsVelocityContext

java.lang.Object
org.apache.velocity.context.AbstractContext
org.apache.velocity.VelocityContext
org.apache.struts2.views.velocity.StrutsVelocityContext

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `ValueStackProvider`, `org.apache.velocity.context.Context`, `org.apache.velocity.context.InternalEventContext`

public class StrutsVelocityContext extends org.apache.velocity.VelocityContext implements ValueStackProvider

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StrutsVelocityContext(List<org.apache.velocity.VelocityContext> chainedContexts, ValueStack stack)`
  Creates a content with link to the ValueStack and any other Velocity contexts

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.apache.velocity.app.event.EventCartridge`
  `attachEventCartridge(org.apache.velocity.app.event.EventCartridge arg0)`
  `protected Object`
  `chainedContextGet(String key)`
  `protected List<Function<String,Object>>`
  `contextGetterList()`
  `int`
  `getCurrentMacroCallDepth()`
  `String`
  `getCurrentMacroName()`
  `org.apache.velocity.runtime.resource.Resource`
  `getCurrentResource()`
  `String`
  `getCurrentTemplateName()`
  `org.apache.velocity.app.event.EventCartridge`
  `getEventCartridge()`
  `List<org.apache.velocity.Template>`
  `getMacroLibraries()`
  `String[]`
  `getMacroNameStack()`
  `String[]`
  `getTemplateNameStack()`
  `ValueStack`
  `getValueStack()`
  `org.apache.velocity.util.introspection.IntrospectionCacheData`
  `icacheGet(Object arg0)`
  `void`
  `icachePut(Object arg0, org.apache.velocity.util.introspection.IntrospectionCacheData arg1)`
  `boolean`
  `internalContainsKey(String key)`
  `Object`
  `internalGet(String key)`
  `void`
  `popCurrentMacroName()`
  `void`
  `popCurrentTemplateName()`
  `void`
  `pushCurrentMacroName(String arg0)`
  `void`
  `pushCurrentTemplateName(String arg0)`
  `void`
  `setCurrentResource(org.apache.velocity.runtime.resource.Resource arg0)`
  `void`
  `setMacroLibraries(List<org.apache.velocity.Template> arg0)`
  `protected Object`
  `stackGet(String key)`
  `protected Object`
  `superInternalGet(String key)`

  ### Methods inherited from class org.apache.velocity.VelocityContext

  `clone, internalGetKeys, internalPut, internalRemove`

  ### Methods inherited from class org.apache.velocity.context.AbstractContext

  `containsKey, get, getChainedContext, getKeys, put, remove`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### StrutsVelocityContext

    public StrutsVelocityContext(List<org.apache.velocity.VelocityContext> chainedContexts, ValueStack stack)
    Creates a content with link to the ValueStack and any other Velocity contexts
    Parameters:
      `chainedContexts` - Existing Velocity contexts to chain to
      `stack` - Struts ValueStack
    Since:
      6.0.0

- ## Method Details

  - ### internalContainsKey

    public boolean internalContainsKey(String key)
    Overrides:
      `internalContainsKey` in class `org.apache.velocity.VelocityContext`

  - ### internalGet

    public Object internalGet(String key)
    Overrides:
      `internalGet` in class `org.apache.velocity.VelocityContext`

  - ### contextGetterList

    protected List<Function<String,Object>> contextGetterList()

  - ### superInternalGet

    protected Object superInternalGet(String key)

  - ### stackGet

    protected Object stackGet(String key)

  - ### chainedContextGet

    protected Object chainedContextGet(String key)

  - ### getValueStack

    public ValueStack getValueStack()
    Specified by:
      `getValueStack` in interface `ValueStackProvider`

  - ### pushCurrentTemplateName

    public void pushCurrentTemplateName(String arg0)

  - ### popCurrentTemplateName

    public void popCurrentTemplateName()

  - ### getCurrentTemplateName

    public String getCurrentTemplateName()

  - ### getTemplateNameStack

    public String[] getTemplateNameStack()

  - ### pushCurrentMacroName

    public void pushCurrentMacroName(String arg0)

  - ### popCurrentMacroName

    public void popCurrentMacroName()

  - ### getCurrentMacroName

    public String getCurrentMacroName()

  - ### getCurrentMacroCallDepth

    public int getCurrentMacroCallDepth()

  - ### getMacroNameStack

    public String[] 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()

  - ### setMacroLibraries

    public void setMacroLibraries(List<org.apache.velocity.Template> arg0)

  - ### getMacroLibraries

    public List<org.apache.velocity.Template> 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`