public abstract class AbstractDesignerModuleHook extends java.lang.Object implements DesignerModuleHook
Base class for all designer module hook implementations. All methods are given empty implementations. It is expected that subclasses will override any methods that they wish to give real implementations.
Best practice is to subclass this class rather than implement DesignerModuleHook directly, so that when new
methods get added to the interface, your module automatically inherits an empty implementation of the new method
rather than breaking with a NoSuchMethodError.
| Constructor and Description |
|---|
AbstractDesignerModuleHook() |
| Modifier and Type | Method and Description |
|---|---|
void |
configureDeserializer(XMLDeserializer deserializer) |
void |
configureFunctionFactory(ExpressionFunctionManager factory)
Provides the module with an opportunity to define its own expression functions
|
void |
configureSerializer(XMLSerializer serializer)
Provides the module a chance to add serialization delegates to the serializer custom for classes that might be
encountered when serializing objects provided by this module
|
java.util.Map<java.lang.String,java.lang.String> |
createPermissionKeys()
Allows a module to create one or more id-bundlekey pairs that the module will use for role-based client
security.
|
java.util.List<com.jidesoft.docking.DockableFrame> |
getFrames()
A list of DockableFrames that this module provides, that should be available to all workspaces.
|
MenuBarMerge |
getModuleMenu()
Returns a menu merge for any global menu additions.
|
java.util.List<com.jidesoft.action.CommandBar> |
getModuleToolbars()
Returns the toolbars for the module.
|
java.lang.String |
getResourceCategoryKey(Project project,
ProjectResource resource)
Used by modules that add project resources to an Ignition project.
|
java.lang.String |
getResourceDisplayName(Project project,
ProjectResource resource)
Allows a module to give an appropriate display name for the resource.
|
javax.swing.Icon |
getResourceIcon(Project project,
ProjectResource resource)
Allows a module to give an appropriate icon for a resource.
|
void |
initializeScriptManager(ScriptManager manager)
Initialize a newly-instantiated script manager.
|
void |
notifyActivationStateChanged(LicenseState licenseState)
Notifies this designer module that its license state has changed.
|
void |
notifyProjectSaveDone()
Notifies the module that the save operation has finished.
|
void |
notifyProjectSaveStart(SaveContext save)
Notifies the module that the user has requested that the project is saved.
|
void |
shutdown()
Called when the module is shut down.
|
void |
startup(DesignerContext context,
LicenseState activationState)
The main entrypoint for the module hook.
|
public void startup(DesignerContext context, LicenseState activationState) throws java.lang.Exception
DesignerModuleHookDesignerModuleHook.shutdown() will be called and a new hook will be instantiatedstartup in interface DesignerModuleHookjava.lang.Exception - if the module was not able to be initialized for the given project.public void shutdown()
DesignerModuleHookshutdown in interface DesignerModuleHookpublic java.lang.String getResourceCategoryKey(Project project, ProjectResource resource)
DesignerModuleHookUsed by modules that add project resources to an Ignition project. This will be called when the exporter is displaying all of the resources inside a project for export. Only project resources that match this module's ID will passed to this function.
Used by the import/export system.
getResourceCategoryKey in interface DesignerModuleHookresource - A project resource that was added by this module.public java.lang.String getResourceDisplayName(Project project, ProjectResource resource)
DesignerModuleHookAllows a module to give an appropriate display name for the resource. For most resources this won't be necessary (the resource's name itself should be used), but for some resources whose name is null, this may be appropriate.
Used by the import/export system.
getResourceDisplayName in interface DesignerModuleHookpublic javax.swing.Icon getResourceIcon(Project project, ProjectResource resource)
DesignerModuleHookAllows a module to give an appropriate icon for a resource.
Used by the import/export system.
getResourceIcon in interface DesignerModuleHookpublic MenuBarMerge getModuleMenu()
DesignerModuleHookgetModuleMenu in interface DesignerModuleHookJMenuMergepublic java.util.List<com.jidesoft.action.CommandBar> getModuleToolbars()
DesignerModuleHookgetModuleToolbars in interface DesignerModuleHookpublic java.util.List<com.jidesoft.docking.DockableFrame> getFrames()
DesignerModuleHookgetFrames in interface DesignerModuleHookpublic void notifyActivationStateChanged(LicenseState licenseState)
DesignerModuleHooknotifyActivationStateChanged in interface DesignerModuleHookpublic void configureSerializer(XMLSerializer serializer)
DesignerModuleHookconfigureSerializer in interface DesignerModuleHookpublic void configureDeserializer(XMLDeserializer deserializer)
configureDeserializer in interface DesignerModuleHookpublic void configureFunctionFactory(ExpressionFunctionManager factory)
DesignerModuleHookconfigureFunctionFactory in interface DesignerModuleHookpublic void notifyProjectSaveStart(SaveContext save)
DesignerModuleHooknotifyProjectSaveStart in interface DesignerModuleHookpublic void notifyProjectSaveDone()
DesignerModuleHooknotifyProjectSaveDone in interface DesignerModuleHookpublic void initializeScriptManager(ScriptManager manager)
DesignerModuleHookScriptManager.addScriptModule(String, Object), which reflectively loads the public (instance and
static) java functions from the given object into the scripting environment, at the provided path.initializeScriptManager in interface DesignerModuleHookpublic java.util.Map<java.lang.String,java.lang.String> createPermissionKeys()
DesignerModuleHookcreatePermissionKeys in interface DesignerModuleHook