Class DesignerHook
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.model.AbstractDesignerModuleHook
-
- com.inductiveautomation.ignition.alarming.designer.DesignerHook
-
- All Implemented Interfaces:
AlarmNotificationDesignerInterface
,DesignerModuleHook
public class DesignerHook extends AbstractDesignerModuleHook implements AlarmNotificationDesignerInterface
-
-
Constructor Summary
Constructors Constructor Description DesignerHook()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AlarmNotificationDesignerInterface
get(DesignerContext context)
java.util.List<PipelineBlockPrototype>
getPipelineBlockTypes()
Retrieve all registered pipeline blocksjava.lang.String
getResourceCategoryKey(ProjectResourceId resource)
Used by modules that add project resources to an Ignition project.java.lang.String
getResourceDisplayName(ProjectResourceId resource)
Allows a module to give an appropriate display name for the resource.void
initializeScriptManager(ScriptManager manager)
Initialize a newly-instantiated script manager.void
notifyProjectSaveStart(SaveContext save)
Notifies the module that the user has requested that the project is saved.void
registerPipelineBlock(PipelineBlockPrototype prototype)
Add a new kind of pipeline block to the system.void
shutdown()
Called when the module is shut down.void
startup(DesignerContext context, LicenseState activationState)
The main entrypoint for the module hook.-
Methods inherited from class com.inductiveautomation.ignition.designer.model.AbstractDesignerModuleHook
configureDeserializer, configureFunctionFactory, configureSerializer, createPermissionKeys, getFrames, getModuleMenu, getModuleToolbars, getResourceIcon, notifyActivationStateChanged, notifyProjectSaveDone
-
-
-
-
Method Detail
-
get
public static AlarmNotificationDesignerInterface get(DesignerContext context)
-
startup
public void startup(DesignerContext context, LicenseState activationState) throws java.lang.Exception
Description copied from interface:DesignerModuleHook
The main entrypoint for the module hook. This will only be called once for a given project. If another project is ever opened,DesignerModuleHook.shutdown()
will be called and a new hook will be instantiated- Specified by:
startup
in interfaceDesignerModuleHook
- Overrides:
startup
in classAbstractDesignerModuleHook
- Throws:
java.lang.Exception
- if the module was not able to be initialized for the given project.
-
notifyProjectSaveStart
public void notifyProjectSaveStart(SaveContext save)
Description copied from interface:DesignerModuleHook
Notifies the module that the user has requested that the project is saved. The module must check-in any checked-out resources that it is holding.- Specified by:
notifyProjectSaveStart
in interfaceDesignerModuleHook
- Overrides:
notifyProjectSaveStart
in classAbstractDesignerModuleHook
-
shutdown
public void shutdown()
Description copied from interface:DesignerModuleHook
Called when the module is shut down. This will happen if the user opens a different project within the same designer session - the existing modules will be shut down, and new module hooks will be instantiated and started up.- Specified by:
shutdown
in interfaceDesignerModuleHook
- Overrides:
shutdown
in classAbstractDesignerModuleHook
-
registerPipelineBlock
public void registerPipelineBlock(PipelineBlockPrototype prototype)
Description copied from interface:AlarmNotificationDesignerInterface
Add a new kind of pipeline block to the system.- Specified by:
registerPipelineBlock
in interfaceAlarmNotificationDesignerInterface
-
getPipelineBlockTypes
public java.util.List<PipelineBlockPrototype> getPipelineBlockTypes()
Description copied from interface:AlarmNotificationDesignerInterface
Retrieve all registered pipeline blocks- Specified by:
getPipelineBlockTypes
in interfaceAlarmNotificationDesignerInterface
-
getResourceCategoryKey
public java.lang.String getResourceCategoryKey(ProjectResourceId resource)
Description copied from interface:DesignerModuleHook
Used 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.
- Specified by:
getResourceCategoryKey
in interfaceDesignerModuleHook
- Overrides:
getResourceCategoryKey
in classAbstractDesignerModuleHook
- Parameters:
resource
- A project resource that was added by this module.- Returns:
- A bundle resource key for the category of this resource.
-
getResourceDisplayName
public java.lang.String getResourceDisplayName(ProjectResourceId resource)
Description copied from interface:DesignerModuleHook
Allows 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.
- Specified by:
getResourceDisplayName
in interfaceDesignerModuleHook
- Overrides:
getResourceDisplayName
in classAbstractDesignerModuleHook
- Returns:
- the name for a resource, or null to use the resource's folder path/name.
-
initializeScriptManager
public void initializeScriptManager(ScriptManager manager)
Description copied from interface:DesignerModuleHook
Initialize a newly-instantiated script manager. This will be called exactly once for any given ScriptManager instance. Usually this will involve callingScriptManager.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.- Specified by:
initializeScriptManager
in interfaceDesignerModuleHook
- Overrides:
initializeScriptManager
in classAbstractDesignerModuleHook
-
-