diff --git a/java/google/registry/flows/domain/DomainAllocateFlow.java b/java/google/registry/flows/domain/DomainAllocateFlow.java index c8f804c1f..ef6099b55 100644 --- a/java/google/registry/flows/domain/DomainAllocateFlow.java +++ b/java/google/registry/flows/domain/DomainAllocateFlow.java @@ -156,7 +156,7 @@ public class DomainAllocateFlow implements TransactionalFlow { loadAndValidateApplication(allocateCreate.getApplicationRoid(), now); String repoId = createDomainRepoId(ObjectifyService.allocateId(), registry.getTldStr()); ImmutableSet.Builder entitiesToSave = new ImmutableSet.Builder<>(); - HistoryEntry historyEntry = buildHistory(repoId, period, now); + HistoryEntry historyEntry = buildHistoryEntry(repoId, period, now); entitiesToSave.add(historyEntry); ImmutableSet billsAndPolls = createBillingEventsAndPollMessages( domainName, application, historyEntry, isSunrushAddGracePeriod, registry, now, years); @@ -229,7 +229,7 @@ public class DomainAllocateFlow implements TransactionalFlow { return application; } - private HistoryEntry buildHistory(String repoId, Period period, DateTime now) { + private HistoryEntry buildHistoryEntry(String repoId, Period period, DateTime now) { return historyBuilder .setType(HistoryEntry.Type.DOMAIN_ALLOCATE) .setPeriod(period) diff --git a/java/google/registry/flows/domain/DomainApplicationCreateFlow.java b/java/google/registry/flows/domain/DomainApplicationCreateFlow.java index 4f2f605f8..8c0012d86 100644 --- a/java/google/registry/flows/domain/DomainApplicationCreateFlow.java +++ b/java/google/registry/flows/domain/DomainApplicationCreateFlow.java @@ -267,7 +267,8 @@ public final class DomainApplicationCreateFlow implements TransactionalFlow { }}) .toList()) .build(); - HistoryEntry historyEntry = buildHistory(newApplication.getRepoId(), command.getPeriod(), now); + HistoryEntry historyEntry = + buildHistoryEntry(newApplication.getRepoId(), command.getPeriod(), now); ImmutableSet.Builder entitiesToSave = new ImmutableSet.Builder<>(); entitiesToSave.add( newApplication, @@ -364,7 +365,7 @@ public final class DomainApplicationCreateFlow implements TransactionalFlow { } } - private HistoryEntry buildHistory(String repoId, Period period, DateTime now) { + private HistoryEntry buildHistoryEntry(String repoId, Period period, DateTime now) { return historyBuilder .setType(HistoryEntry.Type.DOMAIN_APPLICATION_CREATE) .setPeriod(period) diff --git a/java/google/registry/flows/domain/DomainApplicationUpdateFlow.java b/java/google/registry/flows/domain/DomainApplicationUpdateFlow.java index feb83b0ba..c62a74978 100644 --- a/java/google/registry/flows/domain/DomainApplicationUpdateFlow.java +++ b/java/google/registry/flows/domain/DomainApplicationUpdateFlow.java @@ -163,7 +163,7 @@ public class DomainApplicationUpdateFlow implements TransactionalFlow { verifyNoDisallowedStatuses(existingApplication, UPDATE_DISALLOWED_STATUSES); verifyOptionalAuthInfo(authInfo, existingApplication); verifyUpdateAllowed(existingApplication, command, now); - HistoryEntry historyEntry = buildHistory(existingApplication, now); + HistoryEntry historyEntry = buildHistoryEntry(existingApplication, now); DomainApplication newApplication = updateApplication(existingApplication, command, now); validateNewApplication(newApplication); ofy().save().entities(newApplication, historyEntry); @@ -215,7 +215,7 @@ public class DomainApplicationUpdateFlow implements TransactionalFlow { domainName, nullToEmpty(add.getNameserverFullyQualifiedHostNames())); } - private HistoryEntry buildHistory(DomainApplication existingApplication, DateTime now) { + private HistoryEntry buildHistoryEntry(DomainApplication existingApplication, DateTime now) { return historyBuilder .setType(HistoryEntry.Type.DOMAIN_APPLICATION_UPDATE) .setModificationTime(now) diff --git a/java/google/registry/flows/domain/DomainCreateFlow.java b/java/google/registry/flows/domain/DomainCreateFlow.java index a21b16ba5..c83c97e37 100644 --- a/java/google/registry/flows/domain/DomainCreateFlow.java +++ b/java/google/registry/flows/domain/DomainCreateFlow.java @@ -258,7 +258,7 @@ public class DomainCreateFlow implements TransactionalFlow { validateSecDnsExtension(eppInput.getSingleExtension(SecDnsCreateExtension.class)); String repoId = createDomainRepoId(ObjectifyService.allocateId(), registry.getTldStr()); DateTime registrationExpirationTime = leapSafeAddYears(now, years); - HistoryEntry historyEntry = buildHistory(repoId, period, now); + HistoryEntry historyEntry = buildHistoryEntry(repoId, period, now); // Bill for the create. BillingEvent.OneTime createBillingEvent = createOneTimeBillingEvent( @@ -360,7 +360,7 @@ public class DomainCreateFlow implements TransactionalFlow { } } - private HistoryEntry buildHistory(String repoId, Period period, DateTime now) { + private HistoryEntry buildHistoryEntry(String repoId, Period period, DateTime now) { return historyBuilder .setType(HistoryEntry.Type.DOMAIN_CREATE) .setPeriod(period) diff --git a/java/google/registry/flows/domain/DomainRestoreRequestFlow.java b/java/google/registry/flows/domain/DomainRestoreRequestFlow.java index 90bb5f52d..67f4473ed 100644 --- a/java/google/registry/flows/domain/DomainRestoreRequestFlow.java +++ b/java/google/registry/flows/domain/DomainRestoreRequestFlow.java @@ -138,7 +138,7 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow { FeeUpdateCommandExtension feeUpdate = eppInput.getSingleExtension(FeeUpdateCommandExtension.class); verifyRestoreAllowed(command, existingDomain, feeUpdate, feesAndCredits, now); - HistoryEntry historyEntry = buildHistory(existingDomain, now); + HistoryEntry historyEntry = buildHistoryEntry(existingDomain, now); ImmutableSet.Builder entitiesToSave = new ImmutableSet.Builder<>(); entitiesToSave.addAll( createRestoreAndRenewBillingEvents( @@ -172,7 +172,7 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow { .build(); } - private HistoryEntry buildHistory(DomainResource existingDomain, DateTime now) { + private HistoryEntry buildHistoryEntry(DomainResource existingDomain, DateTime now) { DomainTransactionRecord transactionRecord = new DomainTransactionRecord.Builder() .setTld(existingDomain.getTld()) diff --git a/java/google/registry/flows/domain/DomainTransferRequestFlow.java b/java/google/registry/flows/domain/DomainTransferRequestFlow.java index 41351078a..a4375a591 100644 --- a/java/google/registry/flows/domain/DomainTransferRequestFlow.java +++ b/java/google/registry/flows/domain/DomainTransferRequestFlow.java @@ -141,7 +141,7 @@ public final class DomainTransferRequestFlow implements TransactionalFlow { eppInput.getSingleExtension(FeeTransferCommandExtension.class); FeesAndCredits feesAndCredits = pricingLogic.getTransferPrice(registry, targetId, now); validateFeeChallenge(targetId, tld, now, feeTransfer, feesAndCredits); - HistoryEntry historyEntry = buildHistory(period, existingDomain, now); + HistoryEntry historyEntry = buildHistoryEntry(period, existingDomain, now); DateTime automaticTransferTime = now.plus(registry.getAutomaticTransferLength()); // If the domain will be in the auto-renew grace period at the moment of transfer, the transfer @@ -251,13 +251,14 @@ public final class DomainTransferRequestFlow implements TransactionalFlow { } } - private HistoryEntry buildHistory(Period period, DomainResource existingResource, DateTime now) { + private HistoryEntry buildHistoryEntry( + Period period, DomainResource existingDomain, DateTime now) { return historyBuilder .setType(HistoryEntry.Type.DOMAIN_TRANSFER_REQUEST) - .setOtherClientId(existingResource.getCurrentSponsorClientId()) + .setOtherClientId(existingDomain.getCurrentSponsorClientId()) .setPeriod(period) .setModificationTime(now) - .setParent(Key.create(existingResource)) + .setParent(Key.create(existingDomain)) .build(); }