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 Type
    Method
    Description
    void
    addExposedVariable(String settingsKey, String exposedVariable)
    Set that the setting with the given key is exposed as a variable.
    default void
    addUsedVariable(String settingsKey, String usedVariable)
    Set that the setting with the given key uses the value of the variable.
    void
    addUsedVariable(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 by NodeSettings.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 by NodeSettings.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 used
      isControllingFlowVariableFlawed - 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