Class ProCommandsRegistry

java.lang.Object
liquibase.command.core.ProCommandsRegistry

public class ProCommandsRegistry extends Object
Registry of Liquibase Pro commands and subcommands for improved error messaging. This registry helps identify when OSS users attempt to run Pro-only commands so we can provide clear messaging about license requirements.
  • Field Details

    • PRO_COMMANDS

      public static final Set<String> PRO_COMMANDS
      Set of primary Pro commands that require a Liquibase license. These are top-level commands like 'flow', 'checks', etc.
    • PRO_SUBCOMMANDS

      public static final Set<String> PRO_SUBCOMMANDS
      Set of Pro subcommands that work with certain primary commands. For example: 'checks run', 'checks show', 'flow validate', etc.
  • Constructor Details

    • ProCommandsRegistry

      public ProCommandsRegistry()
  • Method Details

    • isProCommand

      public static boolean isProCommand(String command)
      Checks if a given command is a Pro command.
      Parameters:
      command - the command name to check (case insensitive)
      Returns:
      true if the command requires a Pro license
    • isProSubcommand

      public static boolean isProSubcommand(String command, String subcommand)
      Checks if a given command and subcommand combination requires Pro license.
      Parameters:
      command - the main command (e.g., "checks")
      subcommand - the subcommand (e.g., "run")
      Returns:
      true if the command+subcommand combination requires a Pro license
    • getFormattedCommand

      public static String getFormattedCommand(String command, String subcommand)
      Gets a formatted command string for error messages.
      Parameters:
      command - the main command
      subcommand - the subcommand (optional, can be null)
      Returns:
      formatted command string for display