Package google.registry.tools
Class MutatingEppToolCommand
java.lang.Object
google.registry.tools.ConfirmingCommand
google.registry.tools.MutatingEppToolCommand
- All Implemented Interfaces:
Command
,CommandWithConnection
A command to execute an epp command that intends to mutate objects
(i.e. enables a dry run option).
-
Field Summary
Fields inherited from class google.registry.tools.ConfirmingCommand
errorPrintStream, printStream
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addSoyRecord
(String clientId, com.google.template.soy.data.SoyRecord record) protected void
addXmlCommand
(String clientId, String xml) protected boolean
Run any pre-execute command checks and return true if they all pass.protected boolean
Whether to NOT run the command.execute()
Perform the command and return a result description.protected final void
init()
Initializes the command.protected void
protected abstract void
protected boolean
isDryRun()
Subclasses can override to implement a dry run flag.prompt()
Returns the optional extra confirmation prompt for the command.void
setConnection
(ServiceConnection connection) protected void
setSoyTemplate
(com.google.template.soy.parseinfo.SoyFileInfo soyFileInfo, com.google.template.soy.parseinfo.SoyTemplateInfo soyRenderer) Helper function for grouping sets of domain names into respective TLDs.Methods inherited from class google.registry.tools.ConfirmingCommand
postExecute, run
-
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 classConfirmingCommand
-
isDryRun
protected boolean isDryRun()Subclasses can override to implement a dry run flag. False by default. -
initEppToolCommand
- Throws:
Exception
-
initMutatingEppToolCommand
- 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
- Specified by:
setConnection
in interfaceCommandWithConnection
-
addXmlCommand
-
addSoyRecord
-
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 classConfirmingCommand
-
prompt
Description copied from class:ConfirmingCommand
Returns the optional extra confirmation prompt for the command.- Overrides:
prompt
in classConfirmingCommand
- Throws:
IOException
-
execute
Description copied from class:ConfirmingCommand
Perform the command and return a result description.- Specified by:
execute
in classConfirmingCommand
- Throws:
Exception
-
init
Description copied from class:ConfirmingCommand
Initializes the command.- Overrides:
init
in classConfirmingCommand
- Throws:
Exception
-