Class ConfirmingCommand

java.lang.Object
google.registry.tools.ConfirmingCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
CreateCancellationsForBillingEventsCommand, CreateOrUpdateReservedListCommand, CreateOrUpdateUserCommand, CreatePremiumListCommand, CreateRegistrarGroupsCommand, DeleteUserCommand, LockOrUnlockDomainCommand, MutatingCommand, MutatingEppToolCommand, RecreateBillingRecurrencesCommand, UpdateRecurrenceCommand

public abstract class ConfirmingCommand extends Object implements Command
A Command that implements a confirmation step before executing.
  • Field Details

  • Constructor Details

    • ConfirmingCommand

      protected ConfirmingCommand()
  • Method Details

    • run

      public final void run() throws Exception
      Description copied from interface: Command
      Performs the command.
      Specified by:
      run in interface Command
      Throws:
      Exception
    • checkExecutionState

      protected boolean checkExecutionState()
      Run any pre-execute command checks and return true if they all pass.
    • init

      protected void init() throws Exception
      Initializes the command.
      Throws:
      Exception
    • dontRunCommand

      protected boolean dontRunCommand()
      Whether to NOT run the command. Override to true for dry-run commands.
    • prompt

      protected String prompt() throws Exception
      Returns the optional extra confirmation prompt for the command.
      Throws:
      Exception
    • execute

      protected abstract String execute() throws Exception
      Perform the command and return a result description.
      Throws:
      Exception
    • postExecute

      protected String postExecute()
      Perform any post-execution steps (e.g. verifying the result), and return a description String to be printed if non-empty.