Class ClientContextImpl
- java.lang.Object
- 
- com.inductiveautomation.ignition.client.model.AbstractClientContext
- 
- com.inductiveautomation.factorypmi.application.runtime.ClientContextImpl
 
 
- 
- All Implemented Interfaces:
- ClientContext,- CommonContext,- VisionClientInterface
 
 public class ClientContextImpl extends AbstractClientContext implements VisionClientInterface 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.client.model.AbstractClientContextAbstractClientContext.ClientContextResourceListener
 
- 
 - 
Field Summary- 
Fields inherited from class com.inductiveautomation.ignition.client.model.AbstractClientContextchangeSupport, globalProps, log, loggingManager, project, projectDescription, projectTitle
 - 
Fields inherited from interface com.inductiveautomation.vision.api.client.VisionClientInterfaceVISION_MODULE_ID
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExtensibleBindingType(BindingType binding)Adds a new binding type to be used in the extensible binding systemvoidaddWindowListener(VisionWindowListener listener)Adds a listener to be notified when windows are opened and closed.static voidconfigureClassNameResolver(ClassNameResolver r)static voidconfigureDeserializer(XMLDeserializer d)XMLDeserializercreateDeserializer()Returns an instance of the XMLDeserializer that can be used to deserialize project resources.protected FunctionFactorycreateExpressionFunctionFactory()java.lang.Objectdeserialize(byte[] data, org.apache.log4j.Logger log)Convenience function to deserialize a gzipped byte array into a single object.BindingTypegetBindingType(java.lang.String bindingTypeKey)ExecutionManagergetExecutionManager()Returns the shared task execution manager for this clientGeneralPropsgetGeneralProps()WindowUtilitiesgetGuiUtil()WindowUtilitiesgetGuiUtil(java.lang.String desktopHandle)Gets the WindowUtilities for a secondary desktop, by handleLaunchPropsgetLaunchProps()LicenseStategetLicenseState(java.lang.String moduleId)Returns the license state for the given moduleClientLocalizationManagergetLocalizationManager()LoginPropsgetLoginProps()java.lang.ObjectgetModule(java.lang.String id)Returns the hook class for another module, used for modules that deal with each other's models.java.util.List<ModuleInfo>getModules()Retrieve the list of all modules currently loaded in this contextNamedQueryManagergetNamedQueryManager()Returns the appropriate named query rpc for the context.NavUtilitiesgetNavUtil()Gets the NavUtilities (for the primary desktopNavUtilitiesgetNavUtil(java.lang.String desktopHandle)Gets the NavUtilities for a secondary desktop, by handleRuntimeProjectgetProject()Returns the project that this client is running.javax.swing.RootPaneContainergetRootPaneContainer()Returns the RootPaneContainer that is currently the owner of the clientScriptManagergetScriptManager()Returns the ScriptManager that can be used to execute Python scripts.ClientTagManagergetTagManager()Returns the manager that provides access to Ignition's tag system.UIPropsgetUiProps()voidloadModules(java.util.List<ModuleInfo> modules)Create LoadedModule objects to represent each client-scoped module in the list.protected ProjectResourceListenernewProjectResourceListener()Make a custom resource listener so we can keep track of some Vision-specific resourcesvoidreceiveVisionWindowEvent(VisionWindowEvent event)Listens to the event bus for vision window evens to push all window open/close events to any modules that have registered VisionWindowListener objects.voidremoveWindowListener(VisionWindowListener listener)Removes window listenervoidsetApp(FPMIApp app)voidsetLocalizationManager(ClientLocalizationManager mgr)voidsetProject(Project project)voidshutdown()voidstartup()- 
Methods inherited from class com.inductiveautomation.ignition.client.model.AbstractClientContextaddPropertyChangeListener, addPropertyChangeListener, getAuthProfileName, getDefaultDatasourceName, getDefaultTagProviderName, getEdgeEditions, getEventBus, getExpressionFunctionFactory, getGlobalProps, getLaunchContext, getLoggingManager, getOrDefault, getProgressManager, getProjectDescription, getProjectName, getProjectTitle, getTagPollRate, getUIEventBus, initProject, installLegacyScriptLibrary, removePropertyChangeListener, removePropertyChangeListener, resetExpressionFunctionFactory, setGlobalProps
 
- 
 
- 
- 
- 
Method Detail- 
getProjectpublic RuntimeProject getProject() Description copied from interface:ClientContextReturns 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:
- getProjectin interface- ClientContext
 
 - 
addExtensibleBindingTypepublic void addExtensibleBindingType(BindingType binding) Description copied from interface:VisionClientInterfaceAdds a new binding type to be used in the extensible binding system- Specified by:
- addExtensibleBindingTypein interface- VisionClientInterface
 
 - 
getBindingTypepublic BindingType getBindingType(java.lang.String bindingTypeKey) - Specified by:
- getBindingTypein interface- VisionClientInterface
 
 - 
getExecutionManagerpublic ExecutionManager getExecutionManager() Description copied from interface:ClientContextReturns the shared task execution manager for this client- Specified by:
- getExecutionManagerin interface- ClientContext
 
 - 
getLocalizationManagerpublic ClientLocalizationManager getLocalizationManager() - Specified by:
- getLocalizationManagerin interface- ClientContext
 
 - 
