Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webengine.scripting
Class Scripting

java.lang.Object
  extended by org.nuxeo.ecm.webengine.scripting.Scripting

public class Scripting
extends Object

Author:
Bogdan Stefanescu

Constructor Summary
Scripting(WebLoader loader)
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scripting

public Scripting(WebLoader loader)
Method Detail

compileScript

public static CompiledScript compileScript(ScriptEngine engine,
                                           File file)
                                    throws ScriptException
Throws:
ScriptException

getEngineManager

public ScriptEngineManager getEngineManager()
Lazy init scripting manager to avoid loading script engines when no scripting is used.

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.

Returns:
the scriptMgr

isScript

public boolean isScript(String ext)

runScript

public Object runScript(ScriptFile script)
                 throws Exception
Throws:
Exception

runScript

public Object runScript(ScriptFile script,
                        Map<String,Object> args)
                 throws Exception
Throws:
Exception

getCompiledScript

public CompiledScript getCompiledScript(ScriptEngine engine,
                                        File file)
                                 throws ScriptException
Throws:
ScriptException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.