From a07209f3327340cbbd4ddf8051ec7775153e1121 Mon Sep 17 00:00:00 2001 From: Jozsef Csongvai Date: Mon, 16 May 2022 11:03:43 -0400 Subject: Re-enable formatting and fix formatting issues Issue-ID: CCSDK-3657 Signed-off-by: Jozsef Csongvai Change-Id: Idd1871e82a319325b042c339741a66c06499692c --- .../resource/resolution/ResourceResolutionExtensions.kt | 6 +++--- .../resource/resolution/ResourceResolutionService.kt | 5 +++-- .../resource/resolution/db/ResourceResolution.kt | 17 ++++++++++------- .../resource/resolution/db/TemplateResolution.kt | 15 +++++++++------ .../resolution/db/TemplateResolutionSelector.kt | 2 +- .../resource/resolution/db/TemplateResolutionService.kt | 4 ++-- 6 files changed, 28 insertions(+), 21 deletions(-) (limited to 'ms/blueprintsprocessor/functions/resource-resolution') diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt index f7d41bcc3..38c5baa09 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt @@ -46,7 +46,7 @@ suspend fun AbstractComponentFunction.storedResolutionKeysForArtifactNameNB( .resolveResolutionKeysFromDatabase(bluePrintRuntimeService, artifactName) } -suspend fun AbstractComponentFunction.storedArtifactNamesAndResolutionKeysNB(): Map> { +suspend fun AbstractComponentFunction.storedArtifactNamesAndResolutionKeysNB(): Map> { return BluePrintDependencyService.resourceResolutionService() .resolveArtifactNamesAndResolutionKeysFromDatabase(bluePrintRuntimeService) } @@ -84,5 +84,5 @@ fun AbstractComponentFunction.storedContentFromResolvedArtifact(resolutionKey: S } fun AbstractComponentFunction.contentFromResolvedArtifact(artifactPrefix: String): String = runBlocking { - contentFromResolvedArtifactNB(artifactPrefix) - } \ No newline at end of file + contentFromResolvedArtifactNB(artifactPrefix) +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt index 2352c7dbe..df07b8e03 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt @@ -145,7 +145,8 @@ open class ResourceResolutionServiceImpl( } override suspend fun resolveArtifactNamesAndResolutionKeysFromDatabase( - bluePrintRuntimeService: BluePrintRuntimeService<*>): Map> { + bluePrintRuntimeService: BluePrintRuntimeService<*> + ): Map> { return templateResolutionDBService.findArtifactNamesAndResolutionKeysByBlueprintNameAndBlueprintVersion( bluePrintRuntimeService ) @@ -498,4 +499,4 @@ open class ResourceResolutionServiceImpl( properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_OCCURRENCE].asJsonPrimitive() ) } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt index 40a447d8b..8b0f75c96 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt @@ -35,13 +35,16 @@ import javax.persistence.TemporalType @EntityListeners(AuditingEntityListener::class) @Entity -@Table(name = "RESOURCE_RESOLUTION", -indexes = [Index(name = "idx_rr_bpnameversion", columnList = "blueprint_name, blueprint_version"), - Index(name = "idx_rr_resolution_key", columnList = "resolution_key"), - Index(name = "idx_rr_name", columnList = "name"), - Index(name = "idx_rr_artifact_name", columnList = "artifact_name"), - Index(name = "idx_rr_resource_idtype", columnList = "resource_id, resource_type") -]) +@Table( + name = "RESOURCE_RESOLUTION", + indexes = [ + Index(name = "idx_rr_bpnameversion", columnList = "blueprint_name, blueprint_version"), + Index(name = "idx_rr_resolution_key", columnList = "resolution_key"), + Index(name = "idx_rr_name", columnList = "name"), + Index(name = "idx_rr_artifact_name", columnList = "artifact_name"), + Index(name = "idx_rr_resource_idtype", columnList = "resource_id, resource_type") + ] +) @Proxy(lazy = false) class ResourceResolution : Serializable { diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt index 46e0d4569..6a7a2cd17 100755 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt @@ -35,12 +35,15 @@ import javax.persistence.TemporalType @EntityListeners(AuditingEntityListener::class) @Entity -@Table(name = "TEMPLATE_RESOLUTION", indexes = [ - Index(name = "idx_tr_bpnameversion", columnList = "blueprint_name, blueprint_version"), - Index(name = "idx_tr_resource_idtype", columnList = "resource_id, resource_type"), - Index(name = "idx_tr_artifact_name", columnList = "artifact_name"), - Index(name = "idx_tr_resolution_key", columnList = "resolution_key") -]) +@Table( + name = "TEMPLATE_RESOLUTION", + indexes = [ + Index(name = "idx_tr_bpnameversion", columnList = "blueprint_name, blueprint_version"), + Index(name = "idx_tr_resource_idtype", columnList = "resource_id, resource_type"), + Index(name = "idx_tr_artifact_name", columnList = "artifact_name"), + Index(name = "idx_tr_resolution_key", columnList = "resolution_key") + ] +) @Proxy(lazy = false) class TemplateResolution : Serializable { diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionSelector.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionSelector.kt index 4fadf969c..c069a9a80 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionSelector.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionSelector.kt @@ -3,4 +3,4 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db interface TemplateResolutionSelector { fun getArtifactName(): String fun getResolutionKey(): String -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt index fd4cc8cd6..8789ade99 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt @@ -93,7 +93,7 @@ class TemplateResolutionService(private val templateResolutionRepository: Templa suspend fun findArtifactNamesAndResolutionKeysByBlueprintNameAndBlueprintVersion( bluePrintRuntimeService: BluePrintRuntimeService<*>, occurrence: Int = 1 - ): Map> = + ): Map> = withContext(Dispatchers.IO) { val metadata = bluePrintRuntimeService.bluePrintContext().metadata!! @@ -241,4 +241,4 @@ class TemplateResolutionService(private val templateResolutionRepository: Templa throw BluePrintException("Failed to store resource api result.", ex) } } -} \ No newline at end of file +} -- cgit 1.2.3-korg