Class QueryParamValidator
java.lang.Object
com.bonitasoft.processbuilder.extension.QueryParamValidator
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 Summary
Modifier and TypeMethodDescriptionstatic voidvalidateMandatoryLong(String paramName, String paramValue) Validates that a mandatory query parameter is a valid long value.static voidvalidateNumerical(String paramName, String paramValue) Validates that a query parameter is a numerical value (integer).
-
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 validatedparamValue- 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 validatedparamValue- the string value of the parameter to validate- Throws:
ValidationException- if the parameter is not a valid numerical value
-