mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Rename buildHistory() methods to buildHistoryEntry()
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=165707934
This commit is contained in:
parent
dedabfb076
commit
fcb554947c
6 changed files with 16 additions and 14 deletions
|
@ -156,7 +156,7 @@ public class DomainAllocateFlow implements TransactionalFlow {
|
|||
loadAndValidateApplication(allocateCreate.getApplicationRoid(), now);
|
||||
String repoId = createDomainRepoId(ObjectifyService.allocateId(), registry.getTldStr());
|
||||
ImmutableSet.Builder<ImmutableObject> entitiesToSave = new ImmutableSet.Builder<>();
|
||||
HistoryEntry historyEntry = buildHistory(repoId, period, now);
|
||||
HistoryEntry historyEntry = buildHistoryEntry(repoId, period, now);
|
||||
entitiesToSave.add(historyEntry);
|
||||
ImmutableSet<? extends ImmutableObject> 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)
|
||||
|
|
|
@ -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<ImmutableObject> 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)
|
||||
|
|
|
@ -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().<ImmutableObject>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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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<ImmutableObject> 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())
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue