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
FieldsFields inherited from class org.csstudio.opibuilder.widgetActions.AbstractWidgetAction
PROP_DESCRIPTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected abstract AbstractWidgetProperty<?>createEmbeddedScriptProperty(String prop_id, String description, WidgetPropertyCategory category, String defaultValue) protected IPathprotected abstract Stringprotected InputStreamGet raw InputStream of the script file.protected IPathgetPath()protected BufferedReaderGet reader of the script file.An instance will be created for later to use.protected Stringprotected booleanMethods 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:
configurePropertiesin classAbstractWidgetAction
-
getPath
-
getAbsolutePath
-
isEmbedded
protected boolean isEmbedded() -
createEmbeddedScriptProperty
protected abstract AbstractWidgetProperty<?> createEmbeddedScriptProperty(String prop_id, String description, WidgetPropertyCategory category, String defaultValue) -
getScriptText
-
getDefaultDescription
- Overrides:
getDefaultDescriptionin 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
-