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
-
Constructor Summary
ConstructorDescriptionAbstractScriptStore
(ScriptData scriptData, AbstractBaseEditPart editpart, IPV[] pvArray) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
Compile InputStream with script engine.protected abstract void
compileString
(String string) protected void
dispose()
Dispose of all resources allocated by this script store.protected abstract void
execScript
(IPV triggerPV) Execute the script with script engine.IPV[]
protected abstract void
void
Remove 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:IScriptStore
Remove listeners from PV. Dispose related resource if needed.- Specified by:
unRegister
in interfaceIScriptStore
-
getScriptData
-
getEditPart
-
getDisplayEditPart
-
getPvArray
-
getAbsoluteScriptPath
-
dispose
protected void dispose()Dispose of all resources allocated by this script store.
-