Class RandomValueStepHelper
java.lang.Object
org.pentaho.di.trans.step.BaseStepHelper
org.pentaho.di.trans.steps.randomvalue.RandomValueStepHelper
- All Implemented Interfaces:
StepHelperInterface
Currently, provides action handler for exposing available
random function types, with potential for additional step-level utilities in the future.
- See Also:
-
Field Summary
FieldsFields inherited from class org.pentaho.di.trans.step.BaseStepHelper
IS_TRANS_REFERENCE, IS_VALID_REFERENCE, log, REFERENCE_PATH, SEPARATORFields inherited from interface org.pentaho.di.trans.step.StepHelperInterface
ACTION_STATUS, FAILURE_METHOD_NOT_FOUND_RESPONSE, FAILURE_RESPONSE, STATUS, SUCCESS_RESPONSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.json.simple.JSONObjectGenerates a JSON response containing the available random function types.protected org.json.simple.JSONObjectHandles step-specific actions for the RandomValue step.Methods inherited from class org.pentaho.di.trans.step.BaseStepHelper
getReferencePath, isFailedResponse, stepAction, validateAndPutReferenceStatus
-
Field Details
-
RESPONSE_KEY
- See Also:
-
METHOD_GET_RANDOM_FUNCTION_TYPES
- See Also:
-
-
Constructor Details
-
RandomValueStepHelper
public RandomValueStepHelper()
-
-
Method Details
-
getRandomFunctionTypes
protected org.json.simple.JSONObject getRandomFunctionTypes()Generates a JSON response containing the available random function types.Iterates through the list of random value functions defined in
RandomValueMeta.functions, and constructs a JSON array where each element represents a function type with its code and description. The resulting JSON object contains this array under the key "randomFunctionTypes".- Returns:
- a
JSONObjectcontaining the available random function types
-
handleStepAction
protected org.json.simple.JSONObject handleStepAction(String method, TransMeta transMeta, Map<String, String> queryParams) Handles step-specific actions for the RandomValue step.This method overrides
BaseStepHelper.handleStepAction(String, TransMeta, Map)to provide RandomValue-specific functionality. Currently, supports:- "getRandomFunctionTypes" - returns available random function types
- Specified by:
handleStepActionin classBaseStepHelper- Parameters:
method- the name of the method to execute (case-sensitive)transMeta- the transformation metadata (currently unused for this step)queryParams- query parameters for the action (currently unused for this step)- Returns:
- a
JSONObjectcontaining either the action result or an error response - See Also:
-