Class ScriptAction
- java.lang.Object
-
- com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper
-
- com.inductiveautomation.perspective.gateway.action.ScriptAction
-
- All Implemented Interfaces:
Action
public class ScriptAction extends ScriptFunctionHelper implements Action
Action which runs a python script when an event occurs.
-
-
Field Summary
Fields Modifier and Type Field Description static ActionFactory
FACTORY
static java.lang.String
SCRIPT_KEY
-
Fields inherited from class com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper
signature
-
-
Constructor Summary
Constructors Constructor Description ScriptAction(ActionContext context, java.lang.String script)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PerspectiveElement
getComponent()
protected java.lang.String
getDescription()
Describe the location/context of this script.protected LoggerEx
getLog()
void
runAction(org.python.core.PyObject event)
void
shutdown()
void
startup()
-
Methods inherited from class com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper
getSecurityLevels, invoke, invoke, logWarn, onScriptLibraryChange, py2qualified
-
-
-
-
Field Detail
-
SCRIPT_KEY
public static final java.lang.String SCRIPT_KEY
- See Also:
- Constant Field Values
-
FACTORY
public static final ActionFactory FACTORY
-
-
Constructor Detail
-
ScriptAction
public ScriptAction(ActionContext context, java.lang.String script)
-
-
Method Detail
-
getLog
protected LoggerEx getLog()
- Overrides:
getLog
in classScriptFunctionHelper
-
getDescription
protected java.lang.String getDescription()
Description copied from class:ScriptFunctionHelper
Describe the location/context of this script. Used for error messages- Overrides:
getDescription
in classScriptFunctionHelper
-
getComponent
public PerspectiveElement getComponent()
- Specified by:
getComponent
in classScriptFunctionHelper
-
-