Interface ExtensionPoint<S>

Type Parameters:
S - The type of the settings object for this extension point. Use Void 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 the ResourceTypeMeta for the extension point category resource type. See DefaultResourceTypeMeta.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

public interface ExtensionPoint<S> extends Comparable<ExtensionPoint<S>>
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"
         }
    }
 
  • Field Details

  • 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

      String name(Locale locale)
      The human-readable name of this extension point.
    • description

      String description(Locale locale)
      A description of this extension point.
    • settingsType

      default Optional<Class<S>> 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 from defaultSettings(), if one is provided.
    • defaultSettings

      default Optional<S> 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

      default Optional<WebUiComponent> getWebUiComponent(ExtensionPoint.ComponentType type)
      Returns:
      the React component to use for adding or editing settings for this extension point.
    • getMenuActions

      default List<MenuAction> getMenuActions()
      Returns:
      any custom menu actions to add to the data grid's hamburger menu for resources of this extension point.
    • getSettings

      default Optional<S> getSettings(ExtensionPointConfig<?,?> config)
    • settingsSchema

      default Optional<com.inductiveautomation.ignition.common.gson.JsonObject> 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

      S decode(com.inductiveautomation.ignition.common.gson.JsonElement json) throws DecodingException
      Decode the settings object from the given JsonElement.
      Parameters:
      json - the JsonElement 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

      com.inductiveautomation.ignition.common.gson.JsonElement encode(S settings)
      Encode the settings object to a JsonElement.
    • getSettingsValidator

      default Optional<ResourceValidator<S>> getSettingsValidator()
      If present, will be used to further validate a settings object after decode(JsonElement) succeeds.
    • compareTo

      default int compareTo(@Nonnull ExtensionPoint<S> o)
      Specified by:
      compareTo in interface Comparable<S>
    • getReferenceFinders

      default Collection<ReferenceFinder<S>> getReferenceFinders(ResourceType type)
      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.