mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Rename soy templates to use consistent naming scheme
We use {EPP resource}{action} as the naming scheme everywhere else, so we shoudl do so here too. It's generally nicer for files to group by type of EPP resource (so all of the domain actions are together) than by type of action. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=130955192
This commit is contained in:
parent
1482e413e0
commit
dd09dc1837
4 changed files with 11 additions and 12 deletions
|
@ -21,14 +21,16 @@ import com.beust.jcommander.Parameter;
|
|||
import com.beust.jcommander.Parameters;
|
||||
import com.google.template.soy.data.SoyMapData;
|
||||
import google.registry.tools.Command.GtechCommand;
|
||||
import google.registry.tools.soy.CreateDomainSoyInfo;
|
||||
import google.registry.tools.soy.DomainCreateSoyInfo;
|
||||
import java.util.List;
|
||||
import javax.inject.Inject;
|
||||
|
||||
/** A command to create a new domain via EPP. */
|
||||
@Parameters(separators = " =", commandDescription = "Create a new domain via EPP.")
|
||||
final class CreateDomainCommand extends MutatingEppToolCommand implements GtechCommand {
|
||||
@Parameter(names = {"-c", "--client"},
|
||||
|
||||
@Parameter(
|
||||
names = {"-c", "--client"},
|
||||
description = "Client identifier of the registrar to execute the command as",
|
||||
required = true)
|
||||
String clientIdentifier;
|
||||
|
@ -52,7 +54,7 @@ final class CreateDomainCommand extends MutatingEppToolCommand implements GtechC
|
|||
|
||||
@Parameter(
|
||||
names = {"-r", "--registrant"},
|
||||
description = "Domain registrant.",
|
||||
description = "Domain registrant.",
|
||||
required = true)
|
||||
private String registrant;
|
||||
|
||||
|
@ -83,10 +85,9 @@ final class CreateDomainCommand extends MutatingEppToolCommand implements GtechC
|
|||
if (isNullOrEmpty(password)) {
|
||||
password = passwordGenerator.createPassword(PASSWORD_LENGTH);
|
||||
}
|
||||
|
||||
checkArgument(ns == null || ns.size() <= 13, "There can be at most 13 nameservers.");
|
||||
|
||||
setSoyTemplate(CreateDomainSoyInfo.getInstance(), CreateDomainSoyInfo.CREATEDOMAIN);
|
||||
setSoyTemplate(DomainCreateSoyInfo.getInstance(), DomainCreateSoyInfo.DOMAINCREATE);
|
||||
addSoyRecord(clientIdentifier, new SoyMapData(
|
||||
"domain", domain,
|
||||
"period", period == null ? null : period.toString(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue