Class ScriptHandlerEditor

All Implemented Interfaces:
EventStreamAiHandler, ImageObserver, MenuContainer, Serializable, Accessible

public class ScriptHandlerEditor extends HandlerEditor implements EventStreamAiHandler
See Also:
  • Constructor Details

    • ScriptHandlerEditor

      public ScriptHandlerEditor()
      The "Ask AI" assist is not mounted here: it arrives with the grounding handed to initialize(EventStreamContext,EventStreamAiContext). An editor that is never initialized that way — demos and tests — shows no assist button.
  • Method Details

    • initialize

      public void initialize(@NonNull EventStreamContext context, com.inductiveautomation.ignition.common.gson.JsonObject config)
      Description copied from class: EventStreamEditor
      When an Event Stream is opened for editing, this method is called to initialize the editor with the Event Stream configurations.
      Specified by:
      initialize in class EventStreamEditor
      Parameters:
      context - Contains methods that's relevant Event Stream related set-up
      config - Contains the Event Stream configuration
    • initialize

      public void initialize(@NonNull EventStreamContext context, @NonNull EventStreamAiContext aiContext)
      Description copied from interface: EventStreamAiHandler

      Mount this editor's AI assist against aiContext, the grounding for the stage the editor sits at: the shape of the events it observes, and on-demand sample tools that fetch a real one.

      Called once per editor instance, after the editor's configuration has been loaded.

      Specified by:
      initialize in interface EventStreamAiHandler
      Parameters:
      context - the Designer-side context the editor was built for
      aiContext - the grounding for this editor's stage, EventStreamAiContext.NONE where there is no configured stream to ground
    • getConfig

      public com.inductiveautomation.ignition.common.gson.JsonObject getConfig()
      Description copied from class: EventStreamEditor
      When an Event Stream is saved, this method is called to retrieve the edited Event Stream for saving.
      Specified by:
      getConfig in class EventStreamEditor
      Returns:
      Configuration for the Event Stream edited by this editor
    • dispose

      public void dispose()
      Description copied from class: EventStreamEditor
      Override this method if there are sources that needs disposing.
      Overrides:
      dispose in class EventStreamEditor