Package org.csstudio.opibuilder.script
Class AbstractScriptStore
java.lang.Object
org.csstudio.opibuilder.script.AbstractScriptStore
- All Implemented Interfaces:
IScriptStore
- Direct Known Subclasses:
JavaScriptStore,JythonScriptStore
The script store help to store the compiled script for afterward executions. This is the abstract script store
implementation for BOY script execution. All script stores in BOY should implement this abstract class with a
specific script engine. The store must be disposed manually when it is not needed.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractScriptStore(ScriptData scriptData, AbstractBaseEditPart editpart, IPV[] pvArray) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidCompile InputStream with script engine.protected abstract voidcompileString(String string) protected voiddispose()Dispose of all resources allocated by this script store.protected abstract voidexecScript(IPV triggerPV) Execute the script with script engine.IPV[]protected abstract voidvoidRemove listeners from PV.
-
Field Details
-
SCRIPT_LIBRARIES
-
-
Constructor Details
-
AbstractScriptStore
public AbstractScriptStore(ScriptData scriptData, AbstractBaseEditPart editpart, IPV[] pvArray) throws Exception - Throws:
Exception
-
-
Method Details
-
initScriptEngine
- Throws:
Exception
-
compileString
- Throws:
Exception
-
compileInputStream
Compile InputStream with script engine. The stream will be closed by this method.- Throws:
Exception
-
execScript
Execute the script with script engine.- Parameters:
triggerPV- the PV that triggers this execution.- Throws:
Exception
-
unRegister
public void unRegister()Description copied from interface:IScriptStoreRemove listeners from PV. Dispose related resource if needed.- Specified by:
unRegisterin interfaceIScriptStore
-
getScriptData
-
getEditPart
-
getDisplayEditPart
-
getPvArray
-
getAbsoluteScriptPath
-
dispose
protected void dispose()Dispose of all resources allocated by this script store.
-