mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Fix nits on flows:
Rename existingResource flows variable to be specific to EPP resource type and replace some explicit checks with helper methods. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133774229
This commit is contained in:
parent
df70da48a2
commit
aed3c0f0d0
14 changed files with 125 additions and 156 deletions
|
@ -96,7 +96,7 @@ public class HostCreateFlow extends LoggedInFlow implements TransactionalFlow {
|
|||
}
|
||||
Builder builder = new Builder();
|
||||
command.applyTo(builder);
|
||||
HostResource newResource = builder
|
||||
HostResource newHost = builder
|
||||
.setCreationClientId(clientId)
|
||||
.setCurrentSponsorClientId(clientId)
|
||||
.setRepoId(createContactHostRoid(ObjectifyService.allocateId()))
|
||||
|
@ -106,12 +106,12 @@ public class HostCreateFlow extends LoggedInFlow implements TransactionalFlow {
|
|||
historyBuilder
|
||||
.setType(HistoryEntry.Type.HOST_CREATE)
|
||||
.setModificationTime(now)
|
||||
.setParent(Key.create(newResource));
|
||||
.setParent(Key.create(newHost));
|
||||
ImmutableSet<ImmutableObject> entitiesToSave = ImmutableSet.of(
|
||||
newResource,
|
||||
newHost,
|
||||
historyBuilder.build(),
|
||||
ForeignKeyIndex.create(newResource, newResource.getDeletionTime()),
|
||||
EppResourceIndex.create(Key.create(newResource)));
|
||||
ForeignKeyIndex.create(newHost, newHost.getDeletionTime()),
|
||||
EppResourceIndex.create(Key.create(newHost)));
|
||||
if (superordinateDomain.isPresent()) {
|
||||
entitiesToSave = union(
|
||||
entitiesToSave,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue