Package liquibase.command.core
Class ProCommandsRegistry
java.lang.Object
liquibase.command.core.ProCommandsRegistry
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 Summary
FieldsModifier and TypeFieldDescriptionSet of primary Pro commands that require a Liquibase license.Set of Pro subcommands that work with certain primary commands. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getFormattedCommand
(String command, String subcommand) Gets a formatted command string for error messages.static boolean
isProCommand
(String command) Checks if a given command is a Pro command.static boolean
isProSubcommand
(String command, String subcommand) Checks if a given command and subcommand combination requires Pro license.
-
Field Details
-
PRO_COMMANDS
Set of primary Pro commands that require a Liquibase license. These are top-level commands like 'flow', 'checks', etc. -
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
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
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
Gets a formatted command string for error messages.- Parameters:
command
- the main commandsubcommand
- the subcommand (optional, can be null)- Returns:
- formatted command string for display
-