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.XWikiVelocityContext
Maintains 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.EventCartridge
attachEventCartridge(org.apache.velocity.app.event.EventCartridge arg0)
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()
ScriptContext
getScriptContext()
String[]
getTemplateNameStack()
org.apache.velocity.util.introspection.IntrospectionCacheData
icacheGet(Object arg0)
void
icachePut(Object arg0, org.apache.velocity.util.introspection.IntrospectionCacheData arg1)
Object
internalPut(String key, Object value)
Object
internalRemove(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)
void
setScriptContext(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:
internalPut
in classorg.apache.velocity.VelocityContext
-
internalRemove
public Object internalRemove(String key)
- Overrides:
internalRemove
in 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:
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
-
-