public class DesignerContextProxy extends java.lang.Object implements DesignerContext
| Constructor and Description |
|---|
DesignerContextProxy() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBeanInfoSearchPath(java.lang.String packageName)
Adds the given fully-qualified path name to the Introspector's BeanInfo search path.
|
java.util.UUID |
addFolder(long newResourceId,
java.lang.String moduleId,
int scope,
java.lang.String folderName,
java.util.UUID parent)
Adds a new folder under the given parent.
|
void |
addProjectChangeListener(ProjectChangeListener listener)
Adds a listener that will recieve project diffs when the project changes
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener pcl) |
void |
addPropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener pcl) |
void |
addPropertyEditor(java.lang.Class<? extends AbstractPropertyEditorPanel> pageClass)
Adds a property editor page that will be incorporated into the Designer's project property editing system.
|
void |
applyDiff(Project diff,
boolean dirty) |
void |
applyGlobalDiff(Project diff,
boolean dirty) |
boolean |
canEditResourceProtection()
Checks whether or not the current logged in user can edit the protection bits of project resources.
|
XMLDeserializer |
createDeserializer()
Returns an instance of the XMLDeserializer that can be used to deserialize project resources.
|
XMLSerializer |
createSerializer()
Creates a new XML serializer that has been configured by all installed modules for custom serialization delegates
|
void |
deleteResource(long resourceId)
Removes the resource from the current project
|
java.lang.Object |
deserialize(byte[] data,
org.apache.log4j.Logger log)
Convenience function to deserialize a gzipped byte array into a single object.
|
void |
editResourceDocs(ProjectResource resource,
ProjectScope scope)
Opens up the resource notes editor for the given project resources
|
void |
exportResources(java.util.Collection<java.lang.Long> resourceIds,
ProjectScope scope)
Shows the project export window (after doing a commit) with the given resource IDs checked.
|
java.lang.String |
getAuthProfileName()
Returns the current project's user source
|
java.lang.String |
getCacheDir()
Deprecated.
|
java.util.Map<java.lang.String,java.lang.String> |
getClientPermissionBundleKeys() |
DesignerContext |
getContext() |
javax.swing.Action |
getCopyAction() |
javax.swing.Action |
getCutAction() |
java.lang.String |
getDefaultDatasourceName()
Returns the current project's default datasource name
|
java.lang.String |
getDefaultTagProviderName()
Returns the current project's default Tag provider
|
javax.swing.Action |
getDeleteAction() |
PersistentProperties |
getDesignerPrefs()
Returns a PersistentProperties file that will be stored on a per-user basis for "persistent" but not
project-encapsulated preferences
|
com.jidesoft.docking.DockingManager |
getDockingManager()
Returns the JIDE DockingManager for the Designer
|
com.google.common.eventbus.EventBus |
getEventBus()
This is a generic event bus that can be used by any part of Ignition within a single scope (jvm)
|
ExecutionManager |
getExecutionManager()
Returns the shared task execution manager for this client
|
FunctionFactory |
getExpressionFunctionFactory()
Returns the core function factory used by expressions.
|
java.awt.Frame |
getFrame()
Returns the owning frame of the designer.
|
DesignerProjectContext |
getGlobalProject()
Returns the project holder for the global project.
|
LaunchContext |
getLaunchContext() |
LicenseState |
getLicenseState(java.lang.String moduleId)
Returns the license state for the given module
|
DesignerLocalizationManager |
getLocalizationManager() |
ResourceLockManager |
getLockManager()
Deprecated.
|
LogFilterSettings |
getLoggingManager() |
java.lang.Object |
getModule(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 context
|
NamedQueryRpc |
getNamedQueryRpc()
Returns the appropriate named query rpc for the context.
|
OPCBrowserPanel |
getOPCBrowser()
Returns the OPCBrowserPanel that can be used to browse and import OPC items
|
javax.swing.Action |
getPasteAction() |
ClientProgressManager |
getProgressManager()
Returns the progress manager, which allows the execution of long running or async tasks.
|
Project |
getProject()
Gets the underlying project.
|
ProjectBrowserRoot |
getProjectBrowserRoot()
Returns the root node of the project browser tree, so that modules may add their own nodes.
|
DesignerProjectContext |
getProjectContext(ProjectScope scope)
Provides a way to get the local or global project scope by ProjectScope enum.
|
ProjectVersion |
getProjectVersion()
What version of the project (staging or published) is this client running?
|
QueryBrowser |
getQueryBrowserPanel()
Returns the DB query browser tool
|
javax.swing.RootPaneContainer |
getRootPaneContainer()
Returns the RootPaneContainer that is currently the owner of the client
|
ProjectScope |
getScope() |
ScriptManager |
getScriptManager()
Returns the ScriptManager that can be used to execute Python scripts.
|
java.util.List<SearchProvider> |
getSearchProviders() |
StatusBar |
getStatusBar()
The StatusBar at the bottom of the Designer can be used to display temporary messages and for adding
always-present little components that appear in the bottom-right
|
TagBrowserPanel |
getTagBrowser()
Returns the TagBrowserPanel that can be used to select Tags
|
TagEditor |
getTagEditor()
Returns the TagEditorPanel that can be used to edit/add Tags
|
ClientTagManager |
getTagManager()
Returns the manager that provides access to Ignition's tag system.
|
int |
getTagPollRate()
Returns the rate at which Tags should be polled for updates
|
com.jidesoft.action.DockableBarManager |
getToolbarManager()
Returns the JIDE dockable toolbar manager
|
com.google.common.eventbus.EventBus |
getUIEventBus()
This event bus schedules event notification on the swing EDT.
|
boolean |
hasLock(long resourceId)
Checks to see if the given lock is currently held, which means either:
it has been obtained but not released (it is open)
It has been obtained, modified, and then released, but a save operation has not occurred.
|
boolean |
isLockModified(long resourceId)
Returns true if the lock has been obtained and updated
|
boolean |
isLockOpen(long resourceId)
Returns true if the lock has been obtained and not released
|
void |
moveResource(long resourceId,
java.util.UUID newParent)
Moves the resource to a new parent.
|
long |
newResourceId()
Creates and obtains the lock for a new resource id
|
void |
registerClientPermissions(java.util.Map<java.lang.String,java.lang.String> bundleMap)
Register id-bundlekey pairs to limit client permissions
|
void |
registerResourceWorkspace(ResourceWorkspace workspace)
Registers a new
ResourceWorkspace,
which is a main editing area for the designer. |
void |
registerSearchProvider(SearchProvider provider)
Registers a search provider that will be exposed through the find/replace system.
|
void |
releaseLock(long resourceId)
Designer elements should call this function when they are done with the resource that they obtained a lock for.
|
void |
removeProjectChangeListener(ProjectChangeListener listener) |
boolean |
requestLock(long resourceId)
Requests the lock for the given resource.
|
boolean |
requestLockQuietly(long resourceId)
Just like requestLock, except that if the lock isn't obtained, no error message is displayed.
|
void |
setContext(DesignerContext context) |
void |
structuredRename(long resourceId,
java.lang.String newName)
Attempts to rename the given project resource, respecting the requirement that the name be unique amongst
siblings
(with respect to the folder structure)
|
void |
synchLocks()
Attempts to re-obtain all locks that this resource lock manager currently has.
|
boolean |
updateLock(long resourceId)
Designer elements should call this function when they have actually updated the resource with the given ID.
|
void |
updateResource(long id,
byte[] data)
Convenience call that updates only the serialized bytes of a project resource, leaving all other parameters
intact.
|
void |
updateResource(ProjectResource resource)
Adds or updates the given project resource
|
public DesignerContext getContext()
public void setContext(DesignerContext context)
public ProjectScope getScope()
getScope in interface DesignerProjectContextpublic DesignerProjectContext getProjectContext(ProjectScope scope)
DesignerContextgetProjectContext in interface DesignerContextpublic LogFilterSettings getLoggingManager()
getLoggingManager in interface CommonContextpublic DesignerProjectContext getGlobalProject()
DesignerContextgetGlobalProject in interface ClientContextgetGlobalProject in interface DesignerContextpublic com.google.common.eventbus.EventBus getEventBus()
CommonContextgetEventBus in interface CommonContextpublic com.google.common.eventbus.EventBus getUIEventBus()
ClientContextCommonContext.getEventBus(), which schedules event notification on a background thread.getUIEventBus in interface ClientContextpublic NamedQueryRpc getNamedQueryRpc()
ClientContextgetNamedQueryRpc in interface ClientContextpublic FunctionFactory getExpressionFunctionFactory()
CommonContextgetExpressionFunctionFactory in interface CommonContextpublic DesignerLocalizationManager getLocalizationManager()
getLocalizationManager in interface ClientContextgetLocalizationManager in interface DesignerContextpublic LaunchContext getLaunchContext()
getLaunchContext in interface ClientContext@Deprecated public java.lang.String getCacheDir()
getCacheDir in interface ClientContextpublic void addBeanInfoSearchPath(java.lang.String packageName)
DesignerContextaddBeanInfoSearchPath in interface DesignerContextpublic void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
addPropertyChangeListener in interface ClientContextpublic void addPropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener pcl)
addPropertyChangeListener in interface ClientContextpublic void exportResources(java.util.Collection<java.lang.Long> resourceIds,
ProjectScope scope)
DesignerContextexportResources in interface DesignerContextpublic ProjectVersion getProjectVersion()
ClientContextgetProjectVersion in interface ClientContextpublic ExecutionManager getExecutionManager()
ClientContextgetExecutionManager in interface ClientContextpublic ClientProgressManager getProgressManager()
ClientContextgetProgressManager in interface ClientContextpublic XMLSerializer createSerializer()
DesignerContextcreateSerializer in interface DesignerContextpublic PersistentProperties getDesignerPrefs()
DesignerContextgetDesignerPrefs in interface DesignerContextpublic java.lang.String getDefaultDatasourceName()
ClientContextgetDefaultDatasourceName in interface ClientContextpublic java.lang.String getDefaultTagProviderName()
ClientContextgetDefaultTagProviderName in interface ClientContextpublic java.lang.String getAuthProfileName()
ClientContextgetAuthProfileName in interface ClientContextpublic java.util.List<SearchProvider> getSearchProviders()
getSearchProviders in interface DesignerContextpublic void registerClientPermissions(java.util.Map<java.lang.String,java.lang.String> bundleMap)
DesignerContextregisterClientPermissions in interface DesignerContextbundleMap - Map of ids to bundlekeys. May be null.public java.util.Map<java.lang.String,java.lang.String> getClientPermissionBundleKeys()
getClientPermissionBundleKeys in interface DesignerContextpublic boolean canEditResourceProtection()
throws GatewayException
DesignerProjectContextcanEditResourceProtection in interface DesignerProjectContextGatewayExceptionpublic void registerSearchProvider(SearchProvider provider)
DesignerContextregisterSearchProvider in interface DesignerContextpublic java.awt.Frame getFrame()
DesignerContextgetFrame in interface DesignerContextpublic javax.swing.Action getCopyAction()
getCopyAction in interface DesignerContextpublic javax.swing.Action getCutAction()
getCutAction in interface DesignerContextpublic javax.swing.Action getDeleteAction()
getDeleteAction in interface DesignerContextpublic javax.swing.Action getPasteAction()
getPasteAction in interface DesignerContextpublic javax.swing.RootPaneContainer getRootPaneContainer()
ClientContextgetRootPaneContainer in interface ClientContextpublic int getTagPollRate()
ClientContextgetTagPollRate in interface ClientContextpublic StatusBar getStatusBar()
DesignerContextgetStatusBar in interface DesignerContextpublic ClientTagManager getTagManager()
CommonContextgetTagManager in interface ClientContextgetTagManager in interface CommonContextpublic void registerResourceWorkspace(ResourceWorkspace workspace)
DesignerContextResourceWorkspace,
which is a main editing area for the designer. The workspace has menus and toolbars associated with it that
become visible when the workspace is focused.registerResourceWorkspace in interface DesignerContextworkspace - The ResourceWorkspace to
register with the designerpublic XMLDeserializer createDeserializer()
CommonContextcreateDeserializer in interface CommonContextpublic ProjectBrowserRoot getProjectBrowserRoot()
DesignerContextgetProjectBrowserRoot in interface DesignerContextProjectBrowserRoot.getGlobalFolder(),
ProjectBrowserRoot.getProjectFolder(),
AbstractNavTreeNodepublic java.lang.Object deserialize(byte[] data,
org.apache.log4j.Logger log)
throws SerializationException
ClientContextdeserialize in interface ClientContextSerializationExceptionpublic void addPropertyEditor(java.lang.Class<? extends AbstractPropertyEditorPanel> pageClass)
DesignerContextAdds a property editor page that will be incorporated into the Designer's project property editing system. This class will be instantiated the first time that the property editor is displayed, and must have either a nullary constructor or a constructor that takes a DesignerContext.
The Property Editing framework is designed around the idea that modules will store properties in opaquely xml-serialized project resources which can be uniquely identified by their module ID and resource type. The property editing UI will handle the de/serialization and project syncing tasks so that the property editor pages can simply focus on UI.
addPropertyEditor in interface DesignerContextpublic ScriptManager getScriptManager()
CommonContextgetScriptManager in interface CommonContextpublic com.jidesoft.docking.DockingManager getDockingManager()
DesignerContextgetDockingManager in interface DesignerContextpublic com.jidesoft.action.DockableBarManager getToolbarManager()
DesignerContextgetToolbarManager in interface DesignerContextpublic TagBrowserPanel getTagBrowser()
DesignerContextgetTagBrowser in interface DesignerContextpublic OPCBrowserPanel getOPCBrowser()
DesignerContextgetOPCBrowser in interface DesignerContextpublic TagEditor getTagEditor()
DesignerContextgetTagEditor in interface DesignerContextpublic QueryBrowser getQueryBrowserPanel()
DesignerContextgetQueryBrowserPanel in interface DesignerContextpublic void deleteResource(long resourceId)
DesignerProjectContextdeleteResource in interface DesignerProjectContextpublic Project getProject()
ProjectHolderProjectHolder.addProjectChangeListener(ProjectChangeListener) and #deleteResource(long)getProject in interface ProjectHolderpublic void applyDiff(Project diff, boolean dirty)
applyDiff in interface ProjectHolderpublic void applyGlobalDiff(Project diff, boolean dirty)
applyGlobalDiff in interface ClientContextpublic void removeProjectChangeListener(ProjectChangeListener listener)
removeProjectChangeListener in interface ProjectHolderpublic void addProjectChangeListener(ProjectChangeListener listener)
ProjectHolderaddProjectChangeListener in interface ProjectHolderpublic void updateResource(ProjectResource resource)
DesignerProjectContextupdateResource in interface DesignerProjectContextpublic java.lang.Object getModule(java.lang.String id)
CommonContextgetModule in interface CommonContextpublic java.util.List<ModuleInfo> getModules()
ClientContextgetModules in interface ClientContextpublic void editResourceDocs(ProjectResource resource, ProjectScope scope)
DesignerContexteditResourceDocs in interface DesignerContextpublic java.util.UUID addFolder(long newResourceId,
java.lang.String moduleId,
int scope,
java.lang.String folderName,
java.util.UUID parent)
DesignerProjectContextaddFolder in interface DesignerProjectContextpublic void moveResource(long resourceId,
java.util.UUID newParent)
DesignerProjectContextmoveResource in interface DesignerProjectContextpublic void structuredRename(long resourceId,
java.lang.String newName)
throws java.lang.IllegalArgumentException
DesignerProjectContextstructuredRename in interface DesignerProjectContextresourceId - The ID of the resource to renamenewName - The new namejava.lang.IllegalArgumentException - Thrown when the name is not unique.public void updateResource(long id,
byte[] data)
DesignerProjectContextupdateResource in interface DesignerProjectContext@Deprecated public ResourceLockManager getLockManager()
DesignerContextgetLockManager in interface DesignerContextpublic LicenseState getLicenseState(java.lang.String moduleId)
CommonContextgetLicenseState in interface CommonContextpublic boolean requestLock(long resourceId)
ResourceLockManagerrequestLock in interface ResourceLockManagerpublic boolean requestLockQuietly(long resourceId)
ResourceLockManagerrequestLockQuietly in interface ResourceLockManagerpublic boolean updateLock(long resourceId)
ResourceLockManagerupdateLock in interface ResourceLockManagerpublic void releaseLock(long resourceId)
ResourceLockManagerreleaseLock in interface ResourceLockManagerpublic boolean hasLock(long resourceId)
ResourceLockManagerhasLock in interface ResourceLockManagerpublic boolean isLockModified(long resourceId)
ResourceLockManagerisLockModified in interface ResourceLockManagerpublic boolean isLockOpen(long resourceId)
ResourceLockManagerisLockOpen in interface ResourceLockManagerpublic void synchLocks()
ResourceLockManagersynchLocks in interface ResourceLockManagerpublic long newResourceId()
throws java.lang.Exception
ResourceLockManagernewResourceId in interface ResourceLockManagerjava.lang.Exception