Class ProcessOptionValidator

java.lang.Object
com.bonitasoft.processbuilder.validation.ProcessOptionValidator

public final class ProcessOptionValidator extends Object
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 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 expected ActionType and ObjectsManagementOptionType enum 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:
      true if both actual strings match their respective expected enum names (case-insensitive), false otherwise.
    • 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 expected ActionType and ProcessOptionType enum 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:
      true if both actual strings match their respective expected enum names (case-insensitive), false otherwise.