mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02: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:
parent
b84d7f1fb5
commit
1dbc5f6bb0
28 changed files with 489 additions and 426 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue