Class GatewayMessageHandlerEditorViewModel
java.lang.Object
com.inductiveautomation.eventstream.designer.handlers.gatewaymessage.GatewayMessageHandlerEditorViewModel
- All Implemented Interfaces:
EventStreamEditorViewModel,ViewModel
public class GatewayMessageHandlerEditorViewModel
extends Object
implements EventStreamEditorViewModel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.inductiveautomation.ignition.common.gson.JsonObjectMethod is used to retrieve the edited Event Stream.voidinitialize(EventStreamContext context, com.inductiveautomation.ignition.common.gson.JsonObject json) Method initializes the ViewModel with the content of an Event Streamprotected voidvoidonEnabled(boolean enabled) Override this method to set the preferred enable state for child components.payload()projects()voidvoidsetPayload(ExpressionValue payload) voidsetProject(ExpressionValue project) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.inductiveautomation.eventstream.designer.api.EventStreamEditorViewModel
dispose
-
Constructor Details
-
GatewayMessageHandlerEditorViewModel
public GatewayMessageHandlerEditorViewModel()
-
-
Method Details
-
initialize
public void initialize(EventStreamContext context, @Nullable com.inductiveautomation.ignition.common.gson.JsonObject json) Description copied from interface:EventStreamEditorViewModelMethod initializes the ViewModel with the content of an Event Stream- Specified by:
initializein interfaceEventStreamEditorViewModel- Parameters:
context- Contains useful methods for working with the Event Streamsjson- Contains the Event Stream configuration. Expected to be null when new Event Stream is created.
-
getConfig
public com.inductiveautomation.ignition.common.gson.JsonObject getConfig()Description copied from interface:EventStreamEditorViewModelMethod is used to retrieve the edited Event Stream.- Specified by:
getConfigin interfaceEventStreamEditorViewModel- Returns:
- A json containing the Event Stream config.
-
setProject
-
setMessageHandler
-
setPayload
-
initializeProjectList
-
onEnabled
public void onEnabled(boolean enabled) Description copied from interface:EventStreamEditorViewModelOverride this method to set the preferred enable state for child components.
WhensetEnabledis 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.- Specified by:
onEnabledin interfaceEventStreamEditorViewModel
-
projects
-
selectedProject
-
messageHandler
-
payload
-
propertiesAddRemoveBindingSource
-
propertiesReorderBindingSource
-