Class BaseExtensionPointType
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.model.BaseExtensionPointType
-
- All Implemented Interfaces:
ExtensionPointType
,java.io.Serializable
,java.lang.Comparable<ExtensionPointType>
- Direct Known Subclasses:
AlarmNotificationProfileType
,AlertNotificationProfileType
,AlertStorageProfileType
,AuditProfileType
,OpcConnectionType
,TagHistoryProviderType
,TagProviderExtensionPointType
,TaskExtensionPointType
,UserSourceProfileType
public abstract class BaseExtensionPointType extends java.lang.Object implements ExtensionPointType
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
description
protected java.lang.String
name
protected java.lang.String
typeId
-
Constructor Summary
Constructors Constructor Description BaseExtensionPointType(java.lang.String typeId, java.lang.String nameKey, java.lang.String descriptionKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRecordInstanceActions(org.apache.wicket.markup.repeater.RepeatingView view, IConfigPage configPage, ConfigPanel parentPanel, PersistentRecord mainRecord, PersistentRecord subRecord)
Provides the extension point type an opportunity to insert custom record action links.int
compareTo(ExtensionPointType o)
protected <T> T
findProfileSettingsRecord(GatewayContext context, PersistentRecord profile)
Convenience function for looking up the extension point's settings for the given profile.java.lang.String
getDescription()
A resource key for a description of what makes this type unique.java.lang.String
getName()
A resource key for a human-readable name for this type.ReferenceField<?>
getSettingsRecordForeignKey()
Returns the ReferenceField linking the extension point's settings record to the parent profile record.java.lang.String
getTypeId()
A string that uniquely identifies this profile type.boolean
isEnabled()
A flag that indicates whether this type is currently enabled (true) or deprecated (false).ConfigPanel
newRecordConfigPanel(PersistentRecord[] records, IConfigPage configPage, ConfigPanel parentPanel)
Creates a new ConfigPanel that will be used when the user creates a new record of this extension point type.void
onRecordDestroyed(PersistenceSession session, PersistentRecord mainRecord, PersistentRecord subRecord)
Will be called when a profile of this extension point type is deleted, providing an opportunity to do any related cleanup.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.gateway.model.ExtensionPointType
getSettingsRecordType
-
-
-
-
Constructor Detail
-
BaseExtensionPointType
public BaseExtensionPointType(java.lang.String typeId, java.lang.String nameKey, java.lang.String descriptionKey)
- Parameters:
typeId
- The unique ID for this profile typenameKey
- The resource key to a human-readable name of this profile typedescriptionKey
- The resource key to a description of the profile type
-
-
Method Detail
-
getTypeId
public java.lang.String getTypeId()
Description copied from interface:ExtensionPointType
A string that uniquely identifies this profile type.- Specified by:
getTypeId
in interfaceExtensionPointType
-
getName
public java.lang.String getName()
Description copied from interface:ExtensionPointType
A resource key for a human-readable name for this type. Required.- Specified by:
getName
in interfaceExtensionPointType
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ExtensionPointType
A resource key for a description of what makes this type unique. Null or empty string allowed for no description.- Specified by:
getDescription
in interfaceExtensionPointType
-
isEnabled
public boolean isEnabled()
Description copied from interface:ExtensionPointType
A flag that indicates whether this type is currently enabled (true) or deprecated (false). Useful for when you want to discontinue the use of a profile, but it needs to stick around for backwards-compatibility purposes. A false value will prevent users from making new instances of this type.- Specified by:
isEnabled
in interfaceExtensionPointType
-
getSettingsRecordForeignKey
public ReferenceField<?> getSettingsRecordForeignKey()
Returns the ReferenceField linking the extension point's settings record to the parent profile record. Assumes the field name is "Profile". In other words, every Extension Point settings record should have a ReferenceField name "Profile", pointing to its parent profile.- Specified by:
getSettingsRecordForeignKey
in interfaceExtensionPointType
-
newRecordConfigPanel
public ConfigPanel newRecordConfigPanel(PersistentRecord[] records, IConfigPage configPage, ConfigPanel parentPanel)
Description copied from interface:ExtensionPointType
Creates a new ConfigPanel that will be used when the user creates a new record of this extension point type. Will be shown after the extension point choice panel.- Specified by:
newRecordConfigPanel
in interfaceExtensionPointType
- Parameters:
records
- Length will be 1 or 2. Index 0 will always contain the master record for the extension point manager. Index 1 will contain the extension-point specific sub-record (if applicable)configPage
- The parent IConfigPage that can be used to navigate to new config panels.parentPanel
- The parent RecordActionTable that should be returned to when the configuration is complete.- Returns:
- A new ConfigPanel, or null to indicate that no custom configuration is desired, and a standard RecordEditForm should be used.
-
addRecordInstanceActions
public void addRecordInstanceActions(org.apache.wicket.markup.repeater.RepeatingView view, IConfigPage configPage, ConfigPanel parentPanel, PersistentRecord mainRecord, PersistentRecord subRecord)
Description copied from interface:ExtensionPointType
Provides the extension point type an opportunity to insert custom record action links. Will appear between "edit" and "delete".
Note: This method changed in 7.9. Previously, the method was called "getRecordInstanceActions", and returned a list of actions. Now, it must add its actions directly to the provided view.
- Specified by:
addRecordInstanceActions
in interfaceExtensionPointType
- Parameters:
view
- The RepeatingView that the action will be added to. Use "view.newChildId()" to get the id for your action, and then add the action to the view.configPage
- The IConfigPage that will hold the ConfigPanel returned by the action when clicked.parentPanel
- The ConfigPanel that the link will live on. Used to navigate back, if necessary.mainRecord
- The main profile record.subRecord
- The sub-settings profile record (if any).
-
onRecordDestroyed
public void onRecordDestroyed(PersistenceSession session, PersistentRecord mainRecord, PersistentRecord subRecord)
Description copied from interface:ExtensionPointType
Will be called when a profile of this extension point type is deleted, providing an opportunity to do any related cleanup. Note that the main record and the sub record will be deleted after this is called.- Specified by:
onRecordDestroyed
in interfaceExtensionPointType
-
compareTo
public int compareTo(ExtensionPointType o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ExtensionPointType>
-
findProfileSettingsRecord
protected <T> T findProfileSettingsRecord(GatewayContext context, PersistentRecord profile)
Convenience function for looking up the extension point's settings for the given profile. Relies on getSettingsRecordForeignKey() to get the reference field for the settings record.
-
-