Package com.xpn.xwiki.render
Class ScriptVelocityContext
- java.lang.Object
-
- org.apache.velocity.context.AbstractContext
-
- org.apache.velocity.VelocityContext
-
- org.xwiki.velocity.XWikiVelocityContext
-
- com.xpn.xwiki.render.ScriptVelocityContext
-
- All Implemented Interfaces:
Serializable,Cloneable,org.apache.velocity.context.Context,org.apache.velocity.context.InternalEventContext
public class ScriptVelocityContext extends org.xwiki.velocity.XWikiVelocityContextMaintains the current ScriptContext in sync with any modification of the VelocityContext.- Since:
- 8.3M1
- Version:
- $Id: f221a95ccfcff8340793daf80c01bca6205ea171 $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ScriptVelocityContext(org.apache.velocity.VelocityContext parent, boolean logDeprecated, Set<String> reservedBindings)ScriptVelocityContext(org.apache.velocity.VelocityContext parent, Set<String> reservedBindings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.velocity.app.event.EventCartridgeattachEventCartridge(org.apache.velocity.app.event.EventCartridge arg0)intgetCurrentMacroCallDepth()StringgetCurrentMacroName()org.apache.velocity.runtime.resource.ResourcegetCurrentResource()StringgetCurrentTemplateName()org.apache.velocity.app.event.EventCartridgegetEventCartridge()List<org.apache.velocity.Template>getMacroLibraries()String[]getMacroNameStack()ScriptContextgetScriptContext()String[]getTemplateNameStack()org.apache.velocity.util.introspection.IntrospectionCacheDataicacheGet(Object arg0)voidicachePut(Object arg0, org.apache.velocity.util.introspection.IntrospectionCacheData arg1)ObjectinternalPut(String key, Object value)ObjectinternalRemove(String key)voidpopCurrentMacroName()voidpopCurrentTemplateName()voidpushCurrentMacroName(String arg0)voidpushCurrentTemplateName(String arg0)voidsetCurrentResource(org.apache.velocity.runtime.resource.Resource arg0)voidsetMacroLibraries(List<org.apache.velocity.Template> arg0)voidsetScriptContext(ScriptContext scriptContext)-
Methods inherited from class org.apache.velocity.VelocityContext
clone, internalContainsKey, internalGet, internalGetKeys
-
-
-
-
Constructor Detail
-
ScriptVelocityContext
public ScriptVelocityContext(org.apache.velocity.VelocityContext parent, Set<String> reservedBindings)- Parameters:
parent- the initial Velocity contextreservedBindings- the binding that should not be synchronized
-
ScriptVelocityContext
public ScriptVelocityContext(org.apache.velocity.VelocityContext parent, boolean logDeprecated, Set<String> reservedBindings)- Parameters:
parent- the initial Velocity contextlogDeprecated- true if use of deprecated binding should be loggedreservedBindings- the binding that should not be synchronized- Since:
- 12.10, 12.6.5
-
-
Method Detail
-
getScriptContext
public ScriptContext getScriptContext()
- Returns:
- the current script context
-
setScriptContext
public void setScriptContext(ScriptContext scriptContext)
- Parameters:
scriptContext- the current script context
-
internalPut
public Object internalPut(String key, Object value)
- Overrides:
internalPutin classorg.apache.velocity.VelocityContext
-
internalRemove
public Object internalRemove(String key)
- Overrides:
internalRemovein classorg.apache.velocity.VelocityContext
-
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:
attachEventCartridgein interfaceorg.apache.velocity.context.InternalEventContext
-
getEventCartridge
public org.apache.velocity.app.event.EventCartridge getEventCartridge()
- Specified by:
getEventCartridgein interfaceorg.apache.velocity.context.InternalEventContext
-
-