mirror of
https://github.com/google/nomulus
synced 2026-01-03 19:54:18 +00: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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user