setLocalizationManagerpublic void setLocalizationManager(ClientLocalizationManager mgr) 
 - 
addWindowListenerpublic void addWindowListener(VisionWindowListener listener) Description copied from interface:VisionClientInterfaceAdds a listener to be notified when windows are opened and closed. Only works during runtime, not designer- Specified by:
- addWindowListenerin interface- VisionClientInterface
 
 - 
removeWindowListenerpublic void removeWindowListener(VisionWindowListener listener) Description copied from interface:VisionClientInterfaceRemoves window listener- Specified by:
- removeWindowListenerin interface- VisionClientInterface
 
 - 
receiveVisionWindowEventpublic void receiveVisionWindowEvent(VisionWindowEvent event) Listens to the event bus for vision window evens to push all window open/close events to any modules that have registered VisionWindowListener objects.
 - 
deserializepublic java.lang.Object deserialize(byte[] data, org.apache.log4j.Logger log) throws SerializationExceptionDescription copied from interface:ClientContextConvenience 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:
- deserializein interface- ClientContext
- Throws:
- SerializationException
 
 - 
getRootPaneContainerpublic javax.swing.RootPaneContainer getRootPaneContainer() Description copied from interface:ClientContextReturns the RootPaneContainer that is currently the owner of the client- Specified by:
- getRootPaneContainerin interface- ClientContext
 
 - 
getModulespublic java.util.List<ModuleInfo> getModules() Description copied from interface:ClientContextRetrieve the list of all modules currently loaded in this context- Specified by:
- getModulesin interface- ClientContext
 
 - 
getLicenseStatepublic LicenseState getLicenseState(java.lang.String moduleId) Description copied from interface:CommonContextReturns the license state for the given module- Specified by:
- getLicenseStatein interface- CommonContext
 
 - 
createExpressionFunctionFactoryprotected FunctionFactory createExpressionFunctionFactory() - Specified by:
- createExpressionFunctionFactoryin class- AbstractClientContext
 
 - 
loadModulespublic void loadModules(java.util.List<ModuleInfo> modules) throws ModuleLoadException 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
 
 - 
startuppublic void startup() - Overrides:
- startupin class- AbstractClientContext
 
 - 
setApppublic void setApp(FPMIApp app) 
 - 
shutdownpublic void shutdown() - Overrides:
- shutdownin class- AbstractClientContext
 
 - 
getNavUtilpublic NavUtilities getNavUtil() Description copied from interface:VisionClientInterfaceGets the NavUtilities (for the primary desktop- Specified by:
- getNavUtilin interface- VisionClientInterface
 
 - 
getNavUtilpublic NavUtilities getNavUtil(java.lang.String desktopHandle) Description copied from interface:VisionClientInterfaceGets the NavUtilities for a secondary desktop, by handle- Specified by:
- getNavUtilin interface- VisionClientInterface
 
 - 
getGuiUtilpublic WindowUtilities getGuiUtil() - Specified by:
- getGuiUtilin interface- VisionClientInterface
 
 - 
getGuiUtilpublic WindowUtilities getGuiUtil(java.lang.String desktopHandle) Description copied from interface:VisionClientInterfaceGets the WindowUtilities for a secondary desktop, by handle- Specified by:
- getGuiUtilin interface- VisionClientInterface
 
 - 
setProjectpublic void setProject(Project project) 
 - 
newProjectResourceListenerprotected ProjectResourceListener newProjectResourceListener() Make a custom resource listener so we can keep track of some Vision-specific resources- Overrides:
- newProjectResourceListenerin class- AbstractClientContext
 
 - 
getTagManagerpublic ClientTagManager getTagManager() Description copied from interface:CommonContextReturns the manager that provides access to Ignition's tag system.- Specified by:
- getTagManagerin interface- ClientContext
- Specified by:
- getTagManagerin interface- CommonContext
 
 - 
getScriptManagerpublic ScriptManager getScriptManager() Description copied from interface:CommonContextReturns the ScriptManager that can be used to execute Python scripts.- Specified by:
- getScriptManagerin interface- CommonContext
 
 - 
getNamedQueryManagerpublic NamedQueryManager getNamedQueryManager() Description copied from interface:ClientContextReturns 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:
- getNamedQueryManagerin interface- ClientContext
- Returns:
- The correct NamedQueryManager implementation for the scope.
 
 - 
createDeserializerpublic XMLDeserializer createDeserializer() Description copied from interface:CommonContextReturns 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:
- createDeserializerin interface- CommonContext
 
 - 
configureDeserializerpublic static void configureDeserializer(XMLDeserializer d) 
 - 
configureClassNameResolverpublic static void configureClassNameResolver(ClassNameResolver r) 
 - 
getGeneralPropspublic GeneralProps getGeneralProps() 
 - 
getLaunchPropspublic LaunchProps getLaunchProps() 
 - 
getLoginPropspublic LoginProps getLoginProps() 
 - 
getUiPropspublic UIProps getUiProps() 
 - 
getModulepublic java.lang.Object getModule(java.lang.String id) Description copied from interface:CommonContextReturns 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:
- getModulein interface- CommonContext
 
 
- 
 
-