mirror of
https://github.com/google/nomulus
synced 2026-01-08 07:11:44 +00:00
Replace command.applyTo() with inlined builder operations
These are much easier to understand. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=137446273
This commit is contained in:
@@ -146,9 +146,7 @@ public class DomainAllocateFlow extends Flow implements TransactionalFlow {
|
||||
domainName, application, historyEntry, isSunrushAddGracePeriod, registry, years);
|
||||
entitiesToSave.addAll(billsAndPolls);
|
||||
DateTime registrationExpirationTime = leapSafeAddYears(now, years);
|
||||
DomainResource.Builder domainBuilder = new DomainResource.Builder();
|
||||
command.applyTo(domainBuilder);
|
||||
DomainResource newDomain = domainBuilder
|
||||
DomainResource newDomain = new DomainResource.Builder()
|
||||
.setCreationClientId(clientId)
|
||||
.setCurrentSponsorClientId(clientId)
|
||||
.setRepoId(repoId)
|
||||
@@ -167,6 +165,11 @@ public class DomainAllocateFlow extends Flow implements TransactionalFlow {
|
||||
.setStatusValues(ReservationType.NAME_COLLISION == getReservationType(domainName)
|
||||
? ImmutableSet.of(StatusValue.SERVER_HOLD)
|
||||
: ImmutableSet.<StatusValue>of())
|
||||
.setRegistrant(command.getRegistrant())
|
||||
.setAuthInfo(command.getAuthInfo())
|
||||
.setFullyQualifiedDomainName(targetId)
|
||||
.setNameservers(command.getNameservers())
|
||||
.setContacts(command.getContacts())
|
||||
.build();
|
||||
entitiesToSave.add(
|
||||
newDomain,
|
||||
|
||||
Reference in New Issue
Block a user