Rename a few soy files for consistency (#1223)

* Rename a few soy files for consistency

This prefers the ResourceAction.soy naming convention for .soy files that
contain EPP XMLs so that they match the name of the corresponding EPP flow. E.g.
DomainDelete.soy now matches DomainDeleteFlow.java
This commit is contained in:
Ben McIlwain 2021-06-28 12:00:08 -04:00 committed by GitHub
parent b7ce08dfdc
commit a10b5d8b30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View file

@ -17,7 +17,7 @@ package google.registry.tools;
import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters; import com.beust.jcommander.Parameters;
import com.google.template.soy.data.SoyMapData; import com.google.template.soy.data.SoyMapData;
import google.registry.tools.soy.DeleteDomainSoyInfo; import google.registry.tools.soy.DomainDeleteSoyInfo;
/** A command to delete a domain via EPP. */ /** A command to delete a domain via EPP. */
@Parameters(separators = " =", commandDescription = "Delete domain") @Parameters(separators = " =", commandDescription = "Delete domain")
@ -60,7 +60,7 @@ final class DeleteDomainCommand extends MutatingEppToolCommand {
// Immediate deletion is accomplished using the superuser extension. // Immediate deletion is accomplished using the superuser extension.
superuser = true; superuser = true;
} }
setSoyTemplate(DeleteDomainSoyInfo.getInstance(), DeleteDomainSoyInfo.DELETEDOMAIN); setSoyTemplate(DomainDeleteSoyInfo.getInstance(), DomainDeleteSoyInfo.DELETEDOMAIN);
addSoyRecord(clientId, new SoyMapData( addSoyRecord(clientId, new SoyMapData(
"domainName", domainName, "domainName", domainName,
"immediately", immediately, "immediately", immediately,

View file

@ -17,7 +17,7 @@ package google.registry.tools;
import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters; import com.beust.jcommander.Parameters;
import com.google.template.soy.data.SoyMapData; import com.google.template.soy.data.SoyMapData;
import google.registry.tools.soy.DeleteHostSoyInfo; import google.registry.tools.soy.HostDeleteSoyInfo;
/** A command to delete a host via EPP. */ /** A command to delete a host via EPP. */
@Parameters(separators = " =", commandDescription = "Delete host") @Parameters(separators = " =", commandDescription = "Delete host")
@ -49,7 +49,7 @@ final class DeleteHostCommand extends MutatingEppToolCommand {
@Override @Override
protected void initMutatingEppToolCommand() { protected void initMutatingEppToolCommand() {
setSoyTemplate(DeleteHostSoyInfo.getInstance(), DeleteHostSoyInfo.DELETEHOST); setSoyTemplate(HostDeleteSoyInfo.getInstance(), HostDeleteSoyInfo.DELETEHOST);
addSoyRecord(clientId, new SoyMapData( addSoyRecord(clientId, new SoyMapData(
"hostName", hostName, "hostName", hostName,
"reason", reason, "reason", reason,

View file

@ -25,7 +25,7 @@ import com.beust.jcommander.Parameters;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
import com.google.template.soy.data.SoyMapData; import com.google.template.soy.data.SoyMapData;
import google.registry.model.domain.DomainBase; import google.registry.model.domain.DomainBase;
import google.registry.tools.soy.RenewDomainSoyInfo; import google.registry.tools.soy.DomainRenewSoyInfo;
import google.registry.util.Clock; import google.registry.util.Clock;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
@ -68,7 +68,7 @@ final class RenewDomainCommand extends MutatingEppToolCommand {
Optional<DomainBase> domainOptional = Optional<DomainBase> domainOptional =
loadByForeignKey(DomainBase.class, domainName, now); loadByForeignKey(DomainBase.class, domainName, now);
checkArgumentPresent(domainOptional, "Domain '%s' does not exist or is deleted", domainName); checkArgumentPresent(domainOptional, "Domain '%s' does not exist or is deleted", domainName);
setSoyTemplate(RenewDomainSoyInfo.getInstance(), RenewDomainSoyInfo.RENEWDOMAIN); setSoyTemplate(DomainRenewSoyInfo.getInstance(), DomainRenewSoyInfo.RENEWDOMAIN);
DomainBase domain = domainOptional.get(); DomainBase domain = domainOptional.get();
addSoyRecord( addSoyRecord(
isNullOrEmpty(clientId) ? domain.getCurrentSponsorClientId() : clientId, isNullOrEmpty(clientId) ? domain.getCurrentSponsorClientId() : clientId,