Class AbstractExecuteScriptAction
java.lang.Object
org.csstudio.opibuilder.widgetActions.AbstractWidgetAction
org.csstudio.opibuilder.widgetActions.AbstractExecuteScriptAction
- All Implemented Interfaces:
IAdaptable
- Direct Known Subclasses:
ExecuteJavaScriptAction
,ExecutePythonScriptAction
The abstract action for executing script.
-
Field Summary
Fields inherited from class org.csstudio.opibuilder.widgetActions.AbstractWidgetAction
PROP_DESCRIPTION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
protected abstract AbstractWidgetProperty<?>
createEmbeddedScriptProperty
(String prop_id, String description, WidgetPropertyCategory category, String defaultValue) protected IPath
protected abstract String
protected InputStream
Get raw InputStream of the script file.protected IPath
getPath()
protected BufferedReader
Get reader of the script file.An instance will be created for later to use.protected String
protected boolean
Methods inherited from class org.csstudio.opibuilder.widgetActions.AbstractWidgetAction
addProperty, dispose, getActionType, getAdapter, getAllProperties, getAllPropertyIDs, getCopy, getDescription, getProperty, getPropertyValue, getWidgetModel, isEnabled, run, setEnabled, setPropertyValue, setWidgetModel
-
Field Details
-
PROP_PATH
- See Also:
-
PROP_EMBEDDED
- See Also:
-
PROP_SCRIPT_TEXT
- See Also:
-
-
Constructor Details
-
AbstractExecuteScriptAction
public AbstractExecuteScriptAction()
-
-
Method Details
-
configureProperties
protected void configureProperties()- Specified by:
configureProperties
in classAbstractWidgetAction
-
getPath
-
getAbsolutePath
-
isEmbedded
protected boolean isEmbedded() -
createEmbeddedScriptProperty
protected abstract AbstractWidgetProperty<?> createEmbeddedScriptProperty(String prop_id, String description, WidgetPropertyCategory category, String defaultValue) -
getScriptText
-
getDefaultDescription
- Overrides:
getDefaultDescription
in classAbstractWidgetAction
-
getReader
Get reader of the script file.An instance will be created for later to use. Muse callcloseReader()
to close this reader.- Returns:
- the reader
- Throws:
Exception
-
closeReader
protected void closeReader() -
getInputStream
Get raw InputStream of the script file. Make sure to call close() of the returned instance.- Returns:
- InputStream of the script file.
- Throws:
Exception
-
getFileExtension
-