Class ProcessOptionValidator
java.lang.Object
com.bonitasoft.processbuilder.validation.ProcessOptionValidator
Utility class providing validation methods for checking if action and option
type strings match predefined enum constants.
This class primarily handles case-insensitive comparisons against the names of various application enums to ensure clean conditional branching in the process logic.
- Since:
- 1.0
- Author:
- Bonitasoft
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisMatchingActionAndOption(String actionType, String optionType, ActionType expectedActionType, ObjectsManagementOptionType expectedOptionType) Checks if the actual action and option type strings match the provided expectedActionTypeandObjectsManagementOptionTypeenum constants.static booleanisMatchingActionAndOption(String actionType, String optionType, ActionType expectedActionType, ProcessOptionType expectedProcessOptionType) Checks if the actual action and option type strings match the provided expectedActionTypeandProcessOptionTypeenum constants.
-
Method Details
-
isMatchingActionAndOption
public static boolean isMatchingActionAndOption(String actionType, String optionType, ActionType expectedActionType, ObjectsManagementOptionType expectedOptionType) Checks if the actual action and option type strings match the provided expectedActionTypeandObjectsManagementOptionTypeenum constants.- Parameters:
actionType- The action string received from the process context (e.g., "DELETE").optionType- The object option string received from the process context (e.g., "CATEGORY").expectedActionType- The expected ActionType enum constant for comparison.expectedOptionType- The expected ObjectsManagementOptionType enum constant for comparison.- Returns:
trueif both actual strings match their respective expected enum names (case-insensitive),falseotherwise.
-
isMatchingActionAndOption
public static boolean isMatchingActionAndOption(String actionType, String optionType, ActionType expectedActionType, ProcessOptionType expectedProcessOptionType) Checks if the actual action and option type strings match the provided expectedActionTypeandProcessOptionTypeenum constants.- Parameters:
actionType- The action string received from the process context (e.g., "UPDATE").optionType- The object option string received from the process context (e.g., "STEPS").expectedActionType- The expected ActionType enum constant for comparison.expectedProcessOptionType- The expected ProcessOptionType enum constant for comparison.- Returns:
trueif both actual strings match their respective expected enum names (case-insensitive),falseotherwise.
-