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 Summary
Modifier and TypeMethodDescriptionReturns a set ofBrowserResource
s, 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.Optional<com.inductiveautomation.ignition.common.gson.JsonObject>
Defined default position property structure and values for children of new instances of this component.default JsonSchema
Used for components that are containers in order to provide a schema for the position objects of their children.The default meta.name value for this component.com.inductiveautomation.ignition.common.gson.JsonObject
Defines default property structure and values for new instances of this component.boolean
default Collection<ComponentEventDescriptor>
events()
default Collection<ExtensionFunctionDescriptor>
Optional<com.inductiveautomation.ignition.common.gson.JsonObject>
getIcon()
Return the icon that is registered along with the descriptor.default com.inductiveautomation.ignition.common.gson.JsonObject
getInitialProps
(String variantId) id()
The unique string that identifies this componentmoduleId()
The moduleId should be a String id that matches the module that is contributing this component to the Ignition Perspective module system.name()
Which category this component should be listed under in the Designer's component palette.schema()
Defines the shape of the component's properties structure.
-
Method Details
-
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
-
paletteCategory
Which category this component should be listed under in the Designer's component palette. -
defaultMetaName
The default meta.name value for this component. -
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
Returns a set ofBrowserResource
s, 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
Defines the shape of the component's properties structure. -
childPositionSchema
Used for components that are containers in order to provide a schema for the position objects of their children. -
events
- Returns:
- a collection of the events that this component might fire.
-
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
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
-