Class QueryParamValidator

java.lang.Object
com.bonitasoft.processbuilder.extension.QueryParamValidator

public final class QueryParamValidator extends Object
Utility class for validating query parameters in REST API extensions. Provides methods for validating mandatory long parameters and numerical values.

This class follows the utility pattern with a private constructor and static methods only.

  • Method Details

    • validateMandatoryLong

      public static void validateMandatoryLong(String paramName, String paramValue) throws ValidationException
      Validates that a mandatory query parameter is a valid long value.
      Parameters:
      paramName - the name of the parameter being validated
      paramValue - the string value of the parameter to validate
      Throws:
      ValidationException - if the parameter is null, empty, or not a valid long
    • validateNumerical

      public static void validateNumerical(String paramName, String paramValue) throws ValidationException
      Validates that a query parameter is a numerical value (integer).
      Parameters:
      paramName - the name of the parameter being validated
      paramValue - the string value of the parameter to validate
      Throws:
      ValidationException - if the parameter is not a valid numerical value