public class Scripting extends Object
Modifier and Type | Method and Description |
---|---|
protected Object |
_runScript(ScriptFile script,
Map<String,Object> args) |
static CompiledScript |
compileScript(ScriptEngine engine,
File file) |
CompiledScript |
getCompiledScript(ScriptEngine engine,
File file) |
ScriptEngineManager |
getEngineManager()
Lazy init scripting manager to avoid loading script engines when no scripting is used.
|
boolean |
isScript(String ext) |
Object |
runScript(ScriptFile script) |
Object |
runScript(ScriptFile script,
Map<String,Object> args) |
public static CompiledScript compileScript(ScriptEngine engine, File file) throws ScriptException
ScriptException
public ScriptEngineManager getEngineManager()
Javax Scripting is not used by default in WebWengine, we are using directly the Groovy engine. This also fixes an annoying pb on Mac in java5 due to AppleScripting which is failing to register.
public Object runScript(ScriptFile script) throws ScriptException
ScriptException
public Object runScript(ScriptFile script, Map<String,Object> args) throws ScriptException
ScriptException
protected Object _runScript(ScriptFile script, Map<String,Object> args) throws ScriptException
ScriptException
public CompiledScript getCompiledScript(ScriptEngine engine, File file) throws ScriptException
ScriptException
Copyright © 2017 Nuxeo. All rights reserved.