mirror of
https://github.com/google/nomulus.git
synced 2025-05-22 04:09:46 +02:00
Remove 'fullyQualified' from host and domain names (#631)
* Remove 'fullyQualified' from host and domain names We don't actually enforce that these are properly fully-qualified (there's no dot at the end) and we specifically use the term "label name" when talking about labels. Note: this doesn't convert FQDN -> DN (et al) in at least two types of cases: 1. When the term is part of the XML schema 2. When the term is used by some external system, e.g. SafeBrowsing API * Add TODO to rename fields
This commit is contained in:
parent
d19ed3ed09
commit
0820b672bb
87 changed files with 245 additions and 228 deletions
|
@ -426,7 +426,7 @@ public class DeleteContactsAndHostsAction implements Runnable {
|
|||
if (resource instanceof HostResource) {
|
||||
return ImmutableList.of(
|
||||
HostPendingActionNotificationResponse.create(
|
||||
((HostResource) resource).getFullyQualifiedHostName(), deleteAllowed, trid, now));
|
||||
((HostResource) resource).getHostName(), deleteAllowed, trid, now));
|
||||
} else if (resource instanceof ContactResource) {
|
||||
return ImmutableList.of(
|
||||
ContactPendingActionNotificationResponse.create(
|
||||
|
@ -465,11 +465,11 @@ public class DeleteContactsAndHostsAction implements Runnable {
|
|||
} else if (existingResource instanceof HostResource) {
|
||||
HostResource host = (HostResource) existingResource;
|
||||
if (host.isSubordinate()) {
|
||||
dnsQueue.addHostRefreshTask(host.getFullyQualifiedHostName());
|
||||
dnsQueue.addHostRefreshTask(host.getHostName());
|
||||
tm().saveNewOrUpdate(
|
||||
tm().load(host.getSuperordinateDomain())
|
||||
.asBuilder()
|
||||
.removeSubordinateHost(host.getFullyQualifiedHostName())
|
||||
.removeSubordinateHost(host.getHostName())
|
||||
.build());
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -177,7 +177,7 @@ public class DeleteProberDataAction implements Runnable {
|
|||
return;
|
||||
}
|
||||
|
||||
String domainName = domain.getFullyQualifiedDomainName();
|
||||
String domainName = domain.getDomainName();
|
||||
if (domainName.equals("nic." + domain.getTld())) {
|
||||
getContext().incrementCounter("skipped, NIC domain");
|
||||
return;
|
||||
|
@ -265,7 +265,7 @@ public class DeleteProberDataAction implements Runnable {
|
|||
// mapreduce runs anyway.
|
||||
ofy().save().entities(deletedDomain, historyEntry);
|
||||
updateForeignKeyIndexDeletionTime(deletedDomain);
|
||||
dnsQueue.addDomainRefreshTask(deletedDomain.getFullyQualifiedDomainName());
|
||||
dnsQueue.addDomainRefreshTask(deletedDomain.getDomainName());
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -216,11 +216,11 @@ public class RefreshDnsOnHostRenameAction implements Runnable {
|
|||
}
|
||||
if (referencingHostKey != null) {
|
||||
retrier.callWithRetry(
|
||||
() -> dnsQueue.addDomainRefreshTask(domain.getFullyQualifiedDomainName()),
|
||||
() -> dnsQueue.addDomainRefreshTask(domain.getDomainName()),
|
||||
TransientFailureException.class);
|
||||
logger.atInfo().log(
|
||||
"Enqueued DNS refresh for domain %s referenced by host %s.",
|
||||
domain.getFullyQualifiedDomainName(), referencingHostKey);
|
||||
domain.getDomainName(), referencingHostKey);
|
||||
getContext().incrementCounter("domains refreshed");
|
||||
} else {
|
||||
getContext().incrementCounter("domains not refreshed");
|
||||
|
|
|
@ -96,7 +96,7 @@ public class RelockDomainAction implements Runnable {
|
|||
String message =
|
||||
String.format(
|
||||
"Domain %s is already manually relocked, skipping automated relock.",
|
||||
domain.getFullyQualifiedDomainName());
|
||||
domain.getDomainName());
|
||||
logger.atInfo().log(message);
|
||||
// SC_NO_CONTENT (204) skips retry -- see the comment below
|
||||
response.setStatus(SC_NO_CONTENT);
|
||||
|
@ -144,7 +144,7 @@ public class RelockDomainAction implements Runnable {
|
|||
|
||||
private void verifyDomainAndLockState(RegistryLock oldLock, DomainBase domain) {
|
||||
// Domain shouldn't be deleted or have a pending transfer/delete
|
||||
String domainName = domain.getFullyQualifiedDomainName();
|
||||
String domainName = domain.getDomainName();
|
||||
checkArgument(
|
||||
!DateTimeUtils.isAtOrAfter(jpaTm().getTransactionTime(), domain.getDeletionTime()),
|
||||
"Domain %s has been deleted",
|
||||
|
|
|
@ -119,35 +119,31 @@ public class DnsQueue {
|
|||
.param(PARAM_TLD, tld));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a task to the queue to refresh the DNS information for the specified subordinate host.
|
||||
*/
|
||||
public TaskHandle addHostRefreshTask(String fullyQualifiedHostName) {
|
||||
Optional<InternetDomainName> tld =
|
||||
Registries.findTldForName(InternetDomainName.from(fullyQualifiedHostName));
|
||||
checkArgument(tld.isPresent(),
|
||||
String.format("%s is not a subordinate host to a known tld", fullyQualifiedHostName));
|
||||
return addToQueue(TargetType.HOST, fullyQualifiedHostName, tld.get().toString(), Duration.ZERO);
|
||||
/** Adds a task to the queue to refresh the DNS information for the specified subordinate host. */
|
||||
public TaskHandle addHostRefreshTask(String hostName) {
|
||||
Optional<InternetDomainName> tld = Registries.findTldForName(InternetDomainName.from(hostName));
|
||||
checkArgument(
|
||||
tld.isPresent(), String.format("%s is not a subordinate host to a known tld", hostName));
|
||||
return addToQueue(TargetType.HOST, hostName, tld.get().toString(), Duration.ZERO);
|
||||
}
|
||||
|
||||
/** Enqueues a task to refresh DNS for the specified domain now. */
|
||||
public TaskHandle addDomainRefreshTask(String fullyQualifiedDomainName) {
|
||||
return addDomainRefreshTask(fullyQualifiedDomainName, Duration.ZERO);
|
||||
public TaskHandle addDomainRefreshTask(String domainName) {
|
||||
return addDomainRefreshTask(domainName, Duration.ZERO);
|
||||
}
|
||||
|
||||
/** Enqueues a task to refresh DNS for the specified domain at some point in the future. */
|
||||
public TaskHandle addDomainRefreshTask(String fullyQualifiedDomainName, Duration countdown) {
|
||||
public TaskHandle addDomainRefreshTask(String domainName, Duration countdown) {
|
||||
return addToQueue(
|
||||
TargetType.DOMAIN,
|
||||
fullyQualifiedDomainName,
|
||||
assertTldExists(getTldFromDomainName(fullyQualifiedDomainName)),
|
||||
domainName,
|
||||
assertTldExists(getTldFromDomainName(domainName)),
|
||||
countdown);
|
||||
}
|
||||
|
||||
/** Adds a task to the queue to refresh the DNS information for the specified zone. */
|
||||
public TaskHandle addZoneRefreshTask(String fullyQualifiedZoneName) {
|
||||
return addToQueue(
|
||||
TargetType.ZONE, fullyQualifiedZoneName, fullyQualifiedZoneName, Duration.ZERO);
|
||||
public TaskHandle addZoneRefreshTask(String zoneName) {
|
||||
return addToQueue(TargetType.ZONE, zoneName, zoneName, Duration.ZERO);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -89,7 +89,7 @@ public final class RefreshDnsAction implements Runnable {
|
|||
private static void verifyHostIsSubordinate(HostResource host) {
|
||||
if (!host.isSubordinate()) {
|
||||
throw new BadRequestException(
|
||||
String.format("%s isn't a subordinate hostname", host.getFullyQualifiedHostName()));
|
||||
String.format("%s isn't a subordinate hostname", host.getHostName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ public class CloudDnsWriter extends BaseDnsWriter {
|
|||
}
|
||||
|
||||
// Construct NS records (if any).
|
||||
Set<String> nameserverData = domainBase.get().loadNameserverFullyQualifiedHostNames();
|
||||
Set<String> nameserverData = domainBase.get().loadNameserverHostNames();
|
||||
Set<String> subordinateHosts = domainBase.get().getSubordinateHosts();
|
||||
if (!nameserverData.isEmpty()) {
|
||||
HashSet<String> nsRrData = new HashSet<>();
|
||||
|
|
|
@ -189,7 +189,7 @@ public class DnsUpdateWriter extends BaseDnsWriter {
|
|||
for (DelegationSignerData signerData : domain.getDsData()) {
|
||||
DSRecord dsRecord =
|
||||
new DSRecord(
|
||||
toAbsoluteName(domain.getFullyQualifiedDomainName()),
|
||||
toAbsoluteName(domain.getDomainName()),
|
||||
DClass.IN,
|
||||
dnsDefaultDsTtl.getStandardSeconds(),
|
||||
signerData.getKeyTag(),
|
||||
|
@ -216,7 +216,7 @@ public class DnsUpdateWriter extends BaseDnsWriter {
|
|||
private void addInBailiwickNameServerSet(DomainBase domain, Update update) {
|
||||
for (String hostName :
|
||||
intersection(
|
||||
domain.loadNameserverFullyQualifiedHostNames(), domain.getSubordinateHosts())) {
|
||||
domain.loadNameserverHostNames(), domain.getSubordinateHosts())) {
|
||||
Optional<HostResource> host = loadByForeignKey(HostResource.class, hostName, clock.nowUtc());
|
||||
checkState(host.isPresent(), "Host %s cannot be loaded", hostName);
|
||||
update.add(makeAddressSet(host.get()));
|
||||
|
@ -226,10 +226,10 @@ public class DnsUpdateWriter extends BaseDnsWriter {
|
|||
|
||||
private RRset makeNameServerSet(DomainBase domain) {
|
||||
RRset nameServerSet = new RRset();
|
||||
for (String hostName : domain.loadNameserverFullyQualifiedHostNames()) {
|
||||
for (String hostName : domain.loadNameserverHostNames()) {
|
||||
NSRecord record =
|
||||
new NSRecord(
|
||||
toAbsoluteName(domain.getFullyQualifiedDomainName()),
|
||||
toAbsoluteName(domain.getDomainName()),
|
||||
DClass.IN,
|
||||
dnsDefaultNsTtl.getStandardSeconds(),
|
||||
toAbsoluteName(hostName));
|
||||
|
@ -244,7 +244,7 @@ public class DnsUpdateWriter extends BaseDnsWriter {
|
|||
if (address instanceof Inet4Address) {
|
||||
ARecord record =
|
||||
new ARecord(
|
||||
toAbsoluteName(host.getFullyQualifiedHostName()),
|
||||
toAbsoluteName(host.getHostName()),
|
||||
DClass.IN,
|
||||
dnsDefaultATtl.getStandardSeconds(),
|
||||
address);
|
||||
|
@ -260,7 +260,7 @@ public class DnsUpdateWriter extends BaseDnsWriter {
|
|||
if (address instanceof Inet6Address) {
|
||||
AAAARecord record =
|
||||
new AAAARecord(
|
||||
toAbsoluteName(host.getFullyQualifiedHostName()),
|
||||
toAbsoluteName(host.getHostName()),
|
||||
DClass.IN,
|
||||
dnsDefaultATtl.getStandardSeconds(),
|
||||
address);
|
||||
|
|
|
@ -107,7 +107,7 @@ public class ExportDomainListsAction implements Runnable {
|
|||
@Override
|
||||
public void map(DomainBase domain) {
|
||||
if (realTlds.contains(domain.getTld()) && isActive(domain, exportTime)) {
|
||||
emit(domain.getTld(), domain.getFullyQualifiedDomainName());
|
||||
emit(domain.getTld(), domain.getDomainName());
|
||||
getContext().incrementCounter(String.format("domains in tld %s", domain.getTld()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -354,7 +354,7 @@ public class DomainCreateFlow implements TransactionalFlow {
|
|||
.setDsData(secDnsCreate.isPresent() ? secDnsCreate.get().getDsData() : null)
|
||||
.setRegistrant(command.getRegistrant())
|
||||
.setAuthInfo(command.getAuthInfo())
|
||||
.setFullyQualifiedDomainName(targetId)
|
||||
.setDomainName(targetId)
|
||||
.setNameservers(
|
||||
(ImmutableSet<VKey<HostResource>>)
|
||||
command.getNameservers().stream().collect(toImmutableSet()))
|
||||
|
@ -598,7 +598,7 @@ public class DomainCreateFlow implements TransactionalFlow {
|
|||
private void enqueueTasks(
|
||||
DomainBase newDomain, boolean hasSignedMarks, boolean hasClaimsNotice) {
|
||||
if (newDomain.shouldPublishToDns()) {
|
||||
dnsQueue.addDomainRefreshTask(newDomain.getFullyQualifiedDomainName());
|
||||
dnsQueue.addDomainRefreshTask(newDomain.getDomainName());
|
||||
}
|
||||
if (hasClaimsNotice || hasSignedMarks) {
|
||||
LordnTaskUtils.enqueueDomainBaseTask(newDomain);
|
||||
|
|
|
@ -242,7 +242,7 @@ public final class DomainDeleteFlow implements TransactionalFlow {
|
|||
// If there's a pending transfer, the gaining client's autorenew billing
|
||||
// event and poll message will already have been deleted in
|
||||
// ResourceDeleteFlow since it's listed in serverApproveEntities.
|
||||
dnsQueue.addDomainRefreshTask(existingDomain.getFullyQualifiedDomainName());
|
||||
dnsQueue.addDomainRefreshTask(existingDomain.getDomainName());
|
||||
|
||||
entitiesToSave.add(newDomain, historyEntry);
|
||||
EntityChanges entityChanges = flowCustomLogic.beforeSave(
|
||||
|
@ -339,7 +339,7 @@ public final class DomainDeleteFlow implements TransactionalFlow {
|
|||
.setResponseData(
|
||||
ImmutableList.of(
|
||||
DomainPendingActionNotificationResponse.create(
|
||||
existingDomain.getFullyQualifiedDomainName(), true, trid, deletionTime)))
|
||||
existingDomain.getDomainName(), true, trid, deletionTime)))
|
||||
.setParent(historyEntry)
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -489,7 +489,7 @@ public class DomainFlowUtils {
|
|||
return new BillingEvent.Recurring.Builder()
|
||||
.setReason(Reason.RENEW)
|
||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId(domain.getCurrentSponsorClientId())
|
||||
.setEventTime(domain.getRegistrationExpirationTime());
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ public class DomainFlowUtils {
|
|||
*/
|
||||
public static PollMessage.Autorenew.Builder newAutorenewPollMessage(DomainBase domain) {
|
||||
return new PollMessage.Autorenew.Builder()
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId(domain.getCurrentSponsorClientId())
|
||||
.setEventTime(domain.getRegistrationExpirationTime())
|
||||
.setMsg("Domain was auto-renewed.");
|
||||
|
|
|
@ -107,7 +107,7 @@ public final class DomainInfoFlow implements Flow {
|
|||
// This is a policy decision that is left up to us by the rfcs.
|
||||
DomainInfoData.Builder infoBuilder =
|
||||
DomainInfoData.newBuilder()
|
||||
.setFullyQualifiedDomainName(domain.getFullyQualifiedDomainName())
|
||||
.setFullyQualifiedDomainName(domain.getDomainName())
|
||||
.setRepoId(domain.getRepoId())
|
||||
.setCurrentSponsorClientId(domain.getCurrentSponsorClientId())
|
||||
.setRegistrant(tm().load(domain.getRegistrant()).getContactId());
|
||||
|
@ -119,7 +119,7 @@ public final class DomainInfoFlow implements Flow {
|
|||
.setStatusValues(domain.getStatusValues())
|
||||
.setContacts(loadForeignKeyedDesignatedContacts(domain.getContacts()))
|
||||
.setNameservers(hostsRequest.requestDelegated()
|
||||
? domain.loadNameserverFullyQualifiedHostNames()
|
||||
? domain.loadNameserverHostNames()
|
||||
: null)
|
||||
.setSubordinateHosts(hostsRequest.requestSubordinate()
|
||||
? domain.getSubordinateHosts()
|
||||
|
|
|
@ -174,7 +174,7 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow {
|
|||
entitiesToSave.add(newDomain, historyEntry, autorenewEvent, autorenewPollMessage);
|
||||
ofy().save().entities(entitiesToSave.build());
|
||||
ofy().delete().key(existingDomain.getDeletePollMessage());
|
||||
dnsQueue.addDomainRefreshTask(existingDomain.getFullyQualifiedDomainName());
|
||||
dnsQueue.addDomainRefreshTask(existingDomain.getDomainName());
|
||||
return responseBuilder
|
||||
.setExtensions(createResponseExtensions(feesAndCredits, feeUpdate))
|
||||
.build();
|
||||
|
|
|
@ -109,7 +109,7 @@ public final class DomainTransferUtils {
|
|||
String gainingClientId,
|
||||
Optional<Money> transferCost,
|
||||
DateTime now) {
|
||||
String targetId = existingDomain.getFullyQualifiedDomainName();
|
||||
String targetId = existingDomain.getDomainName();
|
||||
// Create a TransferData for the server-approve case to use for the speculative poll messages.
|
||||
DomainTransferData serverApproveTransferData =
|
||||
new DomainTransferData.Builder()
|
||||
|
|
|
@ -265,7 +265,7 @@ public final class DomainUpdateFlow implements TransactionalFlow {
|
|||
validateDsData(newDomain.getDsData());
|
||||
validateNameserversCountForTld(
|
||||
newDomain.getTld(),
|
||||
InternetDomainName.from(newDomain.getFullyQualifiedDomainName()),
|
||||
InternetDomainName.from(newDomain.getDomainName()),
|
||||
newDomain.getNameservers().size());
|
||||
}
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ public final class HostCreateFlow implements TransactionalFlow {
|
|||
new HostResource.Builder()
|
||||
.setCreationClientId(clientId)
|
||||
.setPersistedCurrentSponsorClientId(clientId)
|
||||
.setFullyQualifiedHostName(targetId)
|
||||
.setHostName(targetId)
|
||||
.setInetAddresses(command.getInetAddresses())
|
||||
.setRepoId(createRepoId(ObjectifyService.allocateId(), roidSuffix))
|
||||
.setSuperordinateDomain(superordinateDomain.map(DomainBase::createVKey).orElse(null))
|
||||
|
|
|
@ -91,7 +91,7 @@ public final class HostInfoFlow implements Flow {
|
|||
}
|
||||
return responseBuilder
|
||||
.setResData(hostInfoDataBuilder
|
||||
.setFullyQualifiedHostName(host.getFullyQualifiedHostName())
|
||||
.setFullyQualifiedHostName(host.getHostName())
|
||||
.setRepoId(host.getRepoId())
|
||||
.setStatusValues(statusValues.build())
|
||||
.setInetAddresses(host.getInetAddresses())
|
||||
|
|
|
@ -176,7 +176,7 @@ public final class HostUpdateFlow implements TransactionalFlow {
|
|||
? newSuperordinateDomain.get().getCurrentSponsorClientId()
|
||||
: owningResource.getPersistedCurrentSponsorClientId();
|
||||
HostResource newHost = existingHost.asBuilder()
|
||||
.setFullyQualifiedHostName(newHostName)
|
||||
.setHostName(newHostName)
|
||||
.addStatusValues(add.getStatusValues())
|
||||
.removeStatusValues(remove.getStatusValues())
|
||||
.addInetAddresses(add.getInetAddresses())
|
||||
|
@ -263,14 +263,14 @@ public final class HostUpdateFlow implements TransactionalFlow {
|
|||
// Only update DNS for subordinate hosts. External hosts have no glue to write, so they
|
||||
// are only written as NS records from the referencing domain.
|
||||
if (existingHost.isSubordinate()) {
|
||||
dnsQueue.addHostRefreshTask(existingHost.getFullyQualifiedHostName());
|
||||
dnsQueue.addHostRefreshTask(existingHost.getHostName());
|
||||
}
|
||||
// In case of a rename, there are many updates we need to queue up.
|
||||
if (((Update) resourceCommand).getInnerChange().getFullyQualifiedHostName() != null) {
|
||||
// If the renamed host is also subordinate, then we must enqueue an update to write the new
|
||||
// glue.
|
||||
if (newHost.isSubordinate()) {
|
||||
dnsQueue.addHostRefreshTask(newHost.getFullyQualifiedHostName());
|
||||
dnsQueue.addHostRefreshTask(newHost.getHostName());
|
||||
}
|
||||
// We must also enqueue updates for all domains that use this host as their nameserver so
|
||||
// that their NS records can be updated to point at the new name.
|
||||
|
@ -286,8 +286,8 @@ public final class HostUpdateFlow implements TransactionalFlow {
|
|||
tm().saveNewOrUpdate(
|
||||
tm().load(existingHost.getSuperordinateDomain())
|
||||
.asBuilder()
|
||||
.removeSubordinateHost(existingHost.getFullyQualifiedHostName())
|
||||
.addSubordinateHost(newHost.getFullyQualifiedHostName())
|
||||
.removeSubordinateHost(existingHost.getHostName())
|
||||
.addSubordinateHost(newHost.getHostName())
|
||||
.build());
|
||||
return;
|
||||
}
|
||||
|
@ -295,14 +295,14 @@ public final class HostUpdateFlow implements TransactionalFlow {
|
|||
tm().saveNewOrUpdate(
|
||||
tm().load(existingHost.getSuperordinateDomain())
|
||||
.asBuilder()
|
||||
.removeSubordinateHost(existingHost.getFullyQualifiedHostName())
|
||||
.removeSubordinateHost(existingHost.getHostName())
|
||||
.build());
|
||||
}
|
||||
if (newHost.isSubordinate()) {
|
||||
tm().saveNewOrUpdate(
|
||||
tm().load(newHost.getSuperordinateDomain())
|
||||
.asBuilder()
|
||||
.addSubordinateHost(newHost.getFullyQualifiedHostName())
|
||||
.addSubordinateHost(newHost.getHostName())
|
||||
.build());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ import org.joda.time.Interval;
|
|||
@javax.persistence.Index(columnList = "creationTime"),
|
||||
@javax.persistence.Index(columnList = "currentSponsorRegistrarId"),
|
||||
@javax.persistence.Index(columnList = "deletionTime"),
|
||||
@javax.persistence.Index(columnList = "fullyQualifiedDomainName"),
|
||||
@javax.persistence.Index(columnList = "domainName"),
|
||||
@javax.persistence.Index(columnList = "tld")
|
||||
})
|
||||
@WithStringVKey
|
||||
|
@ -137,6 +137,8 @@ public class DomainBase extends EppResource
|
|||
*
|
||||
* @invariant fullyQualifiedDomainName == fullyQualifiedDomainName.toLowerCase(Locale.ENGLISH)
|
||||
*/
|
||||
// TODO(b/158858642): Rename this to domainName when we are off Datastore
|
||||
@Column(name = "domainName")
|
||||
@Index String fullyQualifiedDomainName;
|
||||
|
||||
/** The top level domain this is under, dernormalized from {@link #fullyQualifiedDomainName}. */
|
||||
|
@ -348,7 +350,7 @@ public class DomainBase extends EppResource
|
|||
return fullyQualifiedDomainName;
|
||||
}
|
||||
|
||||
public String getFullyQualifiedDomainName() {
|
||||
public String getDomainName() {
|
||||
return fullyQualifiedDomainName;
|
||||
}
|
||||
|
||||
|
@ -552,13 +554,13 @@ public class DomainBase extends EppResource
|
|||
}
|
||||
|
||||
/** Loads and returns the fully qualified host names of all linked nameservers. */
|
||||
public ImmutableSortedSet<String> loadNameserverFullyQualifiedHostNames() {
|
||||
public ImmutableSortedSet<String> loadNameserverHostNames() {
|
||||
return ofy()
|
||||
.load()
|
||||
.keys(getNameservers().stream().map(VKey::getOfyKey).collect(toImmutableSet()))
|
||||
.values()
|
||||
.stream()
|
||||
.map(HostResource::getFullyQualifiedHostName)
|
||||
.map(HostResource::getHostName)
|
||||
.collect(toImmutableSortedSet(Ordering.natural()));
|
||||
}
|
||||
|
||||
|
@ -679,7 +681,7 @@ public class DomainBase extends EppResource
|
|||
}
|
||||
|
||||
checkArgumentNotNull(
|
||||
emptyToNull(instance.fullyQualifiedDomainName), "Missing fullyQualifiedDomainName");
|
||||
emptyToNull(instance.fullyQualifiedDomainName), "Missing domainName");
|
||||
if (instance.getRegistrant() == null
|
||||
&& instance.allContacts.stream().anyMatch(IS_REGISTRANT)) {
|
||||
throw new IllegalArgumentException("registrant is null but is in allContacts");
|
||||
|
@ -689,11 +691,11 @@ public class DomainBase extends EppResource
|
|||
return super.build();
|
||||
}
|
||||
|
||||
public Builder setFullyQualifiedDomainName(String fullyQualifiedDomainName) {
|
||||
public Builder setDomainName(String domainName) {
|
||||
checkArgument(
|
||||
fullyQualifiedDomainName.equals(canonicalizeDomainName(fullyQualifiedDomainName)),
|
||||
domainName.equals(canonicalizeDomainName(domainName)),
|
||||
"Domain name must be in puny-coded, lower-case form");
|
||||
getInstance().fullyQualifiedDomainName = fullyQualifiedDomainName;
|
||||
getInstance().fullyQualifiedDomainName = domainName;
|
||||
return thisCastToDerived();
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ import java.util.Set;
|
|||
import javax.annotation.Nullable;
|
||||
import javax.persistence.Access;
|
||||
import javax.persistence.AccessType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embeddable;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import org.joda.time.DateTime;
|
||||
|
@ -64,7 +65,10 @@ public class HostBase extends EppResource {
|
|||
* from (creationTime, deletionTime) there can only be one host in Datastore with this name.
|
||||
* However, there can be many hosts with the same name and non-overlapping lifetimes.
|
||||
*/
|
||||
@Index String fullyQualifiedHostName;
|
||||
// TODO(b/158858642): Rename this to hostName when we are off Datastore
|
||||
@Index
|
||||
@Column(name = "hostName")
|
||||
String fullyQualifiedHostName;
|
||||
|
||||
/** IP Addresses for this host. Can be null if this is an external host. */
|
||||
@Index Set<InetAddress> inetAddresses;
|
||||
|
@ -91,7 +95,7 @@ public class HostBase extends EppResource {
|
|||
*/
|
||||
DateTime lastSuperordinateChange;
|
||||
|
||||
public String getFullyQualifiedHostName() {
|
||||
public String getHostName() {
|
||||
return fullyQualifiedHostName;
|
||||
}
|
||||
|
||||
|
@ -188,11 +192,11 @@ public class HostBase extends EppResource {
|
|||
return super.build();
|
||||
}
|
||||
|
||||
public B setFullyQualifiedHostName(String fullyQualifiedHostName) {
|
||||
public B setHostName(String hostName) {
|
||||
checkArgument(
|
||||
fullyQualifiedHostName.equals(canonicalizeDomainName(fullyQualifiedHostName)),
|
||||
hostName.equals(canonicalizeDomainName(hostName)),
|
||||
"Host name must be in puny-coded, lower-case form");
|
||||
getInstance().fullyQualifiedHostName = fullyQualifiedHostName;
|
||||
getInstance().fullyQualifiedHostName = hostName;
|
||||
return thisCastToDerived();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import javax.persistence.Entity;
|
|||
indexes = {
|
||||
@javax.persistence.Index(columnList = "creationTime"),
|
||||
@javax.persistence.Index(columnList = "historyRegistrarId"),
|
||||
@javax.persistence.Index(columnList = "fullyQualifiedHostName"),
|
||||
@javax.persistence.Index(columnList = "hostName"),
|
||||
@javax.persistence.Index(columnList = "historyType"),
|
||||
@javax.persistence.Index(columnList = "historyModificationTime")
|
||||
})
|
||||
|
|
|
@ -425,7 +425,7 @@ public class RdapDomainSearchAction extends RdapSearchActionBase {
|
|||
// order.
|
||||
ImmutableSortedSet.Builder<DomainBase> domainSetBuilder =
|
||||
ImmutableSortedSet.orderedBy(
|
||||
Comparator.comparing(DomainBase::getFullyQualifiedDomainName));
|
||||
Comparator.comparing(DomainBase::getDomainName));
|
||||
int numHostKeysSearched = 0;
|
||||
for (List<VKey<HostResource>> chunk : Iterables.partition(hostKeys, 30)) {
|
||||
numHostKeysSearched += chunk.size();
|
||||
|
@ -445,7 +445,7 @@ public class RdapDomainSearchAction extends RdapSearchActionBase {
|
|||
if (cursorString.isPresent()) {
|
||||
stream =
|
||||
stream.filter(
|
||||
domain -> (domain.getFullyQualifiedDomainName().compareTo(cursorString.get()) > 0));
|
||||
domain -> (domain.getDomainName().compareTo(cursorString.get()) > 0));
|
||||
}
|
||||
stream.forEach(domainSetBuilder::add);
|
||||
}
|
||||
|
@ -495,7 +495,7 @@ public class RdapDomainSearchAction extends RdapSearchActionBase {
|
|||
.setIncompletenessWarningType(incompletenessWarningType);
|
||||
Optional<String> newCursor = Optional.empty();
|
||||
for (DomainBase domain : Iterables.limit(domains, rdapResultSetMaxSize)) {
|
||||
newCursor = Optional.of(domain.getFullyQualifiedDomainName());
|
||||
newCursor = Optional.of(domain.getDomainName());
|
||||
builder
|
||||
.domainSearchResultsBuilder()
|
||||
.add(rdapJsonFormatter.createRdapDomain(domain, outputDataType));
|
||||
|
|
|
@ -221,7 +221,7 @@ public class RdapJsonFormatter {
|
|||
|
||||
/** Sets the ordering for hosts; just use the fully qualified host name. */
|
||||
private static final Ordering<HostResource> HOST_RESOURCE_ORDERING =
|
||||
Ordering.natural().onResultOf(HostResource::getFullyQualifiedHostName);
|
||||
Ordering.natural().onResultOf(HostResource::getHostName);
|
||||
|
||||
/** Sets the ordering for designated contacts; order them in a fixed order by contact type. */
|
||||
private static final Ordering<DesignatedContact> DESIGNATED_CONTACT_ORDERING =
|
||||
|
@ -266,12 +266,12 @@ public class RdapJsonFormatter {
|
|||
*/
|
||||
RdapDomain createRdapDomain(DomainBase domainBase, OutputDataType outputDataType) {
|
||||
RdapDomain.Builder builder = RdapDomain.builder();
|
||||
builder.linksBuilder().add(makeSelfLink("domain", domainBase.getFullyQualifiedDomainName()));
|
||||
builder.linksBuilder().add(makeSelfLink("domain", domainBase.getDomainName()));
|
||||
if (outputDataType != OutputDataType.FULL) {
|
||||
builder.remarksBuilder().add(RdapIcannStandardInformation.SUMMARY_DATA_REMARK);
|
||||
}
|
||||
// RDAP Response Profile 15feb19 section 2.1 discusses the domain name.
|
||||
builder.setLdhName(domainBase.getFullyQualifiedDomainName());
|
||||
builder.setLdhName(domainBase.getDomainName());
|
||||
// RDAP Response Profile 15feb19 section 2.2:
|
||||
// The domain handle MUST be the ROID
|
||||
builder.setHandle(domainBase.getRepoId());
|
||||
|
@ -315,7 +315,7 @@ public class RdapJsonFormatter {
|
|||
for (String registrarRdapBase : registrar.getRdapBaseUrls()) {
|
||||
String href =
|
||||
makeServerRelativeUrl(
|
||||
registrarRdapBase, "domain", domainBase.getFullyQualifiedDomainName());
|
||||
registrarRdapBase, "domain", domainBase.getDomainName());
|
||||
builder
|
||||
.linksBuilder()
|
||||
.add(
|
||||
|
@ -336,7 +336,7 @@ public class RdapJsonFormatter {
|
|||
if (status.isEmpty()) {
|
||||
logger.atWarning().log(
|
||||
"Domain %s (ROID %s) doesn't have any status",
|
||||
domainBase.getFullyQualifiedDomainName(), domainBase.getRepoId());
|
||||
domainBase.getDomainName(), domainBase.getRepoId());
|
||||
}
|
||||
// RDAP Response Profile 2.6.3, must have a notice about statuses. That is in {@link
|
||||
// RdapIcannStandardInformation#domainBoilerplateNotices}
|
||||
|
@ -411,13 +411,13 @@ public class RdapJsonFormatter {
|
|||
RdapNameserver.Builder builder = RdapNameserver.builder();
|
||||
builder
|
||||
.linksBuilder()
|
||||
.add(makeSelfLink("nameserver", hostResource.getFullyQualifiedHostName()));
|
||||
.add(makeSelfLink("nameserver", hostResource.getHostName()));
|
||||
if (outputDataType != OutputDataType.FULL) {
|
||||
builder.remarksBuilder().add(RdapIcannStandardInformation.SUMMARY_DATA_REMARK);
|
||||
}
|
||||
|
||||
// We need the ldhName: RDAP Response Profile 2.9.1, 4.1
|
||||
builder.setLdhName(hostResource.getFullyQualifiedHostName());
|
||||
builder.setLdhName(hostResource.getHostName());
|
||||
// Handle is optional, but if given it MUST be the ROID.
|
||||
// We will set it always as it's important as a "self link"
|
||||
builder.setHandle(hostResource.getRepoId());
|
||||
|
|
|
@ -271,7 +271,7 @@ public class RdapNameserverSearchAction extends RdapSearchActionBase {
|
|||
newCursor =
|
||||
Optional.of(
|
||||
(cursorType == CursorType.NAME)
|
||||
? host.getFullyQualifiedHostName()
|
||||
? host.getHostName()
|
||||
: host.getRepoId());
|
||||
builder
|
||||
.nameserverSearchResultsBuilder()
|
||||
|
|
|
@ -62,7 +62,7 @@ final class DomainBaseToXjcConverter {
|
|||
|
||||
// o A <name> element that contains the fully qualified name of the
|
||||
// domain name object.
|
||||
bean.setName(model.getFullyQualifiedDomainName());
|
||||
bean.setName(model.getDomainName());
|
||||
|
||||
// o A <roid> element that contains the repository object identifier
|
||||
// assigned to the domain name object when it was created.
|
||||
|
@ -70,7 +70,7 @@ final class DomainBaseToXjcConverter {
|
|||
|
||||
// o An OPTIONAL <uName> element that contains the name of the domain
|
||||
// name in Unicode character set. It MUST be provided if available.
|
||||
bean.setUName(Idn.toUnicode(model.getFullyQualifiedDomainName()));
|
||||
bean.setUName(Idn.toUnicode(model.getDomainName()));
|
||||
|
||||
// o An OPTIONAL <idnTableId> element that references the IDN Table
|
||||
// used for the IDN. This corresponds to the "id" attribute of the
|
||||
|
@ -143,7 +143,7 @@ final class DomainBaseToXjcConverter {
|
|||
// it is that with host attributes, you inline the nameserver data
|
||||
// on each domain; with host objects, you normalize the nameserver
|
||||
// data to a separate EPP object.
|
||||
ImmutableSet<String> linkedNameserverHostNames = model.loadNameserverFullyQualifiedHostNames();
|
||||
ImmutableSet<String> linkedNameserverHostNames = model.loadNameserverHostNames();
|
||||
if (!linkedNameserverHostNames.isEmpty()) {
|
||||
XjcDomainNsType nameservers = new XjcDomainNsType();
|
||||
for (String hostName : linkedNameserverHostNames) {
|
||||
|
@ -154,7 +154,7 @@ final class DomainBaseToXjcConverter {
|
|||
|
||||
switch (mode) {
|
||||
case FULL:
|
||||
String domainName = model.getFullyQualifiedDomainName();
|
||||
String domainName = model.getDomainName();
|
||||
|
||||
// o Zero or more OPTIONAL <rgpStatus> element to represent
|
||||
// "pendingDelete" sub-statuses, including "redemptionPeriod",
|
||||
|
|
|
@ -68,7 +68,7 @@ final class HostResourceToXjcConverter {
|
|||
private static XjcRdeHost convertHostCommon(
|
||||
HostResource model, String clientId, DateTime lastTransferTime) {
|
||||
XjcRdeHost bean = new XjcRdeHost();
|
||||
bean.setName(model.getFullyQualifiedHostName());
|
||||
bean.setName(model.getHostName());
|
||||
bean.setRoid(model.getRepoId());
|
||||
bean.setCrDate(model.getCreationTime());
|
||||
bean.setUpDate(model.getLastEppUpdateTime());
|
||||
|
|
|
@ -69,7 +69,7 @@ public final class LordnTaskUtils {
|
|||
return Joiner.on(',')
|
||||
.join(
|
||||
domain.getRepoId(),
|
||||
domain.getFullyQualifiedDomainName(),
|
||||
domain.getDomainName(),
|
||||
domain.getSmdId(),
|
||||
getIanaIdentifier(domain.getCreationClientId()),
|
||||
transactionTime); // Used as creation time.
|
||||
|
@ -80,7 +80,7 @@ public final class LordnTaskUtils {
|
|||
return Joiner.on(',')
|
||||
.join(
|
||||
domain.getRepoId(),
|
||||
domain.getFullyQualifiedDomainName(),
|
||||
domain.getDomainName(),
|
||||
domain.getLaunchNotice().getNoticeId().getTcnId(),
|
||||
getIanaIdentifier(domain.getCreationClientId()),
|
||||
transactionTime, // Used as creation time.
|
||||
|
|
|
@ -293,14 +293,14 @@ public final class DomainLockUtils {
|
|||
checkArgument(
|
||||
!domainBase.getStatusValues().containsAll(REGISTRY_LOCK_STATUSES),
|
||||
"Domain %s is already locked",
|
||||
domainBase.getFullyQualifiedDomainName());
|
||||
domainBase.getDomainName());
|
||||
}
|
||||
|
||||
private static void verifyDomainLocked(DomainBase domainBase) {
|
||||
checkArgument(
|
||||
!Sets.intersection(domainBase.getStatusValues(), REGISTRY_LOCK_STATUSES).isEmpty(),
|
||||
"Domain %s is already unlocked",
|
||||
domainBase.getFullyQualifiedDomainName());
|
||||
domainBase.getDomainName());
|
||||
}
|
||||
|
||||
private static DomainBase getDomain(String domainName, DateTime now) {
|
||||
|
|
|
@ -95,7 +95,7 @@ final class GenerateDnsReportCommand implements CommandWithRemoteApi {
|
|||
|
||||
private void write(DomainBase domain) {
|
||||
ImmutableList<String> nameservers =
|
||||
ImmutableList.sortedCopyOf(domain.loadNameserverFullyQualifiedHostNames());
|
||||
ImmutableList.sortedCopyOf(domain.loadNameserverHostNames());
|
||||
ImmutableList<Map<String, ?>> dsData =
|
||||
domain
|
||||
.getDsData()
|
||||
|
@ -109,7 +109,7 @@ final class GenerateDnsReportCommand implements CommandWithRemoteApi {
|
|||
"digest", base16().encode(dsData1.getDigest())))
|
||||
.collect(toImmutableList());
|
||||
ImmutableMap.Builder<String, Object> mapBuilder = new ImmutableMap.Builder<>();
|
||||
mapBuilder.put("domain", domain.getFullyQualifiedDomainName());
|
||||
mapBuilder.put("domain", domain.getDomainName());
|
||||
if (!nameservers.isEmpty()) {
|
||||
mapBuilder.put("nameservers", nameservers);
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ final class GenerateDnsReportCommand implements CommandWithRemoteApi {
|
|||
.sorted()
|
||||
.collect(toImmutableList());
|
||||
ImmutableMap<String, ?> map = ImmutableMap.of(
|
||||
"host", nameserver.getFullyQualifiedHostName(),
|
||||
"host", nameserver.getHostName(),
|
||||
"ips", ipAddresses);
|
||||
writeJson(map);
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ final class GenerateLordnCommand implements CommandWithRemoteApi {
|
|||
claimsCsv.add(LordnTaskUtils.getCsvLineForClaimsDomain(domain, domain.getCreationTime()));
|
||||
status = "C";
|
||||
}
|
||||
System.out.printf("%s[%s] ", domain.getFullyQualifiedDomainName(), status);
|
||||
System.out.printf("%s[%s] ", domain.getDomainName(), status);
|
||||
}
|
||||
ImmutableList<String> claimsRows = claimsCsv.build();
|
||||
ImmutableList<String> claimsAll =
|
||||
|
|
|
@ -65,7 +65,7 @@ final class GetAllocationTokenCommand implements CommandWithRemoteApi {
|
|||
} else {
|
||||
System.out.printf(
|
||||
"Token %s was redeemed to create domain %s at %s.\n",
|
||||
token, domain.getFullyQualifiedDomainName(), domain.getCreationTime());
|
||||
token, domain.getDomainName(), domain.getCreationTime());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -73,7 +73,7 @@ final class RenewDomainCommand extends MutatingEppToolCommand {
|
|||
addSoyRecord(
|
||||
isNullOrEmpty(clientId) ? domain.getCurrentSponsorClientId() : clientId,
|
||||
new SoyMapData(
|
||||
"domainName", domain.getFullyQualifiedDomainName(),
|
||||
"domainName", domain.getDomainName(),
|
||||
"expirationDate", domain.getRegistrationExpirationTime().toString(DATE_FORMATTER),
|
||||
"period", String.valueOf(period)));
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ final class UpdateDomainCommand extends CreateOrUpdateDomainCommand {
|
|||
domain);
|
||||
if (!nameservers.isEmpty()) {
|
||||
ImmutableSortedSet<String> existingNameservers =
|
||||
domainBase.loadNameserverFullyQualifiedHostNames();
|
||||
domainBase.loadNameserverHostNames();
|
||||
populateAddRemoveLists(
|
||||
ImmutableSet.copyOf(nameservers),
|
||||
existingNameservers,
|
||||
|
|
|
@ -84,7 +84,7 @@ public class BackfillRegistryLocksCommand extends ConfirmingCommand
|
|||
jpaTm().transact(() -> getLockedDomainsWithoutLocks(jpaTm().getTransactionTime()));
|
||||
ImmutableList<String> lockedDomainNames =
|
||||
lockedDomains.stream()
|
||||
.map(DomainBase::getFullyQualifiedDomainName)
|
||||
.map(DomainBase::getDomainName)
|
||||
.collect(toImmutableList());
|
||||
return String.format(
|
||||
"Locked domains for which there does not exist a RegistryLock object: %s",
|
||||
|
@ -104,7 +104,7 @@ public class BackfillRegistryLocksCommand extends ConfirmingCommand
|
|||
.isSuperuser(true)
|
||||
.setRegistrarId(registryAdminClientId)
|
||||
.setRepoId(domainBase.getRepoId())
|
||||
.setDomainName(domainBase.getFullyQualifiedDomainName())
|
||||
.setDomainName(domainBase.getDomainName())
|
||||
.setLockCompletionTimestamp(
|
||||
getLockCompletionTimestamp(domainBase, jpaTm().getTransactionTime()))
|
||||
.setVerificationCode(
|
||||
|
@ -113,7 +113,7 @@ public class BackfillRegistryLocksCommand extends ConfirmingCommand
|
|||
} catch (Throwable t) {
|
||||
logger.atSevere().withCause(t).log(
|
||||
"Error when creating lock object for domain %s.",
|
||||
domainBase.getFullyQualifiedDomainName());
|
||||
domainBase.getDomainName());
|
||||
failedDomainsBuilder.add(domainBase);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ public class RemoveIpAddressCommand extends MutatingEppToolCommand {
|
|||
setSoyTemplate(
|
||||
RemoveIpAddressSoyInfo.getInstance(), RemoveIpAddressSoyInfo.REMOVE_IP_ADDRESS);
|
||||
addSoyRecord(registrarId, new SoyMapData(
|
||||
"name", host.getFullyQualifiedHostName(),
|
||||
"name", host.getHostName(),
|
||||
"ipAddresses", ipAddresses,
|
||||
"requestedByRegistrar", registrarId));
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@ public class GenerateZoneFilesAction implements Runnable, JsonActionRunner.JsonA
|
|||
for (HostResource unprojectedHost : tm().load(domain.getNameservers())) {
|
||||
HostResource host = loadAtPointInTime(unprojectedHost, exportTime).now();
|
||||
// A null means the host was deleted (or not created) at this time.
|
||||
if ((host != null) && subordinateHosts.contains(host.getFullyQualifiedHostName())) {
|
||||
if ((host != null) && subordinateHosts.contains(host.getHostName())) {
|
||||
String stanza = hostStanza(host, dnsDefaultATtl, domain.getTld());
|
||||
if (!stanza.isEmpty()) {
|
||||
emit(domain.getTld(), stanza);
|
||||
|
@ -282,14 +282,14 @@ public class GenerateZoneFilesAction implements Runnable, JsonActionRunner.JsonA
|
|||
Duration dnsDefaultNsTtl,
|
||||
Duration dnsDefaultDsTtl) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
String domainLabel = stripTld(domain.getFullyQualifiedDomainName(), domain.getTld());
|
||||
String domainLabel = stripTld(domain.getDomainName(), domain.getTld());
|
||||
for (HostResource nameserver : tm().load(domain.getNameservers())) {
|
||||
result.append(String.format(
|
||||
NS_FORMAT,
|
||||
domainLabel,
|
||||
dnsDefaultNsTtl.getStandardSeconds(),
|
||||
// Load the nameservers at the export time in case they've been renamed or deleted.
|
||||
loadAtPointInTime(nameserver, exportTime).now().getFullyQualifiedHostName()));
|
||||
loadAtPointInTime(nameserver, exportTime).now().getHostName()));
|
||||
}
|
||||
for (DelegationSignerData dsData : domain.getDsData()) {
|
||||
result.append(
|
||||
|
@ -321,7 +321,7 @@ public class GenerateZoneFilesAction implements Runnable, JsonActionRunner.JsonA
|
|||
String rrSetClass = (addr instanceof Inet4Address) ? "A" : "AAAA";
|
||||
result.append(String.format(
|
||||
A_FORMAT,
|
||||
stripTld(host.getFullyQualifiedHostName(), tld),
|
||||
stripTld(host.getHostName(), tld),
|
||||
dnsDefaultATtl.getStandardSeconds(),
|
||||
rrSetClass,
|
||||
addr.getHostAddress()));
|
||||
|
|
|
@ -53,6 +53,6 @@ public final class ListHostsAction extends ListObjectsAction<HostResource> {
|
|||
final DateTime now = clock.nowUtc();
|
||||
return Streams.stream(ofy().load().type(HostResource.class))
|
||||
.filter(host -> EppResourceUtils.isActive(host, now))
|
||||
.collect(toImmutableSortedSet(comparing(HostResource::getFullyQualifiedHostName)));
|
||||
.collect(toImmutableSortedSet(comparing(HostResource::getHostName)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ public class RefreshDnsForAllDomainsAction implements Runnable {
|
|||
|
||||
@Override
|
||||
public void map(final DomainBase domain) {
|
||||
String domainName = domain.getFullyQualifiedDomainName();
|
||||
String domainName = domain.getDomainName();
|
||||
if (tlds.contains(domain.getTld())) {
|
||||
if (isActive(domain, DateTime.now(DateTimeZone.UTC))) {
|
||||
try {
|
||||
|
|
|
@ -65,7 +65,7 @@ public final class RegistryLockGetAction implements JsonGetAction {
|
|||
private static final String LOCK_ENABLED_FOR_CONTACT_PARAM = "lockEnabledForContact";
|
||||
private static final String EMAIL_PARAM = "email";
|
||||
private static final String LOCKS_PARAM = "locks";
|
||||
private static final String FULLY_QUALIFIED_DOMAIN_NAME_PARAM = "fullyQualifiedDomainName";
|
||||
private static final String DOMAIN_NAME_PARAM = "domainName";
|
||||
private static final String LOCKED_TIME_PARAM = "lockedTime";
|
||||
private static final String LOCKED_BY_PARAM = "lockedBy";
|
||||
private static final String IS_LOCK_PENDING_PARAM = "isLockPending";
|
||||
|
@ -190,7 +190,7 @@ public final class RegistryLockGetAction implements JsonGetAction {
|
|||
private ImmutableMap<String, ?> lockToMap(RegistryLock lock, boolean isAdmin) {
|
||||
DateTime now = jpaTm().getTransactionTime();
|
||||
return new ImmutableMap.Builder<String, Object>()
|
||||
.put(FULLY_QUALIFIED_DOMAIN_NAME_PARAM, lock.getDomainName())
|
||||
.put(DOMAIN_NAME_PARAM, lock.getDomainName())
|
||||
.put(
|
||||
LOCKED_TIME_PARAM, lock.getLockCompletionTimestamp().map(DateTime::toString).orElse(""))
|
||||
.put(LOCKED_BY_PARAM, lock.isSuperuser() ? "admin" : lock.getRegistrarPocId())
|
||||
|
|
|
@ -120,9 +120,7 @@ public class RegistryLockPostAction implements Runnable, JsonActionRunner.JsonAc
|
|||
!Strings.isNullOrEmpty(postInput.clientId),
|
||||
"Missing key for client: %s",
|
||||
PARAM_CLIENT_ID);
|
||||
checkArgument(
|
||||
!Strings.isNullOrEmpty(postInput.fullyQualifiedDomainName),
|
||||
"Missing key for fullyQualifiedDomainName");
|
||||
checkArgument(!Strings.isNullOrEmpty(postInput.domainName), "Missing key for domainName");
|
||||
checkNotNull(postInput.isLock, "Missing key for isLock");
|
||||
UserAuthInfo userAuthInfo =
|
||||
authResult
|
||||
|
@ -136,12 +134,12 @@ public class RegistryLockPostAction implements Runnable, JsonActionRunner.JsonAc
|
|||
RegistryLock registryLock =
|
||||
postInput.isLock
|
||||
? domainLockUtils.saveNewRegistryLockRequest(
|
||||
postInput.fullyQualifiedDomainName,
|
||||
postInput.domainName,
|
||||
postInput.clientId,
|
||||
userEmail,
|
||||
registrarAccessor.isAdmin())
|
||||
: domainLockUtils.saveNewRegistryUnlockRequest(
|
||||
postInput.fullyQualifiedDomainName,
|
||||
postInput.domainName,
|
||||
postInput.clientId,
|
||||
registrarAccessor.isAdmin(),
|
||||
Optional.ofNullable(postInput.relockDurationMillis).map(Duration::new));
|
||||
|
@ -218,7 +216,7 @@ public class RegistryLockPostAction implements Runnable, JsonActionRunner.JsonAc
|
|||
/** Value class that represents the expected input body from the UI request. */
|
||||
private static class RegistryLockPostInput {
|
||||
private String clientId;
|
||||
private String fullyQualifiedDomainName;
|
||||
private String domainName;
|
||||
private Boolean isLock;
|
||||
private String password;
|
||||
private Long relockDurationMillis;
|
||||
|
|
|
@ -73,7 +73,7 @@ public final class RegistryLockVerifyAction extends HtmlAction {
|
|||
}
|
||||
data.put("isLock", isLock);
|
||||
data.put("success", true);
|
||||
data.put("fullyQualifiedDomainName", resultLock.getDomainName());
|
||||
data.put("domainName", resultLock.getDomainName());
|
||||
} catch (Throwable t) {
|
||||
logger.atWarning().withCause(t).log(
|
||||
"Error when verifying verification code %s", lockVerificationCode);
|
||||
|
|
|
@ -90,7 +90,7 @@ final class DomainWhoisResponse extends WhoisResponseImpl {
|
|||
new DomainEmitter()
|
||||
.emitField(
|
||||
"Domain Name",
|
||||
maybeFormatHostname(domain.getFullyQualifiedDomainName(), preferUnicode))
|
||||
maybeFormatHostname(domain.getDomainName(), preferUnicode))
|
||||
.emitField("Registry Domain ID", domain.getRepoId())
|
||||
.emitField("Registrar WHOIS Server", registrar.getWhoisServer())
|
||||
.emitField("Registrar URL", registrar.getUrl())
|
||||
|
@ -115,7 +115,7 @@ final class DomainWhoisResponse extends WhoisResponseImpl {
|
|||
.emitContact("Billing", getContactReference(Type.BILLING), preferUnicode)
|
||||
.emitSet(
|
||||
"Name Server",
|
||||
domain.loadNameserverFullyQualifiedHostNames(),
|
||||
domain.loadNameserverHostNames(),
|
||||
hostName -> maybeFormatHostname(hostName, preferUnicode))
|
||||
.emitField(
|
||||
"DNSSEC", isNullOrEmpty(domain.getDsData()) ? "unsigned" : "signedDelegation")
|
||||
|
@ -160,7 +160,7 @@ final class DomainWhoisResponse extends WhoisResponseImpl {
|
|||
if (contactResource == null) {
|
||||
logger.atSevere().log(
|
||||
"(BUG) Broken reference found from domain %s to contact %s",
|
||||
domain.getFullyQualifiedDomainName(), contact);
|
||||
domain.getDomainName(), contact);
|
||||
return this;
|
||||
}
|
||||
PostalInfo postalInfo =
|
||||
|
|
|
@ -52,7 +52,7 @@ final class NameserverLookupByIpCommand implements WhoisCommand {
|
|||
.filter(
|
||||
host ->
|
||||
Registries.findTldForName(
|
||||
InternetDomainName.from(host.getFullyQualifiedHostName()))
|
||||
InternetDomainName.from(host.getHostName()))
|
||||
.isPresent())
|
||||
.collect(toImmutableList());
|
||||
if (hosts.isEmpty()) {
|
||||
|
|
|
@ -57,7 +57,7 @@ final class NameserverWhoisResponse extends WhoisResponseImpl {
|
|||
checkState(registrar.isPresent(), "Could not load registrar %s", clientId);
|
||||
emitter
|
||||
.emitField(
|
||||
"Server Name", maybeFormatHostname(host.getFullyQualifiedHostName(), preferUnicode))
|
||||
"Server Name", maybeFormatHostname(host.getHostName(), preferUnicode))
|
||||
.emitSet("IP Address", host.getInetAddresses(), InetAddresses::toAddrString)
|
||||
.emitField("Registrar", registrar.get().getRegistrarName())
|
||||
.emitField("Registrar WHOIS Server", registrar.get().getWhoisServer())
|
||||
|
|
|
@ -34,7 +34,7 @@ registry.json.locks = {};
|
|||
|
||||
/**
|
||||
* @typedef {{
|
||||
* fullyQualifiedDomainName: string,
|
||||
* domainName: string,
|
||||
* lockedTime: string,
|
||||
* lockedBy: string,
|
||||
* userCanUnlock: boolean,
|
||||
|
|
|
@ -173,7 +173,7 @@ registry.registrar.RegistryLock.prototype.lockOrUnlockDomain_ = function(isLock,
|
|||
'POST',
|
||||
goog.json.serialize({
|
||||
'clientId': this.clientId,
|
||||
'fullyQualifiedDomainName': domain,
|
||||
'domainName': domain,
|
||||
'isLock': isLock,
|
||||
'password': password,
|
||||
'relockDurationMillis': relockDuration
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
{template .locksContent}
|
||||
{@param email: string}
|
||||
{@param locks: list<[fullyQualifiedDomainName: string, lockedTime: string, lockedBy: string,
|
||||
{@param locks: list<[domainName: string, lockedTime: string, lockedBy: string,
|
||||
userCanUnlock: bool, isLockPending: bool, isUnlockPending: bool]>}
|
||||
{@param lockEnabledForContact: bool}
|
||||
|
||||
|
@ -72,7 +72,7 @@
|
|||
|
||||
/** Table that displays existing locks for this registrar. */
|
||||
{template .existingLocksTable}
|
||||
{@param locks: list<[fullyQualifiedDomainName: string, lockedTime: string, lockedBy: string,
|
||||
{@param locks: list<[domainName: string, lockedTime: string, lockedBy: string,
|
||||
userCanUnlock: bool, isLockPending: bool, isUnlockPending: bool]>}
|
||||
{@param lockEnabledForContact: bool}
|
||||
<h2>Existing locks</h2>
|
||||
|
@ -86,7 +86,7 @@
|
|||
</tr>
|
||||
{for $lock in $locks}
|
||||
<tr class="{css('registry-locks-table-row')}">
|
||||
<td>{$lock.fullyQualifiedDomainName}
|
||||
<td>{$lock.domainName}
|
||||
{if $lock.isLockPending}<i> (pending)</i>
|
||||
{elseif $lock.isUnlockPending}<i> (unlock pending)</i>
|
||||
{/if}</td>
|
||||
|
@ -94,7 +94,7 @@
|
|||
<td>{$lock.lockedBy}</td>
|
||||
<td>
|
||||
{if not $lock.isLockPending and not $lock.isUnlockPending}
|
||||
<button id="button-unlock-{$lock.fullyQualifiedDomainName}"
|
||||
<button id="button-unlock-{$lock.domainName}"
|
||||
{if $lockEnabledForContact and $lock.userCanUnlock}
|
||||
class="domain-unlock-button {css('kd-button')} {css('kd-button-submit')}"
|
||||
{else}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
{@param success: bool}
|
||||
{@param? errorMessage: string}
|
||||
{@param? isLock: bool}
|
||||
{@param? fullyQualifiedDomainName: string}
|
||||
{@param? domainName: string}
|
||||
{call registry.soy.console.header}
|
||||
{param app: 'registrar' /}
|
||||
{param subtitle: 'Verify Registry Lock' /}
|
||||
|
@ -63,9 +63,9 @@
|
|||
*/
|
||||
{template .success}
|
||||
{@param? isLock: bool}
|
||||
{@param? fullyQualifiedDomainName: string}
|
||||
{@param? domainName: string}
|
||||
<h3>
|
||||
Success: {if $isLock}lock{else}unlock{/if} has been applied to {$fullyQualifiedDomainName}
|
||||
Success: {if $isLock}lock{else}unlock{/if} has been applied to {$domainName}
|
||||
</h3>
|
||||
{/template}
|
||||
|
||||
|
|
|
@ -910,7 +910,7 @@ public class DeleteContactsAndHostsActionTest
|
|||
String expectedResourceName;
|
||||
if (resource instanceof HostResource) {
|
||||
assertThat(responseData).isInstanceOf(HostPendingActionNotificationResponse.class);
|
||||
expectedResourceName = ((HostResource) resource).getFullyQualifiedHostName();
|
||||
expectedResourceName = ((HostResource) resource).getHostName();
|
||||
} else {
|
||||
assertThat(responseData).isInstanceOf(ContactPendingActionNotificationResponse.class);
|
||||
expectedResourceName = ((ContactResource) resource).getContactId();
|
||||
|
|
|
@ -98,7 +98,7 @@ public class ExpandRecurringBillingEventsActionTest
|
|||
.setId(2L)
|
||||
.setReason(Reason.RENEW)
|
||||
.setRecurrenceEndTime(END_OF_TIME)
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ public class ExpandRecurringBillingEventsActionTest
|
|||
.setReason(Reason.RENEW)
|
||||
.setSyntheticCreationTime(beginningOfTest)
|
||||
.setCancellationMatchingBillingEvent(recurring.createVKey())
|
||||
.setTargetId(domain.getFullyQualifiedDomainName());
|
||||
.setTargetId(domain.getDomainName());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -187,7 +187,7 @@ public class ExpandRecurringBillingEventsActionTest
|
|||
.setId(2L)
|
||||
.setReason(Reason.RENEW)
|
||||
.setRecurrenceEndTime(deletionTime)
|
||||
.setTargetId(deletedDomain.getFullyQualifiedDomainName())
|
||||
.setTargetId(deletedDomain.getDomainName())
|
||||
.build());
|
||||
action.cursorTimeParam = Optional.of(START_OF_TIME);
|
||||
runMapreduce();
|
||||
|
@ -197,7 +197,7 @@ public class ExpandRecurringBillingEventsActionTest
|
|||
true);
|
||||
BillingEvent.OneTime expected = defaultOneTimeBuilder()
|
||||
.setParent(persistedEntry)
|
||||
.setTargetId(deletedDomain.getFullyQualifiedDomainName())
|
||||
.setTargetId(deletedDomain.getDomainName())
|
||||
.build();
|
||||
assertBillingEventsForResource(deletedDomain, expected, recurring);
|
||||
assertCursorAt(beginningOfTest);
|
||||
|
|
|
@ -141,7 +141,7 @@ public class BackupTestStoreTest {
|
|||
loadPropertyFromExportedEntities(
|
||||
new File(exportFolder, "/all_namespaces/kind_DomainBase/input-0"),
|
||||
DomainBase.class,
|
||||
DomainBase::getFullyQualifiedDomainName);
|
||||
DomainBase::getDomainName);
|
||||
assertThat(domainStrings).containsExactly("domain1.tld1");
|
||||
ImmutableList<String> contactIds =
|
||||
loadPropertyFromExportedEntities(
|
||||
|
|
|
@ -104,7 +104,7 @@ public class EppCommitLogsTest extends ShardableTestCase {
|
|||
ofy().clearSessionCache();
|
||||
Key<DomainBase> key = Key.create(ofy().load().type(DomainBase.class).first().now());
|
||||
DomainBase domainAfterCreate = ofy().load().key(key).now();
|
||||
assertThat(domainAfterCreate.getFullyQualifiedDomainName()).isEqualTo("example.tld");
|
||||
assertThat(domainAfterCreate.getDomainName()).isEqualTo("example.tld");
|
||||
|
||||
clock.advanceBy(standardDays(2));
|
||||
DateTime timeAtFirstUpdate = clock.nowUtc();
|
||||
|
|
|
@ -280,7 +280,7 @@ public class EppTestCase extends ShardableTestCase {
|
|||
DomainBase domain, DateTime createTime) {
|
||||
return new BillingEvent.OneTime.Builder()
|
||||
.setReason(Reason.CREATE)
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId(domain.getCurrentSponsorClientId())
|
||||
.setCost(Money.parse("USD 26.00"))
|
||||
.setPeriodYears(2)
|
||||
|
@ -295,7 +295,7 @@ public class EppTestCase extends ShardableTestCase {
|
|||
DomainBase domain, DateTime renewTime) {
|
||||
return new BillingEvent.OneTime.Builder()
|
||||
.setReason(Reason.RENEW)
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId(domain.getCurrentSponsorClientId())
|
||||
.setCost(Money.parse("USD 33.00"))
|
||||
.setPeriodYears(3)
|
||||
|
@ -325,7 +325,7 @@ public class EppTestCase extends ShardableTestCase {
|
|||
return new BillingEvent.Recurring.Builder()
|
||||
.setReason(Reason.RENEW)
|
||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId(domain.getCurrentSponsorClientId())
|
||||
.setEventTime(eventTime)
|
||||
.setRecurrenceEndTime(endTime)
|
||||
|
@ -337,7 +337,7 @@ public class EppTestCase extends ShardableTestCase {
|
|||
protected static BillingEvent.Cancellation makeCancellationBillingEventForCreate(
|
||||
DomainBase domain, OneTime billingEventToCancel, DateTime createTime, DateTime deleteTime) {
|
||||
return new BillingEvent.Cancellation.Builder()
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId(domain.getCurrentSponsorClientId())
|
||||
.setEventTime(deleteTime)
|
||||
.setOneTimeEventKey(
|
||||
|
@ -352,7 +352,7 @@ public class EppTestCase extends ShardableTestCase {
|
|||
protected static BillingEvent.Cancellation makeCancellationBillingEventForRenew(
|
||||
DomainBase domain, OneTime billingEventToCancel, DateTime renewTime, DateTime deleteTime) {
|
||||
return new BillingEvent.Cancellation.Builder()
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId(domain.getCurrentSponsorClientId())
|
||||
.setEventTime(deleteTime)
|
||||
.setOneTimeEventKey(
|
||||
|
|
|
@ -31,7 +31,7 @@ public class TestDomainCreateFlowCustomLogic extends DomainCreateFlowCustomLogic
|
|||
|
||||
@Override
|
||||
public EntityChanges beforeSave(BeforeSaveParameters parameters) {
|
||||
if (parameters.newDomain().getFullyQualifiedDomainName().startsWith("custom-logic-test")) {
|
||||
if (parameters.newDomain().getDomainName().startsWith("custom-logic-test")) {
|
||||
PollMessage extraPollMessage =
|
||||
new PollMessage.OneTime.Builder()
|
||||
.setParent(parameters.historyEntry())
|
||||
|
|
|
@ -314,7 +314,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
assertPollMessagesForResource(
|
||||
domain,
|
||||
new PollMessage.Autorenew.Builder()
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId("TheRegistrar")
|
||||
.setEventTime(domain.getRegistrationExpirationTime())
|
||||
.setMsg("Domain was auto-renewed.")
|
||||
|
@ -1431,7 +1431,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
assertPollMessagesForResource(
|
||||
domain,
|
||||
new PollMessage.Autorenew.Builder()
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId("TheRegistrar")
|
||||
.setEventTime(domain.getRegistrationExpirationTime())
|
||||
.setMsg("Domain was auto-renewed.")
|
||||
|
@ -1445,7 +1445,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
.setResponseData(
|
||||
ImmutableList.of(
|
||||
DomainPendingActionNotificationResponse.create(
|
||||
domain.getFullyQualifiedDomainName(),
|
||||
domain.getDomainName(),
|
||||
true,
|
||||
historyEntry.getTrid(),
|
||||
clock.nowUtc())))
|
||||
|
@ -1585,7 +1585,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
assertPollMessagesForResource(
|
||||
domain,
|
||||
new PollMessage.Autorenew.Builder()
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId("TheRegistrar")
|
||||
.setEventTime(domain.getRegistrationExpirationTime())
|
||||
.setMsg("Domain was auto-renewed.")
|
||||
|
|
|
@ -782,7 +782,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
|
|||
.setSuperordinateDomain(reloadResourceByForeignKey().createVKey())
|
||||
.build());
|
||||
persistResource(
|
||||
domain.asBuilder().addSubordinateHost(subordinateHost.getFullyQualifiedHostName()).build());
|
||||
domain.asBuilder().addSubordinateHost(subordinateHost.getHostName()).build());
|
||||
EppException thrown = assertThrows(DomainToDeleteHasHostsException.class, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
|
|||
domain =
|
||||
persistResource(
|
||||
new DomainBase.Builder()
|
||||
.setFullyQualifiedDomainName(domainName)
|
||||
.setDomainName(domainName)
|
||||
.setRepoId("2FF-TLD")
|
||||
.setPersistedCurrentSponsorClientId("NewRegistrar")
|
||||
.setCreationClientId("TheRegistrar")
|
||||
|
@ -128,7 +128,7 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
|
|||
host3 =
|
||||
persistResource(
|
||||
new HostResource.Builder()
|
||||
.setFullyQualifiedHostName("ns2.example.tld")
|
||||
.setHostName("ns2.example.tld")
|
||||
.setRepoId("3FF-TLD")
|
||||
.setSuperordinateDomain(domain.createVKey())
|
||||
.build());
|
||||
|
@ -139,7 +139,7 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
|
|||
.asBuilder()
|
||||
.setSubordinateHosts(
|
||||
ImmutableSet.of(
|
||||
host1.getFullyQualifiedHostName(), host3.getFullyQualifiedHostName()))
|
||||
host1.getHostName(), host3.getHostName()))
|
||||
.build());
|
||||
}
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ public class DomainTransferApproveFlowTest
|
|||
OneTime transferBillingEvent =
|
||||
new BillingEvent.OneTime.Builder()
|
||||
.setReason(Reason.TRANSFER)
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setEventTime(clock.nowUtc())
|
||||
.setBillingTime(clock.nowUtc().plus(registry.getTransferGracePeriodLength()))
|
||||
.setClientId("NewRegistrar")
|
||||
|
|
|
@ -112,7 +112,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
|
|||
persistResource(
|
||||
new HostResource.Builder()
|
||||
.setRepoId("2-".concat(Ascii.toUpperCase(tld)))
|
||||
.setFullyQualifiedHostName("ns1." + label + "." + tld)
|
||||
.setHostName("ns1." + label + "." + tld)
|
||||
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
||||
.setCreationClientId("TheRegistrar")
|
||||
.setCreationTimeForTest(DateTime.parse("1999-04-03T22:00:00.0Z"))
|
||||
|
@ -122,7 +122,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
|
|||
persistResource(
|
||||
domain
|
||||
.asBuilder()
|
||||
.addSubordinateHost(subordinateHost.getFullyQualifiedHostName())
|
||||
.addSubordinateHost(subordinateHost.getHostName())
|
||||
.build());
|
||||
historyEntryDomainCreate = getOnlyHistoryEntryOfType(domain, DOMAIN_CREATE);
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
|
|||
return new BillingEvent.Recurring.Builder()
|
||||
.setReason(Reason.RENEW)
|
||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId("TheRegistrar")
|
||||
.setEventTime(REGISTRATION_EXPIRATION_TIME)
|
||||
.setRecurrenceEndTime(TRANSFER_EXPIRATION_TIME)
|
||||
|
@ -155,7 +155,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
|
|||
return new BillingEvent.Recurring.Builder()
|
||||
.setReason(Reason.RENEW)
|
||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId("NewRegistrar")
|
||||
.setEventTime(EXTENDED_REGISTRATION_EXPIRATION_TIME)
|
||||
.setRecurrenceEndTime(END_OF_TIME)
|
||||
|
|
|
@ -252,7 +252,7 @@ public class DomainTransferRequestFlowTest
|
|||
Optional.of(
|
||||
new BillingEvent.OneTime.Builder()
|
||||
.setReason(Reason.TRANSFER)
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setEventTime(implicitTransferTime)
|
||||
.setBillingTime(
|
||||
implicitTransferTime.plus(registry.getTransferGracePeriodLength()))
|
||||
|
@ -594,7 +594,7 @@ public class DomainTransferRequestFlowTest
|
|||
// The transfer is going to happen immediately. To observe the domain in the pending transfer
|
||||
// state, grab it directly from the database.
|
||||
domain = Iterables.getOnlyElement(ofy().load().type(DomainBase.class).list());
|
||||
assertThat(domain.getFullyQualifiedDomainName()).isEqualTo("example.tld");
|
||||
assertThat(domain.getDomainName()).isEqualTo("example.tld");
|
||||
} else {
|
||||
// Transfer should have been requested.
|
||||
domain = reloadResourceByForeignKey();
|
||||
|
|
|
@ -54,7 +54,7 @@ public class HostInfoFlowTest extends ResourceFlowTestCase<HostInfoFlow, HostRes
|
|||
private HostResource persistHostResource() throws Exception {
|
||||
return persistResource(
|
||||
new HostResource.Builder()
|
||||
.setFullyQualifiedHostName(getUniqueIdFromCommand())
|
||||
.setHostName(getUniqueIdFromCommand())
|
||||
.setRepoId("1FF-FOOBAR")
|
||||
.setPersistedCurrentSponsorClientId("my sponsor")
|
||||
.setStatusValues(ImmutableSet.of(StatusValue.CLIENT_UPDATE_PROHIBITED))
|
||||
|
|
|
@ -75,7 +75,7 @@ public class DomainBaseSqlTest {
|
|||
|
||||
domain =
|
||||
new DomainBase.Builder()
|
||||
.setFullyQualifiedDomainName("example.com")
|
||||
.setDomainName("example.com")
|
||||
.setRepoId("4-COM")
|
||||
.setCreationClientId("registrar1")
|
||||
.setLastEppUpdateTime(fakeClock.nowUtc())
|
||||
|
@ -105,7 +105,7 @@ public class DomainBaseSqlTest {
|
|||
host =
|
||||
new HostResource.Builder()
|
||||
.setRepoId("host1")
|
||||
.setFullyQualifiedHostName("ns1.example.com")
|
||||
.setHostName("ns1.example.com")
|
||||
.setCreationClientId("registrar1")
|
||||
.setPersistedCurrentSponsorClientId("registrar2")
|
||||
.build();
|
||||
|
|
|
@ -75,7 +75,7 @@ public class DomainBaseTest extends EntityTestCase {
|
|||
VKey<HostResource> hostKey =
|
||||
persistResource(
|
||||
new HostResource.Builder()
|
||||
.setFullyQualifiedHostName("ns1.example.com")
|
||||
.setHostName("ns1.example.com")
|
||||
.setSuperordinateDomain(VKey.createOfy(DomainBase.class, domainKey))
|
||||
.setRepoId("1-COM")
|
||||
.build())
|
||||
|
@ -107,7 +107,7 @@ public class DomainBaseTest extends EntityTestCase {
|
|||
persistResource(
|
||||
cloneAndSetAutoTimestamps(
|
||||
new DomainBase.Builder()
|
||||
.setFullyQualifiedDomainName("example.com")
|
||||
.setDomainName("example.com")
|
||||
.setRepoId("4-COM")
|
||||
.setCreationClientId("a registrar")
|
||||
.setLastEppUpdateTime(fakeClock.nowUtc())
|
||||
|
@ -611,7 +611,7 @@ public class DomainBaseTest extends EntityTestCase {
|
|||
IllegalArgumentException thrown =
|
||||
assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
() -> domain.asBuilder().setFullyQualifiedDomainName("AAA.BBB"));
|
||||
() -> domain.asBuilder().setDomainName("AAA.BBB"));
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
.contains("Domain name must be in puny-coded, lower-case form");
|
||||
|
@ -622,7 +622,7 @@ public class DomainBaseTest extends EntityTestCase {
|
|||
IllegalArgumentException thrown =
|
||||
assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
() -> domain.asBuilder().setFullyQualifiedDomainName("みんな.みんな"));
|
||||
() -> domain.asBuilder().setDomainName("みんな.みんな"));
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
.contains("Domain name must be in puny-coded, lower-case form");
|
||||
|
|
|
@ -42,7 +42,7 @@ public class HostHistoryTest extends EntityTestCase {
|
|||
HostResource host =
|
||||
new HostResource.Builder()
|
||||
.setRepoId("host1")
|
||||
.setFullyQualifiedHostName("ns1.example.com")
|
||||
.setHostName("ns1.example.com")
|
||||
.setCreationClientId("TheRegistrar")
|
||||
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
||||
.setInetAddresses(ImmutableSet.of())
|
||||
|
@ -81,7 +81,7 @@ public class HostHistoryTest extends EntityTestCase {
|
|||
assertThat(one.getReason()).isEqualTo(two.getReason());
|
||||
assertThat(one.getTrid()).isEqualTo(two.getTrid());
|
||||
assertThat(one.getType()).isEqualTo(two.getType());
|
||||
assertThat(one.getHostBase().getFullyQualifiedHostName())
|
||||
.isEqualTo(two.getHostBase().getFullyQualifiedHostName());
|
||||
assertThat(one.getHostBase().getHostName())
|
||||
.isEqualTo(two.getHostBase().getHostName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ public class HostResourceTest extends EntityTestCase {
|
|||
cloneAndSetAutoTimestamps(
|
||||
new HostResource.Builder()
|
||||
.setRepoId("DEADBEEF-COM")
|
||||
.setFullyQualifiedHostName("ns1.example.com")
|
||||
.setHostName("ns1.example.com")
|
||||
.setCreationClientId("a registrar")
|
||||
.setLastEppUpdateTime(fakeClock.nowUtc())
|
||||
.setLastEppUpdateClientId("another registrar")
|
||||
|
@ -172,7 +172,7 @@ public class HostResourceTest extends EntityTestCase {
|
|||
IllegalArgumentException thrown =
|
||||
assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
() -> host.asBuilder().setFullyQualifiedHostName("AAA.BBB.CCC"));
|
||||
() -> host.asBuilder().setHostName("AAA.BBB.CCC"));
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
.contains("Host name must be in puny-coded, lower-case form");
|
||||
|
@ -183,7 +183,7 @@ public class HostResourceTest extends EntityTestCase {
|
|||
IllegalArgumentException thrown =
|
||||
assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
() -> host.asBuilder().setFullyQualifiedHostName("みんな.みんな.みんな"));
|
||||
() -> host.asBuilder().setHostName("みんな.みんな.みんな"));
|
||||
assertThat(thrown)
|
||||
.hasMessageThat()
|
||||
.contains("Host name must be in puny-coded, lower-case form");
|
||||
|
@ -222,7 +222,7 @@ public class HostResourceTest extends EntityTestCase {
|
|||
new HostResource.Builder()
|
||||
.setCreationTime(day2)
|
||||
.setRepoId("DEADBEEF-COM")
|
||||
.setFullyQualifiedHostName("ns1.example.com")
|
||||
.setHostName("ns1.example.com")
|
||||
.setCreationClientId("a registrar")
|
||||
.setLastEppUpdateTime(fakeClock.nowUtc())
|
||||
.setLastEppUpdateClientId("another registrar")
|
||||
|
|
|
@ -136,7 +136,7 @@ public class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDom
|
|||
}
|
||||
|
||||
private HostResource addHostToMap(HostResource host) {
|
||||
hostNameToHostMap.put(host.getFullyQualifiedHostName(), host);
|
||||
hostNameToHostMap.put(host.getHostName(), host);
|
||||
return host;
|
||||
}
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ public class DomainBaseToXjcConverterTest {
|
|||
.setDsData(
|
||||
ImmutableSet.of(
|
||||
DelegationSignerData.create(123, 200, 230, base16().decode("1234567890"))))
|
||||
.setFullyQualifiedDomainName(Idn.toASCII("love.みんな"))
|
||||
.setDomainName(Idn.toASCII("love.みんな"))
|
||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||
.setLastEppUpdateClientId("IntoTheTempest")
|
||||
.setLastEppUpdateTime(DateTime.parse("1920-01-01T00:00:00Z"))
|
||||
|
@ -407,7 +407,7 @@ public class DomainBaseToXjcConverterTest {
|
|||
.setCreationClientId("LawyerCat")
|
||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||
.setFullyQualifiedHostName(Idn.toASCII(fqhn))
|
||||
.setHostName(Idn.toASCII(fqhn))
|
||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString(ip)))
|
||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||
.setLastEppUpdateClientId("CeilingCat")
|
||||
|
|
|
@ -71,7 +71,7 @@ public class HostResourceToXjcConverterTest {
|
|||
.setCreationClientId("LawyerCat")
|
||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||
.setFullyQualifiedHostName("ns1.love.foobar")
|
||||
.setHostName("ns1.love.foobar")
|
||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("127.0.0.1")))
|
||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||
.setLastEppUpdateClientId("CeilingCat")
|
||||
|
@ -127,7 +127,7 @@ public class HostResourceToXjcConverterTest {
|
|||
.setCreationClientId("LawyerCat")
|
||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||
.setFullyQualifiedHostName("ns1.love.lol")
|
||||
.setHostName("ns1.love.lol")
|
||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("127.0.0.1")))
|
||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||
.setLastEppUpdateClientId("CeilingCat")
|
||||
|
@ -176,7 +176,7 @@ public class HostResourceToXjcConverterTest {
|
|||
.setCreationClientId("LawyerCat")
|
||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||
.setFullyQualifiedHostName("ns1.love.lol")
|
||||
.setHostName("ns1.love.lol")
|
||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
|
||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||
.setLastEppUpdateClientId("CeilingCat")
|
||||
|
@ -199,7 +199,7 @@ public class HostResourceToXjcConverterTest {
|
|||
.setCreationClientId("LawyerCat")
|
||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||
.setFullyQualifiedHostName("ns1.love.lol")
|
||||
.setHostName("ns1.love.lol")
|
||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
|
||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||
.setLastEppUpdateClientId("CeilingCat")
|
||||
|
@ -218,7 +218,7 @@ public class HostResourceToXjcConverterTest {
|
|||
.setCreationClientId("LawyerCat")
|
||||
.setCreationTimeForTest(DateTime.parse("1900-01-01T00:00:00Z"))
|
||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||
.setFullyQualifiedHostName("ns1.love.lol")
|
||||
.setHostName("ns1.love.lol")
|
||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString("cafe::abba")))
|
||||
.setLastTransferTime(DateTime.parse("1910-01-01T00:00:00Z"))
|
||||
.setLastEppUpdateClientId("CeilingCat")
|
||||
|
|
|
@ -60,7 +60,7 @@ final class RdeFixtures {
|
|||
static DomainBase makeDomainBase(FakeClock clock, String tld) {
|
||||
DomainBase domain =
|
||||
new DomainBase.Builder()
|
||||
.setFullyQualifiedDomainName("example." + tld)
|
||||
.setDomainName("example." + tld)
|
||||
.setRepoId(generateNewDomainRoid(tld))
|
||||
.setRegistrant(
|
||||
makeContactResource(clock, "5372808-ERL", "(◕‿◕) nevermore", "prophet@evil.みんな")
|
||||
|
@ -109,7 +109,7 @@ final class RdeFixtures {
|
|||
.setDsData(
|
||||
ImmutableSet.of(
|
||||
DelegationSignerData.create(123, 200, 230, base16().decode("1234567890"))))
|
||||
.setFullyQualifiedDomainName(Idn.toASCII("love." + tld))
|
||||
.setDomainName(Idn.toASCII("love." + tld))
|
||||
.setLastTransferTime(DateTime.parse("1990-01-01T00:00:00Z"))
|
||||
.setLastEppUpdateClientId("IntoTheTempest")
|
||||
.setLastEppUpdateTime(clock.nowUtc())
|
||||
|
@ -250,7 +250,7 @@ final class RdeFixtures {
|
|||
.setCreationClientId("LawyerCat")
|
||||
.setCreationTimeForTest(clock.nowUtc())
|
||||
.setPersistedCurrentSponsorClientId("BusinessCat")
|
||||
.setFullyQualifiedHostName(Idn.toASCII(fqhn))
|
||||
.setHostName(Idn.toASCII(fqhn))
|
||||
.setInetAddresses(ImmutableSet.of(InetAddresses.forString(ip)))
|
||||
.setLastTransferTime(DateTime.parse("1990-01-01T00:00:00Z"))
|
||||
.setLastEppUpdateClientId("CeilingCat")
|
||||
|
|
|
@ -120,7 +120,7 @@ public class DatastoreHelper {
|
|||
|
||||
public static HostResource newHostResource(String hostName) {
|
||||
return new HostResource.Builder()
|
||||
.setFullyQualifiedHostName(hostName)
|
||||
.setHostName(hostName)
|
||||
.setCreationClientId("TheRegistrar")
|
||||
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
||||
.setCreationTimeForTest(START_OF_TIME)
|
||||
|
@ -150,7 +150,7 @@ public class DatastoreHelper {
|
|||
VKey<ContactResource> contactKey = contact.createVKey();
|
||||
return new DomainBase.Builder()
|
||||
.setRepoId(repoId)
|
||||
.setFullyQualifiedDomainName(domainName)
|
||||
.setDomainName(domainName)
|
||||
.setCreationClientId("TheRegistrar")
|
||||
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
||||
.setCreationTimeForTest(START_OF_TIME)
|
||||
|
@ -433,13 +433,13 @@ public class DatastoreHelper {
|
|||
DateTime eventTime) {
|
||||
return new BillingEvent.OneTime.Builder()
|
||||
.setReason(Reason.TRANSFER)
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setEventTime(eventTime)
|
||||
.setBillingTime(
|
||||
eventTime.plus(Registry.get(domain.getTld()).getTransferGracePeriodLength()))
|
||||
.setClientId("NewRegistrar")
|
||||
.setPeriodYears(1)
|
||||
.setCost(getDomainRenewCost(domain.getFullyQualifiedDomainName(), costLookupTime, 1))
|
||||
.setCost(getDomainRenewCost(domain.getDomainName(), costLookupTime, 1))
|
||||
.setParent(historyEntry)
|
||||
.build();
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ public class DatastoreHelper {
|
|||
DomainBase domain =
|
||||
new DomainBase.Builder()
|
||||
.setRepoId(generateNewDomainRoid(tld))
|
||||
.setFullyQualifiedDomainName(domainName)
|
||||
.setDomainName(domainName)
|
||||
.setPersistedCurrentSponsorClientId("TheRegistrar")
|
||||
.setCreationClientId("TheRegistrar")
|
||||
.setCreationTimeForTest(creationTime)
|
||||
|
@ -568,7 +568,7 @@ public class DatastoreHelper {
|
|||
new BillingEvent.Recurring.Builder()
|
||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||
.setReason(Reason.RENEW)
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId("NewRegistrar")
|
||||
.setEventTime(extendedRegistrationExpirationTime)
|
||||
.setRecurrenceEndTime(END_OF_TIME)
|
||||
|
@ -576,7 +576,7 @@ public class DatastoreHelper {
|
|||
.build());
|
||||
PollMessage.Autorenew gainingClientAutorenewPollMessage = persistResource(
|
||||
new PollMessage.Autorenew.Builder()
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId("NewRegistrar")
|
||||
.setEventTime(extendedRegistrationExpirationTime)
|
||||
.setAutorenewEndTime(END_OF_TIME)
|
||||
|
|
|
@ -43,7 +43,7 @@ public final class DomainBaseSubject
|
|||
public And<DomainBaseSubject> hasFullyQualifiedDomainName(String fullyQualifiedDomainName) {
|
||||
return hasValue(
|
||||
fullyQualifiedDomainName,
|
||||
actual.getFullyQualifiedDomainName(),
|
||||
actual.getDomainName(),
|
||||
"has fullyQualifiedDomainName");
|
||||
}
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ public final class FullFieldsTestEntityHelper {
|
|||
HostResource.Builder builder =
|
||||
new HostResource.Builder()
|
||||
.setRepoId(generateNewContactHostRoid())
|
||||
.setFullyQualifiedHostName(Idn.toASCII(fqhn))
|
||||
.setHostName(Idn.toASCII(fqhn))
|
||||
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))
|
||||
.setPersistedCurrentSponsorClientId(registrarClientId);
|
||||
if ((ip1 != null) || (ip2 != null)) {
|
||||
|
@ -344,7 +344,7 @@ public final class FullFieldsTestEntityHelper {
|
|||
Registrar registrar) {
|
||||
DomainBase.Builder builder =
|
||||
new DomainBase.Builder()
|
||||
.setFullyQualifiedDomainName(Idn.toASCII(domain))
|
||||
.setDomainName(Idn.toASCII(domain))
|
||||
.setRepoId(generateNewDomainRoid(getTldFromDomainName(Idn.toASCII(domain))))
|
||||
.setLastEppUpdateTime(DateTime.parse("2009-05-29T20:13:00Z"))
|
||||
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))
|
||||
|
|
|
@ -61,7 +61,7 @@ public class LordnTaskUtilsTest {
|
|||
|
||||
private DomainBase.Builder newDomainBuilder() {
|
||||
return new DomainBase.Builder()
|
||||
.setFullyQualifiedDomainName("fleece.example")
|
||||
.setDomainName("fleece.example")
|
||||
.setRegistrant(persistActiveContact("jd1234").createVKey())
|
||||
.setSmdId("smdzzzz")
|
||||
.setCreationClientId("TheRegistrar");
|
||||
|
|
|
@ -146,7 +146,7 @@ public class EppLifecycleToolsTest extends EppTestCase {
|
|||
BillingEvent.OneTime renewBillingEvent =
|
||||
new BillingEvent.OneTime.Builder()
|
||||
.setReason(Reason.RENEW)
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId(domain.getCurrentSponsorClientId())
|
||||
.setCost(Money.parse("USD 44.00"))
|
||||
.setPeriodYears(4)
|
||||
|
|
|
@ -90,7 +90,7 @@ public class LockDomainCommandTest extends CommandTestCase<LockDomainCommand> {
|
|||
.add("--client=NewRegistrar")
|
||||
.addAll(
|
||||
domains.stream()
|
||||
.map(DomainBase::getFullyQualifiedDomainName)
|
||||
.map(DomainBase::getDomainName)
|
||||
.collect(Collectors.toList()))
|
||||
.build());
|
||||
for (DomainBase domain : domains) {
|
||||
|
|
|
@ -101,7 +101,7 @@ public class UnlockDomainCommandTest extends CommandTestCase<UnlockDomainCommand
|
|||
.add("--client=NewRegistrar")
|
||||
.addAll(
|
||||
domains.stream()
|
||||
.map(DomainBase::getFullyQualifiedDomainName)
|
||||
.map(DomainBase::getDomainName)
|
||||
.collect(Collectors.toList()))
|
||||
.build());
|
||||
for (DomainBase domain : domains) {
|
||||
|
|
|
@ -124,7 +124,7 @@ public class UnrenewDomainCommandTest extends CommandTestCase<UnrenewDomainComma
|
|||
.setParent(synthetic)
|
||||
.setReason(Reason.RENEW)
|
||||
.setFlags(ImmutableSet.of(Flag.AUTO_RENEW))
|
||||
.setTargetId(domain.getFullyQualifiedDomainName())
|
||||
.setTargetId(domain.getDomainName())
|
||||
.setClientId("TheRegistrar")
|
||||
.setEventTime(newExpirationTime)
|
||||
.build());
|
||||
|
|
|
@ -111,7 +111,7 @@ public class BackfillRegistryLocksCommandTest
|
|||
.isSuperuser(true)
|
||||
.setRegistrarId("adminreg")
|
||||
.setRepoId(domain.getRepoId())
|
||||
.setDomainName(domain.getFullyQualifiedDomainName())
|
||||
.setDomainName(domain.getDomainName())
|
||||
.setLockCompletionTimestamp(fakeClock.nowUtc())
|
||||
.setVerificationCode(command.stringGenerator.createString(32))
|
||||
.build());
|
||||
|
|
|
@ -189,7 +189,7 @@ public final class RegistryLockGetActionTest {
|
|||
"locks",
|
||||
ImmutableList.of(
|
||||
new ImmutableMap.Builder<>()
|
||||
.put("fullyQualifiedDomainName", "adminexample.test")
|
||||
.put("domainName", "adminexample.test")
|
||||
.put("lockedTime", "2000-06-09T22:00:00.001Z")
|
||||
.put("lockedBy", "admin")
|
||||
.put("userCanUnlock", false)
|
||||
|
@ -197,7 +197,7 @@ public final class RegistryLockGetActionTest {
|
|||
.put("isUnlockPending", false)
|
||||
.build(),
|
||||
new ImmutableMap.Builder<>()
|
||||
.put("fullyQualifiedDomainName", "example.test")
|
||||
.put("domainName", "example.test")
|
||||
.put("lockedTime", "2000-06-09T22:00:00.000Z")
|
||||
.put("lockedBy", "johndoe@theregistrar.com")
|
||||
.put("userCanUnlock", true)
|
||||
|
@ -205,7 +205,7 @@ public final class RegistryLockGetActionTest {
|
|||
.put("isUnlockPending", false)
|
||||
.build(),
|
||||
new ImmutableMap.Builder<>()
|
||||
.put("fullyQualifiedDomainName", "expiredunlock.test")
|
||||
.put("domainName", "expiredunlock.test")
|
||||
.put("lockedTime", "2000-06-08T22:00:00.000Z")
|
||||
.put("lockedBy", "johndoe@theregistrar.com")
|
||||
.put("userCanUnlock", true)
|
||||
|
@ -213,7 +213,7 @@ public final class RegistryLockGetActionTest {
|
|||
.put("isUnlockPending", false)
|
||||
.build(),
|
||||
new ImmutableMap.Builder<>()
|
||||
.put("fullyQualifiedDomainName", "incompleteunlock.test")
|
||||
.put("domainName", "incompleteunlock.test")
|
||||
.put("lockedTime", "2000-06-09T22:00:00.001Z")
|
||||
.put("lockedBy", "johndoe@theregistrar.com")
|
||||
.put("userCanUnlock", true)
|
||||
|
@ -221,7 +221,7 @@ public final class RegistryLockGetActionTest {
|
|||
.put("isUnlockPending", true)
|
||||
.build(),
|
||||
new ImmutableMap.Builder<>()
|
||||
.put("fullyQualifiedDomainName", "pending.test")
|
||||
.put("domainName", "pending.test")
|
||||
.put("lockedTime", "")
|
||||
.put("lockedBy", "johndoe@theregistrar.com")
|
||||
.put("userCanUnlock", true)
|
||||
|
|
|
@ -225,7 +225,7 @@ public final class RegistryLockPostActionTest {
|
|||
action.handleJsonRequest(
|
||||
ImmutableMap.of(
|
||||
"clientId", "TheRegistrar",
|
||||
"fullyQualifiedDomainName", "example.tld",
|
||||
"domainName", "example.tld",
|
||||
"isLock", true));
|
||||
assertSuccess(response, "lock", "johndoe@theregistrar.com");
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ public final class RegistryLockPostActionTest {
|
|||
Map<String, ?> response =
|
||||
action.handleJsonRequest(
|
||||
ImmutableMap.of("clientId", "TheRegistrar", "password", "hi", "isLock", true));
|
||||
assertFailureWithMessage(response, "Missing key for fullyQualifiedDomainName");
|
||||
assertFailureWithMessage(response, "Missing key for domainName");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -262,7 +262,7 @@ public final class RegistryLockPostActionTest {
|
|||
action.handleJsonRequest(
|
||||
ImmutableMap.of(
|
||||
"clientId", "TheRegistrar",
|
||||
"fullyQualifiedDomainName", "example.tld",
|
||||
"domainName", "example.tld",
|
||||
"password", "hi"));
|
||||
assertFailureWithMessage(response, "Missing key for isLock");
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ public final class RegistryLockPostActionTest {
|
|||
action.handleJsonRequest(
|
||||
ImmutableMap.of(
|
||||
"clientId", "TheRegistrar",
|
||||
"fullyQualifiedDomainName", "example.tld",
|
||||
"domainName", "example.tld",
|
||||
"isLock", true));
|
||||
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ public final class RegistryLockPostActionTest {
|
|||
action.handleJsonRequest(
|
||||
ImmutableMap.of(
|
||||
"clientId", "TheRegistrar",
|
||||
"fullyQualifiedDomainName", "example.tld",
|
||||
"domainName", "example.tld",
|
||||
"isLock", true,
|
||||
"password", "hi"));
|
||||
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
|
||||
|
@ -307,7 +307,7 @@ public final class RegistryLockPostActionTest {
|
|||
action.handleJsonRequest(
|
||||
ImmutableMap.of(
|
||||
"clientId", "TheRegistrar",
|
||||
"fullyQualifiedDomainName", "example.tld",
|
||||
"domainName", "example.tld",
|
||||
"isLock", true,
|
||||
"password", "badPassword"));
|
||||
assertFailureWithMessage(response, "Incorrect registry lock password for contact");
|
||||
|
@ -319,7 +319,7 @@ public final class RegistryLockPostActionTest {
|
|||
action.handleJsonRequest(
|
||||
ImmutableMap.of(
|
||||
"clientId", "TheRegistrar",
|
||||
"fullyQualifiedDomainName", "bad.tld",
|
||||
"domainName", "bad.tld",
|
||||
"isLock", true,
|
||||
"password", "hi"));
|
||||
assertFailureWithMessage(response, "Unknown domain bad.tld");
|
||||
|
@ -382,7 +382,7 @@ public final class RegistryLockPostActionTest {
|
|||
return ImmutableMap.of(
|
||||
"isLock", lock,
|
||||
"clientId", "TheRegistrar",
|
||||
"fullyQualifiedDomainName", "example.tld",
|
||||
"domainName", "example.tld",
|
||||
"password", "hi");
|
||||
}
|
||||
|
||||
|
|
|
@ -488,7 +488,7 @@ public class RegistrarConsoleScreenshotTest extends WebDriverTestCase {
|
|||
.isSuperuser(false)
|
||||
.setRegistrarId("TheRegistrar")
|
||||
.setRegistrarPocId("Marla.Singer@crr.com")
|
||||
.setDomainName(pendingUnlockDomain.getFullyQualifiedDomainName())
|
||||
.setDomainName(pendingUnlockDomain.getDomainName())
|
||||
.setRepoId(pendingUnlockDomain.getRepoId())
|
||||
.setLockCompletionTimestamp(START_OF_TIME)
|
||||
.setUnlockRequestTimestamp(START_OF_TIME)
|
||||
|
@ -561,7 +561,7 @@ public class RegistrarConsoleScreenshotTest extends WebDriverTestCase {
|
|||
.setRegistrarId("TheRegistrar")
|
||||
.setRegistrarPocId("Marla.Singer@crr.com")
|
||||
.setLockCompletionTimestamp(START_OF_TIME)
|
||||
.setDomainName(domainBase.getFullyQualifiedDomainName())
|
||||
.setDomainName(domainBase.getDomainName())
|
||||
.setRepoId(domainBase.getRepoId())
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -86,12 +86,12 @@ public class DomainWhoisResponseTest {
|
|||
createTld("tld");
|
||||
|
||||
hostResource1 = persistResource(new HostResource.Builder()
|
||||
.setFullyQualifiedHostName("ns01.exampleregistrar.tld")
|
||||
.setHostName("ns01.exampleregistrar.tld")
|
||||
.setRepoId("1-ROID")
|
||||
.build());
|
||||
|
||||
hostResource2 = persistResource(new HostResource.Builder()
|
||||
.setFullyQualifiedHostName("ns02.exampleregistrar.tld")
|
||||
.setHostName("ns02.exampleregistrar.tld")
|
||||
.setRepoId("2-ROID")
|
||||
.build());
|
||||
|
||||
|
@ -229,7 +229,7 @@ public class DomainWhoisResponseTest {
|
|||
domainBase =
|
||||
persistResource(
|
||||
new DomainBase.Builder()
|
||||
.setFullyQualifiedDomainName("example.tld")
|
||||
.setDomainName("example.tld")
|
||||
.setRepoId("3-TLD")
|
||||
.setLastEppUpdateTime(DateTime.parse("2009-05-29T20:13:00Z"))
|
||||
.setCreationTimeForTest(DateTime.parse("2000-10-08T00:45:00Z"))
|
||||
|
|
|
@ -55,7 +55,7 @@ public class NameserverWhoisResponseTest {
|
|||
createTld("tld");
|
||||
|
||||
hostResource1 = new HostResource.Builder()
|
||||
.setFullyQualifiedHostName("ns1.example.tld")
|
||||
.setHostName("ns1.example.tld")
|
||||
.setPersistedCurrentSponsorClientId("example")
|
||||
.setInetAddresses(ImmutableSet.of(
|
||||
InetAddresses.forString("192.0.2.123"),
|
||||
|
@ -64,7 +64,7 @@ public class NameserverWhoisResponseTest {
|
|||
.build();
|
||||
|
||||
hostResource2 = new HostResource.Builder()
|
||||
.setFullyQualifiedHostName("ns2.example.tld")
|
||||
.setHostName("ns2.example.tld")
|
||||
.setPersistedCurrentSponsorClientId("example")
|
||||
.setInetAddresses(ImmutableSet.of(
|
||||
InetAddresses.forString("192.0.2.123"),
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
-- Copyright 2020 The Nomulus Authors. All Rights Reserved.
|
||||
--
|
||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-- you may not use this file except in compliance with the License.
|
||||
-- You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing, software
|
||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
ALTER TABLE "Domain" RENAME COLUMN "fully_qualified_domain_name" TO "domain_name";
|
||||
ALTER TABLE "HostResource" RENAME COLUMN "fully_qualified_host_name" TO "host_name";
|
||||
ALTER TABLE "HostHistory" RENAME COLUMN "fully_qualified_host_name" TO "host_name";
|
|
@ -162,7 +162,7 @@ create sequence history_id_sequence start 1 increment 1;
|
|||
auth_info_repo_id text,
|
||||
auth_info_value text,
|
||||
billing_contact text,
|
||||
fully_qualified_domain_name text,
|
||||
domain_name text,
|
||||
idn_table_name text,
|
||||
last_transfer_time timestamptz,
|
||||
launch_notice_accepted_time timestamptz,
|
||||
|
@ -220,7 +220,7 @@ create sequence history_id_sequence start 1 increment 1;
|
|||
history_server_transaction_id text,
|
||||
history_type text not null,
|
||||
history_xml_bytes bytea not null,
|
||||
fully_qualified_host_name text,
|
||||
host_name text,
|
||||
inet_addresses text[],
|
||||
last_superordinate_change timestamptz,
|
||||
last_transfer_time timestamptz,
|
||||
|
@ -245,7 +245,7 @@ create sequence history_id_sequence start 1 increment 1;
|
|||
last_epp_update_registrar_id text,
|
||||
last_epp_update_time timestamptz,
|
||||
statuses text[],
|
||||
fully_qualified_host_name text,
|
||||
host_name text,
|
||||
inet_addresses text[],
|
||||
last_superordinate_change timestamptz,
|
||||
last_transfer_time timestamptz,
|
||||
|
@ -429,11 +429,11 @@ create index IDX1p3esngcwwu6hstyua6itn6ff on "Contact" (search_name);
|
|||
create index IDX8nr0ke9mrrx4ewj6pd2ag4rmr on "Domain" (creation_time);
|
||||
create index IDXhsjqiy2lyobfymplb28nm74lm on "Domain" (current_sponsor_registrar_id);
|
||||
create index IDX5mnf0wn20tno4b9do88j61klr on "Domain" (deletion_time);
|
||||
create index IDX1rcgkdd777bpvj0r94sltwd5y on "Domain" (fully_qualified_domain_name);
|
||||
create index IDXc5aw4pk1vkd6ymhvkpanmoadv on "Domain" (domain_name);
|
||||
create index IDXrwl38wwkli1j7gkvtywi9jokq on "Domain" (tld);
|
||||
create index IDXfg2nnjlujxo6cb9fha971bq2n on "HostHistory" (creation_time);
|
||||
create index IDX1iy7njgb7wjmj9piml4l2g0qi on "HostHistory" (history_registrar_id);
|
||||
create index IDXj77pfwhui9f0i7wjq6lmibovj on "HostHistory" (fully_qualified_host_name);
|
||||
create index IDXkkwbwcwvrdkkqothkiye4jiff on "HostHistory" (host_name);
|
||||
create index IDXknk8gmj7s47q56cwpa6rmpt5l on "HostHistory" (history_type);
|
||||
create index IDX67qwkjtlq5q8dv6egtrtnhqi7 on "HostHistory" (history_modification_time);
|
||||
create index IDXe7wu46c7wpvfmfnj4565abibp on "PollMessage" (registrar_id);
|
||||
|
|
|
@ -281,7 +281,7 @@ CREATE TABLE public."Domain" (
|
|||
statuses text[],
|
||||
auth_info_repo_id text,
|
||||
auth_info_value text,
|
||||
fully_qualified_domain_name text,
|
||||
domain_name text,
|
||||
idn_table_name text,
|
||||
last_transfer_time timestamp with time zone,
|
||||
launch_notice_accepted_time timestamp with time zone,
|
||||
|
@ -352,7 +352,7 @@ CREATE TABLE public."HostHistory" (
|
|||
history_server_transaction_id text,
|
||||
history_type text NOT NULL,
|
||||
history_xml_bytes bytea NOT NULL,
|
||||
fully_qualified_host_name text,
|
||||
host_name text,
|
||||
inet_addresses text[],
|
||||
last_superordinate_change timestamp with time zone,
|
||||
last_transfer_time timestamp with time zone,
|
||||
|
@ -381,7 +381,7 @@ CREATE TABLE public."HostResource" (
|
|||
last_epp_update_registrar_id text,
|
||||
last_epp_update_time timestamp with time zone,
|
||||
statuses text[],
|
||||
fully_qualified_host_name text,
|
||||
host_name text,
|
||||
last_superordinate_change timestamp with time zone,
|
||||
last_transfer_time timestamp with time zone,
|
||||
superordinate_domain text,
|
||||
|
@ -898,7 +898,7 @@ CREATE INDEX idx1p3esngcwwu6hstyua6itn6ff ON public."Contact" USING btree (searc
|
|||
-- Name: idx1rcgkdd777bpvj0r94sltwd5y; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idx1rcgkdd777bpvj0r94sltwd5y ON public."Domain" USING btree (fully_qualified_domain_name);
|
||||
CREATE INDEX idx1rcgkdd777bpvj0r94sltwd5y ON public."Domain" USING btree (domain_name);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1024,7 +1024,7 @@ CREATE INDEX idxhmv411mdqo5ibn4vy7ykxpmlv ON public."BillingEvent" USING btree (
|
|||
-- Name: idxj77pfwhui9f0i7wjq6lmibovj; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idxj77pfwhui9f0i7wjq6lmibovj ON public."HostHistory" USING btree (fully_qualified_host_name);
|
||||
CREATE INDEX idxj77pfwhui9f0i7wjq6lmibovj ON public."HostHistory" USING btree (host_name);
|
||||
|
||||
|
||||
--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue