Class ClientContextImpl
java.lang.Object
com.inductiveautomation.ignition.client.model.AbstractClientContext
com.inductiveautomation.factorypmi.application.runtime.ClientContextImpl
- All Implemented Interfaces:
ClientContext
,CommonContext
,VisionClientInterface
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.client.model.AbstractClientContext
AbstractClientContext.ClientContextResourceListener
-
Field Summary
Fields inherited from class com.inductiveautomation.ignition.client.model.AbstractClientContext
changeSupport, globalProps, log, loggingManager, project, projectDescription, projectTitle
Fields inherited from interface com.inductiveautomation.vision.api.client.VisionClientInterface
VISION_MODULE_ID
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtensibleBindingType
(BindingType binding) Adds a new binding type to be used in the extensible binding systemvoid
addWindowListener
(VisionWindowListener listener) Adds a listener to be notified when windows are opened and closed.static void
static void
Returns an instance of the XMLDeserializer that can be used to deserialize project resources.protected FunctionFactory
deserialize
(byte[] data, org.apache.log4j.Logger log) Convenience function to deserialize a gzipped byte array into a single object.getBindingType
(String bindingTypeKey) Returns the shared task execution manager for this clientgetGuiUtil
(String desktopHandle) Gets the WindowUtilities for a secondary desktop, by handlegetLicenseState
(String moduleId) Returns the license state for the given moduleReturns the hook class for another module, used for modules that deal with each other's models.Retrieve the list of all modules currently loaded in this contextReturns the appropriate named query rpc for the context.Gets the NavUtilities (for the primary desktopgetNavUtil
(String desktopHandle) Gets the NavUtilities for a secondary desktop, by handleReturns the project that this client is running.Returns the RootPaneContainer that is currently the owner of the clientReturns the ScriptManager that can be used to execute Python scripts.Returns the manager that provides access to Ignition's tag system.void
loadModules
(List<ModuleInfo> modules) Create LoadedModule objects to represent each client-scoped module in the list.protected ProjectResourceListener
Make a custom resource listener so we can keep track of some Vision-specific resourcesvoid
Listens to the event bus for vision window evens to push all window open/close events to any modules that have registered VisionWindowListener objects.void
removeWindowListener
(VisionWindowListener listener) Removes window listenervoid
void
void
setProject
(Project project) void
shutdown()
void
startup()
Methods inherited from class com.inductiveautomation.ignition.client.model.AbstractClientContext
addPropertyChangeListener, addPropertyChangeListener, getAuthProfileName, getDefaultDatasourceName, getDefaultTagProviderName, getEdgeEditions, getEventBus, getExpressionFunctionFactory, getGlobalProps, getLaunchContext, getLoggingManager, getOrDefault, getProgressManager, getProjectDescription, getProjectName, getProjectTitle, getTagPollRate, getUIEventBus, initProject, installLegacyScriptLibrary, removePropertyChangeListener, removePropertyChangeListener, resetExpressionFunctionFactory, setGlobalProps
-
Method Details
-
getProject
Description copied from interface:ClientContext
Returns the project that this client is running. Note that this may be null before the client is fully logged in and started, because the context is created before the project is downloaded.- Specified by:
getProject
in interfaceClientContext
-
addExtensibleBindingType
Description copied from interface:VisionClientInterface
Adds a new binding type to be used in the extensible binding system- Specified by:
addExtensibleBindingType
in interfaceVisionClientInterface
-
getBindingType
- Specified by:
getBindingType
in interfaceVisionClientInterface
-
getExecutionManager
Description copied from interface:ClientContext
Returns the shared task execution manager for this client- Specified by:
getExecutionManager
in interfaceClientContext
-
getLocalizationManager
- Specified by:
getLocalizationManager
in interfaceClientContext
-
setLocalizationManager
-
addWindowListener
Description copied from interface:VisionClientInterface
Adds a listener to be notified when windows are opened and closed. Only works during runtime, not designer- Specified by:
addWindowListener
in interfaceVisionClientInterface
-
removeWindowListener
Description copied from interface:VisionClientInterface
Removes window listener- Specified by:
removeWindowListener
in interfaceVisionClientInterface
-
receiveVisionWindowEvent
Listens to the event bus for vision window evens to push all window open/close events to any modules that have registered VisionWindowListener objects. -
deserialize
Description copied from interface:ClientContext
Convenience function to deserialize a gzipped byte array into a single object. If multiple objects are found, they will be discarded. Warnings are logged to the given logger. If data is null or empty, null is returned.- Specified by:
deserialize
in interfaceClientContext
- Throws:
SerializationException
-
getRootPaneContainer
Description copied from interface:ClientContext
Returns the RootPaneContainer that is currently the owner of the client- Specified by:
getRootPaneContainer
in interfaceClientContext
-
getModules
Description copied from interface:ClientContext
Retrieve the list of all modules currently loaded in this context- Specified by:
getModules
in interfaceClientContext
-
getLicenseState
Description copied from interface:CommonContext
Returns the license state for the given module- Specified by:
getLicenseState
in interfaceCommonContext
-
createExpressionFunctionFactory
- Specified by:
createExpressionFunctionFactory
in classAbstractClientContext
-
loadModules
Create LoadedModule objects to represent each client-scoped module in the list. This will instantiate, but not start up, the client module hooks.- Throws:
ModuleLoadException
-
startup
public void startup()- Overrides:
startup
in classAbstractClientContext
-
setApp
-
shutdown
public void shutdown()- Overrides:
shutdown
in classAbstractClientContext
-
getGuiUtil
- Specified by:
getGuiUtil
in interfaceVisionClientInterface
-
getGuiUtil
Description copied from interface:VisionClientInterface
Gets the WindowUtilities for a secondary desktop, by handle- Specified by:
getGuiUtil
in interfaceVisionClientInterface
-
setProject
-
newProjectResourceListener
Make a custom resource listener so we can keep track of some Vision-specific resources- Overrides:
newProjectResourceListener
in classAbstractClientContext
-
getTagManager
Description copied from interface:CommonContext
Returns the manager that provides access to Ignition's tag system.- Specified by:
getTagManager
in interfaceClientContext
- Specified by:
getTagManager
in interfaceCommonContext
-
getScriptManager
Description copied from interface:CommonContext
Returns the ScriptManager that can be used to execute Python scripts.- Specified by:
getScriptManager
in interfaceCommonContext
-
getNamedQueryManager
Description copied from interface:ClientContext
Returns the appropriate named query rpc for the context. In the gateway and client, we only want to use named queries that have been saved. In the designer, we want to use the current version so that reports and bindings can be seen and used for testing before the project is saved.- Specified by:
getNamedQueryManager
in interfaceClientContext
- Returns:
- The correct NamedQueryManager implementation for the scope.
-
createDeserializer
Description copied from interface:CommonContext
Returns an instance of the XMLDeserializer that can be used to deserialize project resources. Note that this is the only safe way to obtain an instance of XMLDeserializer, because the context will pass the new deserializer around to all loaded modules, giving them a chance to initialize any custom deserialization deletes on it first.- Specified by:
createDeserializer
in interfaceCommonContext
-
configureDeserializer
-
configureClassNameResolver
-
getGeneralProps
-
getLaunchProps
-
getLoginProps
-
getUiProps
-
getModule
Description copied from interface:CommonContext
Returns the hook class for another module, used for modules that deal with each other's models. Example: The reporting plugin's designer hook uses this to get FactoryPMI's palette.- Specified by:
getModule
in interfaceCommonContext
-