Package org.csstudio.opibuilder.script
Class JavaScriptStore
java.lang.Object
org.csstudio.opibuilder.script.AbstractScriptStore
org.csstudio.opibuilder.script.JavaScriptStore
- All Implemented Interfaces:
IScriptStore
This is the implementation of
AbstractScriptStore using the Nashorn script engine.-
Field Summary
Fields inherited from class org.csstudio.opibuilder.script.AbstractScriptStore
SCRIPT_LIBRARIES -
Constructor Summary
ConstructorsConstructorDescriptionJavaScriptStore(ScriptData scriptData, AbstractBaseEditPart editpart, IPV[] pvArray) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbootstrapScriptEngine(ScriptEngine engine, Bindings bindings) protected voidCompile InputStream with script engine.protected voidcompileString(String string) protected voidexecScript(IPV triggerPV) Execute the script with script engine.protected voidMethods inherited from class org.csstudio.opibuilder.script.AbstractScriptStore
dispose, getAbsoluteScriptPath, getDisplayEditPart, getEditPart, getPvArray, getScriptData, unRegister
-
Constructor Details
-
JavaScriptStore
public JavaScriptStore(ScriptData scriptData, AbstractBaseEditPart editpart, IPV[] pvArray) throws Exception - Throws:
Exception
-
-
Method Details
-
initScriptEngine
- Specified by:
initScriptEnginein classAbstractScriptStore- Throws:
Exception
-
bootstrapScriptEngine
public static void bootstrapScriptEngine(ScriptEngine engine, Bindings bindings) throws IOException, ScriptException - Throws:
IOExceptionScriptException
-
compileString
- Specified by:
compileStringin classAbstractScriptStore- Throws:
Exception
-
compileInputStream
Description copied from class:AbstractScriptStoreCompile InputStream with script engine. The stream will be closed by this method.- Specified by:
compileInputStreamin classAbstractScriptStore- Throws:
Exception
-
execScript
Description copied from class:AbstractScriptStoreExecute the script with script engine.- Specified by:
execScriptin classAbstractScriptStore- Parameters:
triggerPV- the PV that triggers this execution.- Throws:
Exception
-