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 Summary
Modifier and TypeMethodDescription<T> voiddispatchValueChanged(BiFunction<UserOption, T, UserOption> handler, T value) Dispatches value changedhandlerto Data Studio to update the step options.Gets the arg connected text.getColumnsForInputNode(String inputId) Gets columns for the specifiedinputId.getConnectedStepTitleToInputNode(String inputId) Gets the title of the step connected to the node specified byinputId.Gets or creates the context for higher-level abstraction Step Property callback.getWorkflowParameterName(String parameterId) Get the underlying workflow parameter name.getWorkflowParameterValue(String parameterId) Get the underlying workflow parameter value.booleanDetermines whether the current arg is defined.booleanDetermines whether the current arg is disabled.booleanisInputNodeConnected(String inputId) Determines whether the input node specified by theinputIdis connected.default <T> voidshowChooser(BiFunction<UserOption, T, UserOption> handler, Function<UICallbackContext, List<String>> allowedValuesProvider, boolean searchEnabled) Deprecated.Since 2.3.0.<T> voidshowChooserItem(BiFunction<UserOption, T, UserOption> handler, BiFunction<UICallbackContext, CustomChooserItemBuilder, List<CustomChooserItem>> allowedValuesProvider, boolean searchEnabled) Sends a command to Data Studio to show a custom chooser.<T> voidshowColumnChooser(String inputId, BiFunction<UserOption, T, UserOption> handler) Sends a command to Data Studio to show a single column chooser.default <T> voidshowMultiChooser(BiFunction<UserOption, T, UserOption> handler, Function<UICallbackContext, List<String>> allowedValuesProvider, List<String> initialValues, boolean searchEnabled, boolean selectedAllEnabled) Deprecated.Since 2.3.0.<T> voidshowMultiChooserItem(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.<T> voidshowMultiColumnChooser(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.<T> voidshowTextBox(BiFunction<UserOption, T, UserOption> handler, String currentValue) Sends a command to Data Studio to show a text box.<T> voidshowTextBox(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.
-
Method Details
-
getUICallbackContext
UICallbackContext getUICallbackContext()Gets or creates the context for higher-level abstraction Step Property callback.- Returns:
- the UI callback context
-
dispatchValueChanged
Dispatches value changedhandlerto Data Studio to update the step options.- Type Parameters:
T- Type of the value.- Parameters:
handler- The value changed handlervalue- The new value.
-
getColumnsForInputNode
Gets columns for the specifiedinputId.- Parameters:
inputId- the input id.- Returns:
- The list of columns.
-
isInputNodeConnected
Determines whether the input node specified by theinputIdis 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 fromhandler- 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
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 fromhandler- 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) Deprecated.Since 2.3.0. Replaced by {showMultiChooserItem(BiFunction, BiFunction, List, boolean, boolean)}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.Since 2.3.0. Replaced by {showChooserItem(BiFunction, BiFunction, boolean)}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:
trueif the arg is defined, otherwisefalse
-
isArgDisabled
boolean isArgDisabled()Determines whether the current arg is disabled.- Returns:
trueif the arg is disabled, otherwisefalse
-
getArgConnectedText
String getArgConnectedText()Gets the arg connected text.- Returns:
- the arg connected text.
-
getConnectedStepTitleToInputNode
Gets the title of the step connected to the node specified byinputId.- Parameters:
inputId- The input id.- Returns:
- The connected step title.
-
showTextBox
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
Get the underlying workflow parameter name.- Parameters:
parameterId- The parameter id.- Returns:
- the parameter name if any.
- Since:
- 2.5.0
-
getWorkflowParameterValue
Get the underlying workflow parameter value.- Parameters:
parameterId- The parameter id.- Returns:
- the parameter name if any.
- Since:
- 2.5.0
-