Class ScriptFunctionHelper
java.lang.Object
com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper
- Direct Known Subclasses:
ExtensionFunctionImpl
,PropertyChangeScript
,ScriptAction
,ScriptRunner
Helper to consolidate the logic of an extension-function style script that must be compiled the first time before
it runs.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract PerspectiveElement
protected String
Describe the location/context of this script.protected LoggerEx
getLog()
protected com.google.common.collect.ImmutableCollection<SecurityLevelConfig>
protected abstract PerspectiveTagReferenceLocation
Optional<org.python.core.PyObject>
invoke
(org.python.core.PyObject... arguments) Optional<org.python.core.PyObject>
protected void
void
static QualifiedValue
py2qualified
(org.python.core.PyObject object)
-
Field Details
-
signature
-
-
Constructor Details
-
ScriptFunctionHelper
- Parameters:
signature
- The signature, which is the method name and arguments like "runMe(arg1, arg2)"userCode
- The user's portion of the runnable code
-
-
Method Details
-
getLog
-
getComponent
-
onScriptLibraryChange
-
getSecurityLevels
-
invoke
- Returns:
- the return value, if the method was invoked successfully, or empty if a problem was found.
-
invoke
public Optional<org.python.core.PyObject> invoke(org.python.core.PyObject[] arguments, String[] keywords) - Returns:
- the return value, if the method was invoked successfully, or empty if a problem was found.
-
getDescription
Describe the location/context of this script. Used for error messages -
getTagReferencePath
-
logWarn
-
py2qualified
-