Interface EventStreamEditorViewModel

All Superinterfaces:
ViewModel
All Known Implementing Classes:
GatewayEventHandlerEditorViewModel, GatewayMessageHandlerEditorViewModel, TagEventSourceEditorViewModel, TagHandlerEditorViewModel

public interface EventStreamEditorViewModel extends ViewModel
Class is used to ensure uniformity of method definitions in ViewModels. The methods in this class corresponds to analogous methods in HandlerEditor and SourceEditor
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Override this method if there are sources that needs disposing.
    com.inductiveautomation.ignition.common.gson.JsonObject
    Method is used to retrieve the edited Event Stream.
    void
    initialize(EventStreamContext context, com.inductiveautomation.ignition.common.gson.JsonObject json)
    Method initializes the ViewModel with the content of an Event Stream
    default void
    onEnabled(boolean enabled)
    Override this method to set the preferred enable state for child components.
  • Method Details

    • initialize

      void initialize(EventStreamContext context, @Nullable com.inductiveautomation.ignition.common.gson.JsonObject json)
      Method initializes the ViewModel with the content of an Event Stream
      Parameters:
      context - Contains useful methods for working with the Event Streams
      json - Contains the Event Stream configuration. Expected to be null when new Event Stream is created.
    • getConfig

      com.inductiveautomation.ignition.common.gson.JsonObject getConfig()
      Method is used to retrieve the edited Event Stream.
      Returns:
      A json containing the Event Stream config.
    • onEnabled

      default void onEnabled(boolean enabled)
      Override this method to set the preferred enable state for child components.

      When setEnabled is called on the editor, the enable state of all child components is set to the same state. This is not always the desired behavior. For some components, we might want them to be disabled as their initial state. By overriding this method, we can set the preferred state of the child components.
    • dispose

      default void dispose()
      Override this method if there are sources that needs disposing.