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)
Opens up the resource notes editor for the given project resources
|
void |
exportResources(java.util.Collection<java.lang.Long> resourceIds)
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.
|
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 |
getDefaultSQLTagsProviderName()
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.
|
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
|
OPCBrowserPanel |
getOPCBrowser()
Returns the OPCBrowserPanel that can be used to browse and import OPC items
|
javax.swing.Action |
getPasteAction() |
ClientProgressManager |
getProgressManager() |
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.
|
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
|
ScriptManager |
getScriptManager()
Returns the ScriptManager that can be used to execute Python scripts.
|
java.util.List<SearchProvider> |
getSearchProviders() |
SQLTagTreeModel |
getSQLTagTreeModel() |
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 SQLTags
|
TagEditor |
getTagEditor()
Returns the TagEditorPanel that can be used to edit/add SQLTags
|
ClientTagManager |
getTagManager()
Returns the TagManager that can be used to read,write,browse, and subscribe to SQLTags from this context.
|
int |
getTagPollRate()
Returns the rate at which Tags should be polled for updates
|
TagUtilities |
getTagUtilities()
A class that has some handy functions for dealing with SQLTags
|
com.jidesoft.action.DockableBarManager |
getToolbarManager()
Returns the JIDE dockable toolbar manager
|
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 |
registerResourceWorkspace(ResourceWorkspace workspace)
Registers a new resource workspace, 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 DesignerProjectContext getGlobalProject()
DesignerContext
getGlobalProject
in interface ClientContext
getGlobalProject
in interface DesignerContext
public com.google.common.eventbus.EventBus getEventBus()
BaseContext
getEventBus
in interface BaseContext
public FunctionFactory getExpressionFunctionFactory()
BaseContext
getExpressionFunctionFactory
in interface BaseContext
public DesignerLocalizationManager getLocalizationManager()
getLocalizationManager
in interface ClientContext
getLocalizationManager
in interface DesignerContext
public LaunchContext getLaunchContext()
getLaunchContext
in interface ClientContext
@Deprecated public java.lang.String getCacheDir()
getCacheDir
in interface ClientContext
public void addBeanInfoSearchPath(java.lang.String packageName)
DesignerContext
addBeanInfoSearchPath
in interface DesignerContext
public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
addPropertyChangeListener
in interface ClientContext
public void addPropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener pcl)
addPropertyChangeListener
in interface ClientContext
public void exportResources(java.util.Collection<java.lang.Long> resourceIds)
DesignerContext
exportResources
in interface DesignerContext
public ProjectVersion getProjectVersion()
ClientContext
getProjectVersion
in interface ClientContext
public ExecutionManager getExecutionManager()
ClientContext
getExecutionManager
in interface ClientContext
public ClientProgressManager getProgressManager()
getProgressManager
in interface ClientContext
public XMLSerializer createSerializer()
DesignerContext
createSerializer
in interface DesignerContext
public PersistentProperties getDesignerPrefs()
DesignerContext
getDesignerPrefs
in interface DesignerContext
public java.lang.String getDefaultDatasourceName()
ClientContext
getDefaultDatasourceName
in interface ClientContext
public java.lang.String getDefaultSQLTagsProviderName()
ClientContext
getDefaultSQLTagsProviderName
in interface ClientContext
public java.lang.String getAuthProfileName()
ClientContext
getAuthProfileName
in interface ClientContext
public java.util.List<SearchProvider> getSearchProviders()
getSearchProviders
in interface DesignerContext
public boolean canEditResourceProtection() throws GatewayException
DesignerProjectContext
canEditResourceProtection
in interface DesignerProjectContext
GatewayException
public void registerSearchProvider(SearchProvider provider)
DesignerContext
registerSearchProvider
in interface DesignerContext
public java.awt.Frame getFrame()
DesignerContext
getFrame
in interface DesignerContext
public javax.swing.Action getCopyAction()
getCopyAction
in interface DesignerContext
public javax.swing.Action getCutAction()
getCutAction
in interface DesignerContext
public javax.swing.Action getDeleteAction()
getDeleteAction
in interface DesignerContext
public javax.swing.Action getPasteAction()
getPasteAction
in interface DesignerContext
public javax.swing.RootPaneContainer getRootPaneContainer()
ClientContext
getRootPaneContainer
in interface ClientContext
public int getTagPollRate()
ClientContext
getTagPollRate
in interface ClientContext
public SQLTagTreeModel getSQLTagTreeModel()
getSQLTagTreeModel
in interface DesignerContext
public StatusBar getStatusBar()
DesignerContext
getStatusBar
in interface DesignerContext
public ClientTagManager getTagManager()
BaseContext
getTagManager
in interface ClientContext
getTagManager
in interface BaseContext
public void registerResourceWorkspace(ResourceWorkspace workspace)
DesignerContext
registerResourceWorkspace
in interface DesignerContext
public XMLDeserializer createDeserializer()
BaseContext
createDeserializer
in interface BaseContext
public ProjectBrowserRoot getProjectBrowserRoot()
DesignerContext
getProjectBrowserRoot
in interface DesignerContext
ProjectBrowserRoot.getGlobalFolder()
,
ProjectBrowserRoot.getProjectFolder();
,
AbstractNavTreeNode
public java.lang.Object deserialize(byte[] data, org.apache.log4j.Logger log) throws SerializationException
ClientContext
deserialize
in interface ClientContext
SerializationException
public void addPropertyEditor(java.lang.Class<? extends AbstractPropertyEditorPanel> pageClass)
DesignerContext
Adds 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 DesignerContext
public ScriptManager getScriptManager()
BaseContext
getScriptManager
in interface BaseContext
public com.jidesoft.docking.DockingManager getDockingManager()
DesignerContext
getDockingManager
in interface DesignerContext
public com.jidesoft.action.DockableBarManager getToolbarManager()
DesignerContext
getToolbarManager
in interface DesignerContext
public TagBrowserPanel getTagBrowser()
DesignerContext
getTagBrowser
in interface DesignerContext
public OPCBrowserPanel getOPCBrowser()
DesignerContext
getOPCBrowser
in interface DesignerContext
public TagEditor getTagEditor()
DesignerContext
getTagEditor
in interface DesignerContext
public TagUtilities getTagUtilities()
DesignerContext
getTagUtilities
in interface DesignerContext
public QueryBrowser getQueryBrowserPanel()
DesignerContext
getQueryBrowserPanel
in interface DesignerContext
public void deleteResource(long resourceId)
DesignerProjectContext
deleteResource
in interface DesignerProjectContext
public Project getProject()
ProjectHolder
ProjectHolder.addProjectChangeListener(ProjectChangeListener)
and #deleteResource(long)
getProject
in interface ProjectHolder
public void applyDiff(Project diff, boolean dirty)
applyDiff
in interface ProjectHolder
public void applyGlobalDiff(Project diff, boolean dirty)
applyGlobalDiff
in interface ClientContext
public void removeProjectChangeListener(ProjectChangeListener listener)
removeProjectChangeListener
in interface ProjectHolder
public void addProjectChangeListener(ProjectChangeListener listener)
ProjectHolder
addProjectChangeListener
in interface ProjectHolder
public void updateResource(ProjectResource resource)
DesignerProjectContext
updateResource
in interface DesignerProjectContext
public java.lang.Object getModule(java.lang.String id)
BaseContext
getModule
in interface BaseContext
public java.util.List<ModuleInfo> getModules()
ClientContext
getModules
in interface ClientContext
public void editResourceDocs(ProjectResource resource)
DesignerContext
editResourceDocs
in interface DesignerContext
public java.util.UUID addFolder(long newResourceId, java.lang.String moduleId, int scope, java.lang.String folderName, java.util.UUID parent)
DesignerProjectContext
addFolder
in interface DesignerProjectContext
public void moveResource(long resourceId, java.util.UUID newParent)
DesignerProjectContext
moveResource
in interface DesignerProjectContext
public void structuredRename(long resourceId, java.lang.String newName) throws java.lang.IllegalArgumentException
DesignerProjectContext
structuredRename
in interface DesignerProjectContext
resourceId
- 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)
DesignerProjectContext
updateResource
in interface DesignerProjectContext
@Deprecated public ResourceLockManager getLockManager()
DesignerContext
getLockManager
in interface DesignerContext
public LicenseState getLicenseState(java.lang.String moduleId)
BaseContext
getLicenseState
in interface BaseContext
public boolean requestLock(long resourceId)
ResourceLockManager
requestLock
in interface ResourceLockManager
public boolean requestLockQuietly(long resourceId)
ResourceLockManager
requestLockQuietly
in interface ResourceLockManager
public boolean updateLock(long resourceId)
ResourceLockManager
updateLock
in interface ResourceLockManager
public void releaseLock(long resourceId)
ResourceLockManager
releaseLock
in interface ResourceLockManager
public boolean hasLock(long resourceId)
ResourceLockManager
hasLock
in interface ResourceLockManager
public boolean isLockModified(long resourceId)
ResourceLockManager
isLockModified
in interface ResourceLockManager
public boolean isLockOpen(long resourceId)
ResourceLockManager
isLockOpen
in interface ResourceLockManager
public void synchLocks()
ResourceLockManager
synchLocks
in interface ResourceLockManager
public long newResourceId() throws java.lang.Exception
ResourceLockManager
newResourceId
in interface ResourceLockManager
java.lang.Exception