org.xwiki.rendering.internal.macro.script
Class DefaultScriptMacro

java.lang.Object
  extended by org.xwiki.rendering.macro.AbstractMacro<P>
      extended by org.xwiki.rendering.macro.script.AbstractScriptMacro<P>
          extended by org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro<DefaultScriptMacroParameters>
              extended by org.xwiki.rendering.internal.macro.script.DefaultScriptMacro
All Implemented Interfaces:
java.lang.Comparable<org.xwiki.rendering.macro.Macro<?>>, org.xwiki.component.phase.Initializable, org.xwiki.rendering.macro.Macro<DefaultScriptMacroParameters>, PrivilegedScriptMacro, ScriptMacro

@Component
@Named(value="script")
@Singleton
public class DefaultScriptMacro
extends AbstractJSR223ScriptMacro<DefaultScriptMacroParameters>

Execute script in provided script language.

Since:
1.7M3
Version:
$Id$

Field Summary
 
Fields inherited from class org.xwiki.rendering.macro.script.AbstractScriptMacro
documentAccessBridge, execution
 
Fields inherited from class org.xwiki.rendering.macro.AbstractMacro
beanManager, DEFAULT_CATEGORY_CONTENT, DEFAULT_CATEGORY_DEVELOPMENT, DEFAULT_CATEGORY_FORMATTING, DEFAULT_CATEGORY_NAVIGATION
 
Constructor Summary
DefaultScriptMacro()
          Create and initialize the descriptor of the macro.
 
Method Summary
protected  java.lang.String getScriptEngineName(DefaultScriptMacroParameters parameters, org.xwiki.rendering.transformation.MacroTransformationContext context)
          Method to overwrite to indicate the script engine name.
 
Methods inherited from class org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro
eval, evaluateBlock, evaluateBlock, getCompiledScript, getScriptContext, supportsInlineMode
 
Methods inherited from class org.xwiki.rendering.macro.script.AbstractScriptMacro
evaluate, evaluateString, execute, getComponentManager, parseScriptResult, parseSourceSyntax
 
Methods inherited from class org.xwiki.rendering.macro.AbstractMacro
compareTo, getDescriptor, getPriority, initialize, setDefaultCategory, setDescriptor, setPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultScriptMacro

public DefaultScriptMacro()
Create and initialize the descriptor of the macro.

Method Detail

getScriptEngineName

protected java.lang.String getScriptEngineName(DefaultScriptMacroParameters parameters,
                                               org.xwiki.rendering.transformation.MacroTransformationContext context)
Method to overwrite to indicate the script engine name.

Overrides:
getScriptEngineName in class AbstractJSR223ScriptMacro<DefaultScriptMacroParameters>
Parameters:
parameters - the macro parameters.
context - the context of the macro transformation.
Returns:
the name of the script engine to use.
See Also:
AbstractJSR223ScriptMacro.getScriptEngineName(org.xwiki.rendering.macro.script.JSR223ScriptMacroParameters, org.xwiki.rendering.transformation.MacroTransformationContext)


Copyright © 2004-2011 XWiki. All Rights Reserved.