Interface ExtensionPoint<S>
- Type Parameters:
S
- The type of the settings object for this extension point. UseVoid
for extension points that do not need any settings. Note that the type for the shared "profile" object is not defined here, but rather defined by theResourceTypeMeta
for the extension point category resource type. SeeDefaultResourceTypeMeta.ExtensionPointBuilder
for more information.
- All Superinterfaces:
Comparable<ExtensionPoint<S>>
- All Known Subinterfaces:
EmailProfileType<S>
,SecretProviderType<S>
- All Known Implementing Classes:
AbstractEmailProfileExtensionPoint
,AbstractExtensionPoint
,ADAuthPropertiesResource.AuthType
,ADHybridPropertiesResource.AuthType
,ADtoDBHybridAuthPropertiesResource.AuthType
,AlarmNotificationProfileExtensionPoint
,AuditProfileType
,DBAuthPropertiesResource.AuthType
,InternalAuthenticationType
,OpcConnectionExtensionPoint
,ScheduleExtensionPoint
,ServiceConnectorExtensionPoint
,TagProviderExtensionPoint
,UserSourceExtensionPoint
An "extension point" is a category of configuration that can have many flavors. There are many different categories
of extension point, such as alarm journals, tag historian providers, and so on. This interface is the base interface
for all extension point types. Each extension point category is identified by its
ResourceType
. Within
that category, modules may register many different implementations of that extension point, each with a unique
type code.
Each extension point category will have an abstract subclass/subinterface of this interface, which will define additional abstract factory methods to instantiate the actual objects that the extension point represents.
When the user configures an instance of an extension point, the configuration will be stored in a single resource, and that resource will have its configuration split up into two: the "profile" configuration (settings defined by the category, common to all extension points of that category) and the "settings" configuration (settings defined by the specific type of extension point). All this configuration will be stored in the resource's config.json file. For example, it might look like this:
{ "profile": { "type": "myExtensionPointType", "commonSetting": "value" }, "settings": { "specificSetting": "value" } }
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Represents the role of various kinds of React components to use for the extension point. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
default int
compareTo
(ExtensionPoint<S> o) decode
(com.inductiveautomation.ignition.common.gson.JsonElement json) Decode the settings object from the givenJsonElement
.Default settings will be exposed to API consumers via the "describe type" route.description
(Locale locale) A description of this extension point.com.inductiveautomation.ignition.common.gson.JsonElement
Encode the settings object to aJsonElement
.default List<MenuAction>
default Collection<ReferenceFinder<S>>
Get the reference finders for this extension point.getSettings
(ExtensionPointConfig<?, ?> config) default Optional<ResourceValidator<S>>
If present, will be used to further validate a settings object afterdecode(JsonElement)
succeeds.default Optional<WebUiComponent>
The human-readable name of this extension point.The resource type shared by all types of this extension point.default Optional<com.inductiveautomation.ignition.common.gson.JsonObject>
typeId()
The unique type identifier for this extension point.
-
Field Details
-
SETTINGS_KEY
- See Also:
-
PROFILE_KEY
- See Also:
-
-
Method Details
-
resourceType
ResourceType resourceType()The resource type shared by all types of this extension point. This is used to group extension points together. For example, all alarm journal types would share the same resource type, but have different typeIds. -
typeId
String typeId()The unique type identifier for this extension point. Must be unique within the resource type. -
name
The human-readable name of this extension point. -
description
A description of this extension point. -
settingsType
- Returns:
- the Class of the settings object for this ExtensionPoint, if it has one. If this
ExtensionPoint does not have settings, return
Optional.empty()
. By default, this method returns the class of the object returned fromdefaultSettings()
, if one is provided.
-
defaultSettings
Default settings will be exposed to API consumers via the "describe type" route. This is used to provide default (initial) values for the user interface when creating new instances of this extension point type.- Returns:
- the default settings object for this extension point, if it has one.
-
canCreate
default boolean canCreate()- Returns:
- true if this extension point is eligible for new instances to be created. Returning false here is a common way to soft-deprecate extension point types.
-
getWebUiComponent
- Returns:
- the React component to use for adding or editing settings for this extension point.
-
getMenuActions
- Returns:
- any custom menu actions to add to the data grid's hamburger menu for resources of this extension point.
-
getSettings
-
settingsSchema
- Returns:
- the JSON schema for the settings object for this extension point, if it has one. This schema will be used to populate the OpenAPI spec for routes generated for this extension point's resource type.
-
decode
Decode the settings object from the givenJsonElement
.- Parameters:
json
- theJsonElement
to decode.- Returns:
- the decoded settings object.
- Throws:
DecodingException
- if the settings object could not be decoded or this extension point does not have a settings type.
-
encode
Encode the settings object to aJsonElement
. -
getSettingsValidator
If present, will be used to further validate a settings object afterdecode(JsonElement)
succeeds. -
compareTo
- Specified by:
compareTo
in interfaceComparable<S>
-
getReferenceFinders
Get the reference finders for this extension point. Reference finders are used to find properties within this extension point type's settings object that reference other resources. By finding these references, referential integrity can be maintained when resources are renamed or deleted.
-