Interface ComponentDescriptor

All Known Implementing Classes:
ComponentDescriptorImpl

public interface ComponentDescriptor
This interface represents the component model that is registered with ComponentRegistry. The ComponentDescriptorImpl provides a baseline implementation for most of the functionality needed.
  • Method Details

    • id

      @Nonnull String id()
      The unique string that identifies this component
    • name

      String name()
      Returns:
      a human-readable name to briefly describe the component
    • deprecated

      boolean deprecated()
      Returns:
      true if this component is no longer in active use. This will hide it from the palette and other UI that allows users to pick components (e.g. tag drop config)
    • paletteEntries

      @Nonnull Collection<PaletteEntry> paletteEntries()
    • paletteCategory

      @Nonnull String paletteCategory()
      Which category this component should be listed under in the Designer's component palette.
    • defaultMetaName

      @Nonnull String defaultMetaName()
      The default meta.name value for this component.
    • moduleId

      @Nonnull String moduleId()
      The moduleId should be a String id that matches the module that is contributing this component to the Ignition Perspective module system.
      Returns:
      the Ignition module ID of the module providing the component.
    • defaultProperties

      com.inductiveautomation.ignition.common.gson.JsonObject defaultProperties()
      Defines default property structure and values for new instances of this component.
    • childPositionDefaults

      Optional<com.inductiveautomation.ignition.common.gson.JsonObject> childPositionDefaults()
      Defined default position property structure and values for children of new instances of this component.
    • browserResources

      @Nonnull Set<BrowserResource> browserResources()
      Returns a set of BrowserResources, which are provided to the designer and perspective client at runtime to insure the needed items are provided in the web environment to support the component. Common use cases are css files and js libraries. These resources are collected at runtime and added to the DOM prior to starting the project/view.
      Returns:
      a set of resources that the component requires.
    • schema

      @Nullable JsonSchema schema()
      Defines the shape of the component's properties structure.
    • childPositionSchema

      @Nullable default JsonSchema childPositionSchema()
      Used for components that are containers in order to provide a schema for the position objects of their children.
    • events

      @Nonnull default Collection<ComponentEventDescriptor> events()
      Returns:
      a collection of the events that this component might fire.
    • extensionFunctions

      @Nonnull default Collection<ExtensionFunctionDescriptor> extensionFunctions()
      Returns:
      a collection of the extension functions that this component declares
    • getInitialProps

      @Nullable default com.inductiveautomation.ignition.common.gson.JsonObject getInitialProps(String variantId)
    • getExampleChildPositionDefaults

      Optional<com.inductiveautomation.ignition.common.gson.JsonObject> getExampleChildPositionDefaults()
    • getIcon

      @Nonnull Optional<Icon> getIcon()

      Return the icon that is registered along with the descriptor. If an icon is not set, the default icon will be used instead.

      Pro-tip: use InteractiveSvgIcon to create an icon that works well in the nav-tree

      Returns:
      icon used for the nav tree and component palette