Class AbstractScriptStore

java.lang.Object
org.csstudio.opibuilder.script.AbstractScriptStore
All Implemented Interfaces:
IScriptStore
Direct Known Subclasses:
JavaScriptStore, JythonScriptStore

public abstract class AbstractScriptStore extends Object implements IScriptStore
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 Details

    • SCRIPT_LIBRARIES

      protected static final Class<?>[] SCRIPT_LIBRARIES
  • Constructor Details

  • Method Details

    • initScriptEngine

      protected abstract void initScriptEngine() throws Exception
      Throws:
      Exception
    • compileString

      protected abstract void compileString(String string) throws Exception
      Throws:
      Exception
    • compileInputStream

      protected abstract void compileInputStream(InputStream s) throws Exception
      Compile InputStream with script engine. The stream will be closed by this method.
      Throws:
      Exception
    • execScript

      protected abstract void execScript(IPV triggerPV) throws Exception
      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 interface IScriptStore
    • getScriptData

      public ScriptData getScriptData()
    • getEditPart

      public AbstractBaseEditPart getEditPart()
    • getDisplayEditPart

      public DisplayEditpart getDisplayEditPart()
    • getPvArray

      public IPV[] getPvArray()
    • getAbsoluteScriptPath

      public IPath getAbsoluteScriptPath()
    • dispose

      protected void dispose()
      Dispose of all resources allocated by this script store.