Package org.knime.core.webui.node.dialog
Interface VariableSettingsWO
- All Known Subinterfaces:
NodeAndVariableSettingsWO
- All Known Implementing Classes:
VariableSettings
public interface VariableSettingsWO
Write-only settings for using and exposing other settings via flow variables.
EXAMPLE: Take the following settings tree:
- first_setting: "my_value" - group_setting (added via NodeSettings#addNodeSettings) - first_child_setting: "one_value" - second_child_setting: "another_value"To set the setting "first_setting" to use the value of the variable named "my_variable" use
rootVariableSettingsObj.addUsedVariable("first_setting", "my_variable");
To set the variable "my_other_variable" to take the value of the setting "first_child_setting" use
rootVariableSettingsObj.getChild("group_setting").addExposedVariable("first_child_setting", "my_other_variable");
- Author:
- Benjamin Wilhelm, KNIME GmbH, Konstanz, Germany
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddExposedVariable(String settingsKey, String exposedVariable) Set that the setting with the given key is exposed as a variable.default voidaddUsedVariable(String settingsKey, String usedVariable) Set that the setting with the given key uses the value of the variable.voidaddUsedVariable(String settingsKey, String usedVariable, boolean isControllingFlowVariableFlawed) Set that the setting with the given key uses the value of the variable.Access the variable settings of a settings group that was added byNodeSettings.addNodeSettings(String).
-
Method Details
-
getOrCreateVariableSettings
VariableSettingsWO getOrCreateVariableSettings(String key) throws org.knime.core.node.InvalidSettingsException Access the variable settings of a settings group that was added byNodeSettings.addNodeSettings(String). See the class javadoc for an example.- Parameters:
key- the key of the child settings- Returns:
- the child settings
- Throws:
org.knime.core.node.InvalidSettingsException- if there are no child settings with the given key
-
addUsedVariable
default void addUsedVariable(String settingsKey, String usedVariable) throws org.knime.core.node.InvalidSettingsException Set that the setting with the given key uses the value of the variable.- Parameters:
settingsKey-usedVariable- the name of the variable which should be used- Throws:
org.knime.core.node.InvalidSettingsException- if there is no setting with the given key
-
addUsedVariable
void addUsedVariable(String settingsKey, String usedVariable, boolean isControllingFlowVariableFlawed) throws org.knime.core.node.InvalidSettingsException Set that the setting with the given key uses the value of the variable.- Parameters:
settingsKey-usedVariable- the name of the variable which should be usedisControllingFlowVariableFlawed- whether overriding the corresponding setting with this variable in a valid way is currently not possible- Throws:
org.knime.core.node.InvalidSettingsException- if there is no setting with the given key
-
addExposedVariable
void addExposedVariable(String settingsKey, String exposedVariable) throws org.knime.core.node.InvalidSettingsException Set that the setting with the given key is exposed as a variable.- Parameters:
settingsKey-exposedVariable- the name of the variable which should be exposed- Throws:
org.knime.core.node.InvalidSettingsException- if there is no setting with the given key
-