Class DefaultNodeSettingsServiceWithVariables
java.lang.Object
org.knime.core.webui.node.dialog.defaultdialog.DefaultNodeSettingsServiceWithVariables
- All Implemented Interfaces:
NodeSettingsService
public final class DefaultNodeSettingsServiceWithVariables
extends Object
implements NodeSettingsService
A
NodeSettingsService decorator that can be used to enable saving and loading flow variables of
NodeDialog using the DefaultNodeDialog.getPage() page.- Author:
- Paul Bärnreuther
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor -
Method Summary
Modifier and TypeMethodDescriptionfromNodeSettings(Map<SettingsType, NodeAndVariableSettingsRO> settings, org.knime.core.node.port.PortObjectSpec[] specs) Called when a dialog is initialized.voidtoNodeSettings(String textSettings, Map<SettingsType, NodeAndVariableSettingsWO> settings) Called when dialog settings are applied.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.knime.core.webui.node.dialog.NodeSettingsService
deactivate, validateNodeSettingsAndVariables
-
Constructor Details
-
DefaultNodeSettingsServiceWithVariables
Constructor- Parameters:
delegate- that will be used after saving and before loading the flow variable settings.
-
-
Method Details
-
toNodeSettings
public void toNodeSettings(String textSettings, Map<SettingsType, NodeAndVariableSettingsWO> settings) Description copied from interface:NodeSettingsServiceCalled when dialog settings are applied. Translates text-based settings toNodeAndVariableSettingsWO-instances of certainSettingsType.- Specified by:
toNodeSettingsin interfaceNodeSettingsService- Parameters:
textSettings- the text-based settings objectsettings- the settings instances to write into
-
fromNodeSettings
public String fromNodeSettings(Map<SettingsType, NodeAndVariableSettingsRO> settings, org.knime.core.node.port.PortObjectSpec[] specs) Description copied from interface:NodeSettingsServiceCalled when a dialog is initialized. Infers a single text-based settings representation from possibly multipleNodeAndVariableSettingsRO-instances (one perSettingsType).- Specified by:
fromNodeSettingsin interfaceNodeSettingsService- Parameters:
settings- the settings to read from; if there are no settings with the node stored, yet, the default node settings will be supplied (see#getDefaultNodeSettings(Map, PortObjectSpec[]))specs- the specs for configuring the settings (includes the flow variable port). NOTE: can containnull-values, e.g., in case an input port is not connected- Returns:
- a new text-based settings representation
-