aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src
diff options
context:
space:
mode:
authorBrinda Santh <brindasanth@in.ibm.com>2019-07-31 12:31:09 -0400
committerBrinda Santh <brindasanth@in.ibm.com>2019-07-31 12:31:09 -0400
commit82753f0646ae2181baf247f51d2909058dcc3707 (patch)
treef210b615c87483a0f315ab193a4e876da21e68c6 /ms/controllerblueprints/modules/service/src
parentd8183b1c5fb1a6ee0cd85fa0f65a10912a1ba529 (diff)
Fix conflicting catalog service instance names.
Change-Id: Iec330d87f9609d42c05f8d4c7c8515fa37310a6e Issue-ID: CCSDK-1046 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/src')
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/handler/BluePrintModelHandler.kt6
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/BluePrintCatalogLoadService.kt5
-rwxr-xr-xms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ControllerBlueprintCatalogServiceImpl.kt6
3 files changed, 8 insertions, 9 deletions
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/handler/BluePrintModelHandler.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/handler/BluePrintModelHandler.kt
index c54bf87fe..f40da68f6 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/handler/BluePrintModelHandler.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/handler/BluePrintModelHandler.kt
@@ -50,7 +50,7 @@ import java.util.*
*/
@Service
-open class BluePrintModelHandler(private val bluePrintCatalogService: BluePrintCatalogService,
+open class BluePrintModelHandler(private val controllerBlueprintsCatalogService: BluePrintCatalogService,
private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
private val blueprintModelSearchRepository: ControllerBlueprintModelSearchRepository,
private val blueprintModelRepository: ControllerBlueprintModelRepository,
@@ -86,7 +86,7 @@ open class BluePrintModelHandler(private val bluePrintCatalogService: BluePrintC
// Copy the File Part to Local File
BluePrintEnhancerUtils.copyFromFilePart(filePart, deCompressedFile)
// Save the Copied file to Database
- val blueprintId = bluePrintCatalogService.saveToDatabase(saveId, deCompressedFile, false)
+ val blueprintId = controllerBlueprintsCatalogService.saveToDatabase(saveId, deCompressedFile, false)
// Check and Return the Saved File
val blueprintModelSearch = blueprintModelSearchRepository.findById(blueprintId).get()
log.info("Save($saveId) successful for blueprint(${blueprintModelSearch.artifactName}) " +
@@ -315,7 +315,7 @@ open class BluePrintModelHandler(private val bluePrintCatalogService: BluePrintC
val compressedFilePart = BluePrintEnhancerUtils
.extractCompressFilePart(filePart, blueprintArchive, blueprintWorkingDir)
- val blueprintId = bluePrintCatalogService.saveToDatabase(publishId, compressedFilePart, true)
+ val blueprintId = controllerBlueprintsCatalogService.saveToDatabase(publishId, compressedFilePart, true)
return blueprintModelSearchRepository.findById(blueprintId).get()
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/BluePrintCatalogLoadService.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/BluePrintCatalogLoadService.kt
index 58e89d8d2..9e456c7f9 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/BluePrintCatalogLoadService.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/BluePrintCatalogLoadService.kt
@@ -22,14 +22,13 @@ import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
import org.apache.commons.lang.text.StrBuilder
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
-import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
import java.io.File
import java.util.*
@Service
-open class BluePrintCatalogLoadService(private val bluePrintCatalogService: BluePrintCatalogService) {
+open class BluePrintCatalogLoadService(private val controllerBlueprintsCatalogService: BluePrintCatalogService) {
private val log = LoggerFactory.getLogger(BluePrintCatalogLoadService::class.java)
@@ -62,7 +61,7 @@ open class BluePrintCatalogLoadService(private val bluePrintCatalogService: Blue
open suspend fun loadBluePrintModelCatalog(errorBuilder: StrBuilder, file: File) {
try {
- bluePrintCatalogService.saveToDatabase(UUID.randomUUID().toString(), file)
+ controllerBlueprintsCatalogService.saveToDatabase(UUID.randomUUID().toString(), file)
} catch (e: Exception) {
errorBuilder.appendln("Couldn't load BlueprintModel(${file.name}: ${e.message}")
}
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ControllerBlueprintCatalogServiceImpl.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ControllerBlueprintCatalogServiceImpl.kt
index 3d6e134d4..0e7a7d94a 100755
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ControllerBlueprintCatalogServiceImpl.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ControllerBlueprintCatalogServiceImpl.kt
@@ -41,11 +41,11 @@ import java.util.*
/**
* Similar implementation in [org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintProcessorCatalogServiceImpl]
*/
-@Service
-class ControllerBlueprintCatalogServiceImpl(bluePrintValidatorService: BluePrintValidatorService,
+@Service("controllerBlueprintsCatalogService")
+class ControllerBlueprintCatalogServiceImpl(bluePrintDesignTimeValidatorService: BluePrintValidatorService,
private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
private val blueprintModelRepository: ControllerBlueprintModelRepository)
- : BlueprintCatalogServiceImpl(bluePrintLoadConfiguration, bluePrintValidatorService) {
+ : BlueprintCatalogServiceImpl(bluePrintLoadConfiguration, bluePrintDesignTimeValidatorService) {
private val log = LoggerFactory.getLogger(ControllerBlueprintCatalogServiceImpl::class.toString())