Add a command to the registry. Each command must have a unique keyword that identifies it. If a command with the same keyword is already registered, an error will be thrown.
the command to register.
true if the command was successfully registered.
Remove a command from the registry by its keyword.
the keyword of the command to unregister.
true if the command was successfully unregistered, false if no command with the given keyword was found.
Check if a command with the given keyword is registered in the registry.
the keyword of the command to check.
true if a command with the given keyword is registered, false otherwise.
Get a command from the registry by its keyword.
the keyword of the command to retrieve.
the command with the given keyword, or undefined if no command with the given keyword is found.
Remove all commands from the registry.
Get all commands registered in the registry.
An object containing all registered commands, keyed by their keywords.
Registry for managing commands in the rules engine. This class allows for registering, unregistering, and retrieving commands by their unique keywords. Each command must have a unique keyword that identifies it. The registry ensures that no two commands with the same keyword can be registered at the same time. One registry should be created for each workspace, and the commands registered in the registry can then be used by the CommandHandler to execute command actions.