Interface StepPropertyContext


public interface StepPropertyContext
Defines the context in all StepPropertyConfig callback api. This api expose Data Studio UI api to the custom defined step property to allow the user-defined callback behavior to interact with Data Studio UI.
Since:
2.0.0
  • Method Details

    • getUICallbackContext

      UICallbackContext getUICallbackContext()
      Gets or creates the context for higher-level abstraction Step Property callback.
      Returns:
      the UI callback context
    • dispatchValueChanged

      <T> void dispatchValueChanged(BiFunction<UserOption,T,UserOption> handler, T value)
      Dispatches value changed handler to Data Studio to update the step options.
      Type Parameters:
      T - Type of the value.
      Parameters:
      handler - The value changed handler
      value - The new value.
    • getColumnsForInputNode

      List<Column> getColumnsForInputNode(String inputId)
      Gets columns for the specified inputId.
      Parameters:
      inputId - the input id.
      Returns:
      The list of columns.
    • isInputNodeConnected

      boolean isInputNodeConnected(String inputId)
      Determines whether the input node specified by the inputId is connected.
      Parameters:
      inputId - the input id
      Returns:
      The connected state.
    • showMultiColumnChooser

      <T> void showMultiColumnChooser(String inputId, BiFunction<UserOption,T,UserOption> handler, List<String> initialValues, boolean showFilter, boolean showSelectAll)
      Sends a command to Data Studio to show a multi column chooser.
      Type Parameters:
      T - The type of value return by the chooser.
      Parameters:
      inputId - The input id where the columns are retrieved from
      handler - The value changed handler when the columns are selected from the chooser UI.
      initialValues - The initial pre-selected values.
      showFilter - Whether to show filter in the chooser.
      showSelectAll - Whether to show "Select all" in the chooser.
    • showColumnChooser

      <T> void showColumnChooser(String inputId, BiFunction<UserOption,T,UserOption> handler)
      Sends a command to Data Studio to show a single column chooser.
      Type Parameters:
      T - The type of value return by the chooser.
      Parameters:
      inputId - The input id where the column are retrieved from
      handler - The value changed handler when a column is selected from the chooser UI.
    • showMultiChooser

      @Deprecated default <T> void showMultiChooser(BiFunction<UserOption,T,UserOption> handler, Function<UICallbackContext,List<String>> allowedValuesProvider, List<String> initialValues, boolean searchEnabled, boolean selectedAllEnabled)
      Sends a command to Data Studio to show a multi custom chooser. Custom chooser contains user-defined values.
      Type Parameters:
      T - The type of value return by the chooser
      Parameters:
      handler - The value changed handler when the values are selected from the chooser UI.
      allowedValuesProvider - The values provider to show in the chooser.
      initialValues - The initial pre-selected values.
      searchEnabled - Whether to show filter in the chooser.
      selectedAllEnabled - Whether to show "Select all" in the chooser
    • showMultiChooserItem

      <T> void showMultiChooserItem(BiFunction<UserOption,T,UserOption> handler, BiFunction<UICallbackContext,CustomChooserItemBuilder,List<CustomChooserItem>> allowedValuesProvider, List<String> initialValues, boolean searchEnabled, boolean selectedAllEnabled)
      Sends a command to Data Studio to show a multi custom chooser. Custom chooser contains user-defined chooser items.
      Type Parameters:
      T - The custom chooser item return by the chooser
      Parameters:
      handler - The chooser item changed handler when the values are selected from the chooser UI.
      allowedValuesProvider - The chooser items provider to show in the chooser.
      initialValues - The initial pre-selected values.
      searchEnabled - Whether to show filter in the chooser.
      selectedAllEnabled - Whether to show "Select all" in the chooser
      Since:
      2.3.0
    • showChooser

      @Deprecated default <T> void showChooser(BiFunction<UserOption,T,UserOption> handler, Function<UICallbackContext,List<String>> allowedValuesProvider, boolean searchEnabled)
      Deprecated.
      Sends a command to Data Studio to show a custom chooser. Custom chooser contains user-defined values.
      Type Parameters:
      T - The type of value return by the chooser
      Parameters:
      handler - The value changed handler when a value is selected from the chooser UI.
      allowedValuesProvider - The values provider to show in the chooser.
      searchEnabled - Whether to show filter in the chooser.
    • showChooserItem

      <T> void showChooserItem(BiFunction<UserOption,T,UserOption> handler, BiFunction<UICallbackContext,CustomChooserItemBuilder,List<CustomChooserItem>> allowedValuesProvider, boolean searchEnabled)
      Sends a command to Data Studio to show a custom chooser. Custom chooser contains user-defined chooser items.
      Type Parameters:
      T - The custom chooser item of value return by the chooser.
      Parameters:
      handler - The chooser item changed handler when a value is selected from the chooser UI.
      allowedValuesProvider - The chooser items provider to show in the chooser.
      searchEnabled - Whether to show filter in the chooser.
      Since:
      2.3.0
    • isArgDefined

      boolean isArgDefined()
      Determines whether the current arg is defined.
      Returns:
      true if the arg is defined, otherwise false
    • isArgDisabled

      boolean isArgDisabled()
      Determines whether the current arg is disabled.
      Returns:
      true if the arg is disabled, otherwise false
    • getArgConnectedText

      String getArgConnectedText()
      Gets the arg connected text.
      Returns:
      the arg connected text.
    • getConnectedStepTitleToInputNode

      String getConnectedStepTitleToInputNode(String inputId)
      Gets the title of the step connected to the node specified by inputId.
      Parameters:
      inputId - The input id.
      Returns:
      The connected step title.
    • showTextBox

      <T> void showTextBox(BiFunction<UserOption,T,UserOption> handler, String currentValue)
      Sends a command to Data Studio to show a text box.
      Type Parameters:
      T - The type of value return by the text box
      Parameters:
      handler - The value changed handler when the text is entered in the text box UI.
      currentValue - The initial value to pre-populate the text box.
    • showTextBox

      <T> void showTextBox(BiFunction<UserOption,T,UserOption> handler, BiFunction<UserOption,String,UserOption> parameterSelectedHandler, String currentValue)
      Sends a command to Data Studio to show a text box with Workflow Parameters chooser.
      Type Parameters:
      T - The type of value return by the text box
      Parameters:
      handler - The value changed handler when the text is entered in the text box UI.
      parameterSelectedHandler - The handler when a workflow parameter is selected in the UI.
      currentValue - The initial value to pre-populate the text box.
      Since:
      2.5.0
    • getWorkflowParameterName

      Optional<String> getWorkflowParameterName(String parameterId)
      Get the underlying workflow parameter name.
      Parameters:
      parameterId - The parameter id.
      Returns:
      the parameter name if any.
      Since:
      2.5.0
    • getWorkflowParameterValue

      Optional<String> getWorkflowParameterValue(String parameterId)
      Get the underlying workflow parameter value.
      Parameters:
      parameterId - The parameter id.
      Returns:
      the parameter name if any.
      Since:
      2.5.0