public class Scripting extends Object
Modifier and Type | Method and Description |
---|---|
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 Scripting(WebLoader loader)
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 boolean isScript(String ext)
public Object runScript(ScriptFile script) throws ScriptException
ScriptException
public Object runScript(ScriptFile script, Map<String,Object> args) throws ScriptException
ScriptException
public CompiledScript getCompiledScript(ScriptEngine engine, File file) throws ScriptException
ScriptException
Copyright © 2015 Nuxeo SA. All rights reserved.