Fix conflicting catalog service instance names. 84/92384/1
authorBrinda Santh <brindasanth@in.ibm.com>
Wed, 31 Jul 2019 16:31:09 +0000 (12:31 -0400)
committerBrinda Santh <brindasanth@in.ibm.com>
Wed, 31 Jul 2019 16:31:09 +0000 (12:31 -0400)
Change-Id: Iec330d87f9609d42c05f8d4c7c8515fa37310a6e
Issue-ID: CCSDK-1046
Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
13 files changed:
ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockDatabaseConfiguration.kt
ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt
ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/PrimaryDatabaseConfiguration.kt
ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt
ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/mock/MockBlueprintProcessorCatalogServiceImpl.kt
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintManagementGRPCHandler.kt
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorService.kt
ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt
ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorService.kt
ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/handler/BluePrintModelHandler.kt
ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/BluePrintCatalogLoadService.kt
ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ControllerBlueprintCatalogServiceImpl.kt

index 22e043b..7644df3 100644 (file)
  */
 package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock
 
+import io.mockk.every
 import io.mockk.mockk
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
 import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
 import org.springframework.context.annotation.Bean
 import org.springframework.context.annotation.Configuration
 
@@ -33,9 +35,12 @@ open class MockDatabaseConfiguration {
 @Configuration
 open class MockBlueprintProcessorCatalogServiceImpl {
 
-    @Bean(name = ["blueprintProcessorCatalogServiceImpl"])
-    open fun createBlueprintProcessorCatalogServiceImpl(): BluePrintValidatorService {
-        return mockk<BluePrintValidatorService>()
+    @Bean(name = ["bluePrintRuntimeValidatorService"])
+    open fun bluePrintRuntimeValidatorService(): BluePrintValidatorService {
+        val bluePrintValidatorService = mockk<BluePrintValidatorService>()
+        every { bluePrintValidatorService.validateBluePrints(any<String>()) } returns true
+        every { bluePrintValidatorService.validateBluePrints(any<BluePrintRuntimeService<*>>()) } returns true
+        return bluePrintValidatorService
     }
 
 
index 9faf879..9d5d630 100755 (executable)
@@ -39,7 +39,7 @@ import java.util.*
 /**
  * Similar/Duplicate implementation in [org.onap.ccsdk.cds.controllerblueprints.service.load.ControllerBlueprintCatalogServiceImpl]
  */
-@Service
+@Service("blueprintsProcessorCatalogService")
 class BlueprintProcessorCatalogServiceImpl(bluePrintRuntimeValidatorService: BluePrintValidatorService,
                                            private val bluePrintPathConfiguration: BluePrintPathConfiguration,
                                            private val blueprintModelRepository: BlueprintProcessorModelRepository)
index 4ea407a..a628670 100644 (file)
@@ -21,6 +21,7 @@ import org.slf4j.LoggerFactory
 import org.springframework.context.annotation.Bean
 import org.springframework.context.annotation.Configuration
 import org.springframework.context.annotation.Primary
+import org.springframework.data.jpa.repository.config.EnableJpaAuditing
 import org.springframework.data.jpa.repository.config.EnableJpaRepositories
 import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
 import org.springframework.jdbc.datasource.DriverManagerDataSource
@@ -33,10 +34,12 @@ import javax.sql.DataSource
 
 @Configuration
 @EnableJpaRepositories(
-    basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor.*"],
-    entityManagerFactoryRef = "primaryEntityManager",
-    transactionManagerRef = "primaryTransactionManager"
+        basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor.*",
+            "org.onap.ccsdk.cds.controllerblueprints.*"],
+        entityManagerFactoryRef = "primaryEntityManager",
+        transactionManagerRef = "primaryTransactionManager"
 )
+@EnableJpaAuditing
 open class PrimaryDatabaseConfiguration(private val primaryDataSourceProperties: PrimaryDataSourceProperties) {
     val log = LoggerFactory.getLogger(PrimaryDatabaseConfiguration::class.java)!!
 
@@ -45,7 +48,8 @@ open class PrimaryDatabaseConfiguration(private val primaryDataSourceProperties:
     open fun primaryEntityManager(): LocalContainerEntityManagerFactoryBean {
         val em = LocalContainerEntityManagerFactoryBean()
         em.dataSource = primaryDataSource()
-        em.setPackagesToScan("org.onap.ccsdk.cds.blueprintsprocessor.*")
+        em.setPackagesToScan("org.onap.ccsdk.cds.blueprintsprocessor.*",
+                "org.onap.ccsdk.cds.controllerblueprints.*")
         em.jpaVendorAdapter = HibernateJpaVendorAdapter()
         val properties = HashMap<String, Any>()
         properties["hibernate.hbm2ddl.auto"] = primaryDataSourceProperties.hibernateHbm2ddlAuto
index e40efd0..fe8172b 100644 (file)
@@ -20,14 +20,14 @@ package org.onap.ccsdk.cds.blueprintsprocessor.db
 import kotlinx.coroutines.runBlocking
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
-import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
 import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.mock.MockBlueprintProcessorCatalogServiceImpl
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
+import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
 import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.db.resources.BlueprintCatalogServiceImpl
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration
 import org.springframework.context.annotation.ComponentScan
@@ -41,17 +41,14 @@ import kotlin.test.assertTrue
 
 @RunWith(SpringRunner::class)
 @EnableAutoConfiguration
-@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor"])
 @ContextConfiguration(classes = [BlueprintProcessorCatalogServiceImpl::class, BluePrintCoreConfiguration::class,
     MockBlueprintProcessorCatalogServiceImpl::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 class BlueprintProcessorCatalogServiceImplTest {
 
     @Autowired
-    lateinit var blueprintCatalog: BluePrintCatalogService
-
-    @Autowired
-    lateinit var blueprintProcessorCatalogServiceImpl: BlueprintProcessorCatalogServiceImpl
+    lateinit var blueprintsProcessorCatalogService: BlueprintCatalogServiceImpl
 
     @Autowired
     lateinit var blueprintCoreConfiguration: BluePrintCoreConfiguration
@@ -64,7 +61,7 @@ class BlueprintProcessorCatalogServiceImplTest {
     fun setup() {
         deleteDir("target", "blueprints")
         bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(blueprintId,
-                    "./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration")
+                "./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration")
     }
 
     @AfterTest
@@ -81,10 +78,10 @@ class BlueprintProcessorCatalogServiceImplTest {
             val file = normalizedFile("./src/test/resources/test-cba.zip")
             assertTrue(file.exists(), "couldn't get file ${file.absolutePath}")
 
-            blueprintCatalog.saveToDatabase("1234", file)
-            blueprintCatalog.getFromDatabase("baseconfiguration", "1.0.0")
+            blueprintsProcessorCatalogService.saveToDatabase("1234", file)
+            blueprintsProcessorCatalogService.getFromDatabase("baseconfiguration", "1.0.0")
 
-            blueprintCatalog.deleteFromDatabase("baseconfiguration", "1.0.0")
+            blueprintsProcessorCatalogService.deleteFromDatabase("baseconfiguration", "1.0.0")
         }
     }
 
@@ -96,7 +93,7 @@ class BlueprintProcessorCatalogServiceImplTest {
             val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
             metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
 
-            blueprintProcessorCatalogServiceImpl.save(metadata, file)
+            blueprintsProcessorCatalogService.save(metadata, file)
         }
     }
 
@@ -108,8 +105,8 @@ class BlueprintProcessorCatalogServiceImplTest {
             val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
             metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
 
-            blueprintProcessorCatalogServiceImpl.save(metadata, file)
-            blueprintProcessorCatalogServiceImpl.get("baseconfiguration", "1.0.0", true)
+            blueprintsProcessorCatalogService.save(metadata, file)
+            blueprintsProcessorCatalogService.get("baseconfiguration", "1.0.0", true)
         }
 
         assertTrue(File(blueprintCoreConfiguration.bluePrintPathConfiguration().blueprintArchivePath +
@@ -121,7 +118,7 @@ class BlueprintProcessorCatalogServiceImplTest {
     @Test
     fun `test delete function`() {
         runBlocking {
-            blueprintProcessorCatalogServiceImpl.delete("baseconfiguration", "1.0.0")
+            blueprintsProcessorCatalogService.delete("baseconfiguration", "1.0.0")
         }
     }
 }
\ No newline at end of file
index 08de332..b98fc0c 100644 (file)
  */
 package org.onap.ccsdk.cds.blueprintsprocessor.db.mock
 
+import io.mockk.every
 import io.mockk.mockk
 import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
 import org.springframework.context.annotation.Bean
 import org.springframework.context.annotation.Configuration
+
 @Configuration
 open class MockBlueprintProcessorCatalogServiceImpl {
 
-    @Bean(name = ["blueprintProcessorCatalogServiceImpl"])
-    open fun createBlueprintProcessorCatalogServiceImpl(): BluePrintValidatorService {
-        return mockk<BluePrintValidatorService>()
+    @Bean(name = ["bluePrintRuntimeValidatorService"])
+    open fun bluePrintRuntimeValidatorService(): BluePrintValidatorService {
+        val bluePrintValidatorService = mockk<BluePrintValidatorService>()
+        every { bluePrintValidatorService.validateBluePrints(any<String>()) } returns true
+        every { bluePrintValidatorService.validateBluePrints(any<BluePrintRuntimeService<*>>()) } returns true
+        return bluePrintValidatorService
     }
 }
\ No newline at end of file
index 549d6cd..81f3ec3 100644 (file)
@@ -41,7 +41,7 @@ import java.util.*
 
 @Service
 open class BluePrintManagementGRPCHandler(private val bluePrintPathConfiguration: BluePrintPathConfiguration,
-                                          private val bluePrintCatalogService: BluePrintCatalogService)
+                                          private val blueprintsProcessorCatalogService: BluePrintCatalogService)
     : BluePrintManagementServiceGrpc.BluePrintManagementServiceImplBase() {
 
     private val log = LoggerFactory.getLogger(BluePrintManagementGRPCHandler::class.java)
@@ -58,7 +58,7 @@ open class BluePrintManagementGRPCHandler(private val bluePrintPathConfiguration
 
                 saveToDisk(request, cbaFile)
 
-                val blueprintId = bluePrintCatalogService.saveToDatabase(uploadId, cbaFile)
+                val blueprintId = blueprintsProcessorCatalogService.saveToDatabase(uploadId, cbaFile)
                 responseObserver.onNext(successStatus("Successfully uploaded CBA($blueprintId)...", request.commonHeader))
                 responseObserver.onCompleted()
             } catch (e: Exception) {
@@ -83,7 +83,7 @@ open class BluePrintManagementGRPCHandler(private val bluePrintPathConfiguration
 
 
             try {
-                bluePrintCatalogService.deleteFromDatabase(blueprintName, blueprintVersion)
+                blueprintsProcessorCatalogService.deleteFromDatabase(blueprintName, blueprintVersion)
                 responseObserver.onNext(successStatus("Successfully deleted $blueprint", request.commonHeader))
                 responseObserver.onCompleted()
             } catch (e: Exception) {
index 347e5ea..094fb68 100644 (file)
@@ -17,7 +17,6 @@
 
 package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api
 
-import com.fasterxml.jackson.databind.node.JsonNodeFactory
 import io.grpc.stub.StreamObserver
 import kotlinx.coroutines.Dispatchers
 import kotlinx.coroutines.GlobalScope
@@ -42,7 +41,7 @@ import java.util.stream.Collectors
 
 @Service
 class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintPathConfiguration,
-                              private val bluePrintCatalogService: BluePrintCatalogService,
+                              private val blueprintsProcessorCatalogService: BluePrintCatalogService,
                               private val bluePrintWorkflowExecutionService
                               : BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput>) {
 
@@ -59,7 +58,7 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP
             // Copy the File Part to Local File
             copyFromFilePart(filePart, compressedFile)
             // Save the Copied file to Database
-            return bluePrintCatalogService.saveToDatabase(saveId, compressedFile, true)
+            return blueprintsProcessorCatalogService.saveToDatabase(saveId, compressedFile, true)
         } catch (e: IOException) {
             throw BluePrintException(ErrorCode.IO_FILE_INTERRUPT.value,
                 "Error in Upload CBA: ${e.message}", e)
@@ -70,7 +69,7 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP
     }
 
     suspend fun remove(name: String, version: String) {
-        bluePrintCatalogService.deleteFromDatabase(name, version)
+        blueprintsProcessorCatalogService.deleteFromDatabase(name, version)
     }
 
     suspend fun process(executionServiceInput: ExecutionServiceInput,
@@ -102,7 +101,7 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP
         val blueprintName = actionIdentifiers.blueprintName
         val blueprintVersion = actionIdentifiers.blueprintVersion
         try {
-            val basePath = bluePrintCatalogService.getFromDatabase(blueprintName, blueprintVersion)
+            val basePath = blueprintsProcessorCatalogService.getFromDatabase(blueprintName, blueprintVersion)
             log.info("blueprint base path $basePath")
 
             val blueprintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(requestId, basePath.toString())
index 707439d..ab0d425 100644 (file)
@@ -21,7 +21,7 @@ import org.onap.ccsdk.cds.controllerblueprints.validation.BluePrintDesignTimeVal
 import org.onap.ccsdk.cds.controllerblueprints.validation.extension.ResourceDefinitionValidator
 import org.springframework.stereotype.Service
 
-@Service
+@Service("bluePrintRuntimeValidatorService")
 open class BluePrintRuntimeValidatorService(bluePrintTypeValidatorService: BluePrintTypeValidatorService,
                                             resourceDefinitionValidator: ResourceDefinitionValidator)
     : BluePrintDesignTimeValidatorService(bluePrintTypeValidatorService, resourceDefinitionValidator)
index e5f1cbf..ba2f070 100644 (file)
@@ -20,7 +20,6 @@ import com.fasterxml.jackson.databind.JsonNode
 import org.junit.Test
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
 import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
 import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
 import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
 import kotlin.test.assertNotNull
@@ -157,7 +156,7 @@ class BluePrintDSLTest {
         assertNotNull(serviceTemplate.topologyTemplate, "failed to get topology template")
         assertNotNull(serviceTemplate.topologyTemplate?.nodeTemplates, "failed to get nodeTypes")
         assertNotNull(serviceTemplate.topologyTemplate?.nodeTemplates!!["activate"], "failed to get nodeTypes(activate)")
-        println(serviceTemplate.asJsonString(true))
+        //println(serviceTemplate.asJsonString(true))
     }
 
     @Test
index c67a9bc..9ffd78f 100644 (file)
@@ -17,7 +17,6 @@
 
 package org.onap.ccsdk.cds.controllerblueprints.validation
 
-import org.slf4j.LoggerFactory
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
 import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
@@ -28,12 +27,13 @@ import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants
 import org.onap.ccsdk.cds.controllerblueprints.validation.extension.ResourceDefinitionValidator
+import org.slf4j.LoggerFactory
 import org.springframework.stereotype.Service
 import java.io.File
 import java.util.*
 
 
-@Service
+@Service("bluePrintDesignTimeValidatorService")
 open class BluePrintDesignTimeValidatorService(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService,
                                                private val resourceDefinitionValidator: ResourceDefinitionValidator)
     : BluePrintValidatorService {
index c54bf87..f40da68 100644 (file)
@@ -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()
 
index 58e89d8..9e456c7 100644 (file)
@@ -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}")
         }
index 3d6e134..0e7a7d9 100755 (executable)
@@ -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())