Package org.nuxeo.ecm.core.event.script
Class Script
- java.lang.Object
-
- org.nuxeo.ecm.core.event.script.Script
-
- Direct Known Subclasses:
FileScript
,JARFileScript
,JARUrlScript
,URLScript
public abstract class Script extends Object
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description long
lastModified
protected CompiledScript
script
protected static ScriptEngineManager
scripting
-
Constructor Summary
Constructors Constructor Description Script()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CompiledScript
compile(Reader reader)
CompiledScript
getCompiledScript()
abstract String
getExtension()
protected String
getExtension(String location)
abstract String
getLocation()
abstract Reader
getReader()
abstract Reader
getReaderIfModified()
static ScriptEngineManager
getScripting()
static Script
newScript(File location)
static Script
newScript(String location)
static Script
newScript(URL location)
Object
run(Bindings args)
-
-
-
Field Detail
-
scripting
protected static volatile ScriptEngineManager scripting
-
script
protected CompiledScript script
-
lastModified
public volatile long lastModified
-
-
Method Detail
-
getScripting
public static ScriptEngineManager getScripting()
-
newScript
public static Script newScript(String location) throws IOException
- Throws:
IOException
-
newScript
public static Script newScript(URL location) throws IOException
- Throws:
IOException
-
getReader
public abstract Reader getReader() throws IOException
- Throws:
IOException
-
getReaderIfModified
public abstract Reader getReaderIfModified() throws IOException
- Throws:
IOException
-
getExtension
public abstract String getExtension()
-
getLocation
public abstract String getLocation()
-
run
public Object run(Bindings args) throws ScriptException
- Throws:
ScriptException
-
getCompiledScript
public CompiledScript getCompiledScript() throws ScriptException
- Throws:
ScriptException
-
compile
public CompiledScript compile(Reader reader) throws ScriptException
- Throws:
ScriptException
-
-