Class MutatingEppToolCommand

java.lang.Object
google.registry.tools.ConfirmingCommand
google.registry.tools.MutatingEppToolCommand
All Implemented Interfaces:
Command, CommandWithConnection

public abstract class MutatingEppToolCommand extends ConfirmingCommand
A command to execute an epp command that intends to mutate objects (i.e. enables a dry run option).
  • Constructor Details

    • MutatingEppToolCommand

      public MutatingEppToolCommand()
  • Method Details

    • checkExecutionState

      protected boolean checkExecutionState()
      Description copied from class: ConfirmingCommand
      Run any pre-execute command checks and return true if they all pass.
      Overrides:
      checkExecutionState in class ConfirmingCommand
    • isDryRun

      protected boolean isDryRun()
      Subclasses can override to implement a dry run flag. False by default.
    • initEppToolCommand

      protected void initEppToolCommand() throws Exception
      Throws:
      Exception
    • initMutatingEppToolCommand

      protected abstract void initMutatingEppToolCommand() throws Exception
      Throws:
      Exception
    • validateAndGroupDomainNamesByTld

      protected static com.google.common.collect.Multimap<String,String> validateAndGroupDomainNamesByTld(List<String> names)
      Helper function for grouping sets of domain names into respective TLDs. Useful for batched EPP calls when invoking commands (i.e. domain check) with sets of domains across multiple TLDs.
    • setSoyTemplate

      protected void setSoyTemplate(com.google.template.soy.parseinfo.SoyFileInfo soyFileInfo, com.google.template.soy.parseinfo.SoyTemplateInfo soyRenderer)
    • setConnection

      public void setConnection(ServiceConnection connection)
      Specified by:
      setConnection in interface CommandWithConnection
    • addXmlCommand

      protected void addXmlCommand(String clientId, String xml)
    • addSoyRecord

      protected void addSoyRecord(String clientId, com.google.template.soy.data.SoyRecord record)
    • dontRunCommand

      protected boolean dontRunCommand()
      Description copied from class: ConfirmingCommand
      Whether to NOT run the command. Override to true for dry-run commands.
      Overrides:
      dontRunCommand in class ConfirmingCommand
    • prompt

      public String prompt() throws IOException
      Description copied from class: ConfirmingCommand
      Returns the optional extra confirmation prompt for the command.
      Overrides:
      prompt in class ConfirmingCommand
      Throws:
      IOException
    • execute

      public String execute() throws Exception
      Description copied from class: ConfirmingCommand
      Perform the command and return a result description.
      Specified by:
      execute in class ConfirmingCommand
      Throws:
      Exception
    • init

      protected final void init() throws Exception
      Description copied from class: ConfirmingCommand
      Initializes the command.
      Overrides:
      init in class ConfirmingCommand
      Throws:
      Exception