Class SessionScriptWrapper.SafetyWrapper
java.lang.Object
com.inductiveautomation.perspective.gateway.script.SessionScriptWrapper.SafetyWrapper
- All Implemented Interfaces:
PropertyTreeOwner
- Enclosing class:
- SessionScriptWrapper
Delegates to the actual view, this prevents the scripting system from being able to call everything
on ViewModel, like startup(), shutdown, etc.
Also gives us a good place to implement methods that make sense for script authors, that don't belong on the the model object, like more user friendly versions of getChild
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
org.python.core.PyObject
getInfo()
getName()
getPage()
getPages()
org.python.core.PyObject
getPropertyTreeOf
(PropertyType propertyType) Fetch thePropertyTree
associated with the givenPropertyType
getView()
org.python.core.PyObject
invokeOnQueue
(org.python.core.PyObject func) Invokes a python script on the queue.void
boolean
refreshBinding
(String propertyStr)
-
Field Details
-
element
-
-
Constructor Details
-
SafetyWrapper
-
-
Method Details
-
getProject
-
getProjectInfo
public org.python.core.PyObject getProjectInfo() -
refreshBinding
- Throws:
Throwable
-
getInfo
public org.python.core.PyObject getInfo()- Returns:
- info about this session. Note that the return format matches the format of system.perspective.getSessionInfos() except that this object does include the pages array.
-
getPage
-
getPages
-
close
public void close() -
close
-
invokeOnQueue
Invokes a python script on the queue. In general this is a big no-no, but it can be useful in certain circumstances where you need atomicity across multiple statements with respect to changes to property trees. For example, an atomic increment. We use this method for testing. Not documented for customer use.- Throws:
Exception
-
getPropertyTreeOf
Description copied from interface:PropertyTreeOwner
Fetch thePropertyTree
associated with the givenPropertyType
- Specified by:
getPropertyTreeOf
in interfacePropertyTreeOwner
- Parameters:
propertyType
- ThePropertyType
of thePropertyTree
we want to fetch- Returns:
- The PropertyTree or null if this PropertyTreeOwner does not manage a PropertyTree for the given PropertyType or if a null PropertyType is given
-
print
-
getView
-
getSession
-
getPage
-
getName
-