diff options
author | Brinda Santh <brindasanth@in.ibm.com> | 2019-08-05 09:50:15 -0400 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2019-08-09 21:51:14 +0000 |
commit | 977287b586e27e2f835a5d24950abf1f2adae8be (patch) | |
tree | 86200548402e907c6cf969bd4f0a516eed937ed0 /ms/blueprintsprocessor/modules/commons/db-lib | |
parent | 4001ac13397c082ee97c7ff440fa2ead5d50b421 (diff) |
Add resource definition resolution service.
Change-Id: Ife75d290540e3ed0e0dfd0a82785a498607a2d25
Issue-ID: CCSDK-1577
Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/db-lib')
2 files changed, 7 insertions, 8 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibConfiguration.kt index efefe0290..fd889bfbf 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibConfiguration.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibConfiguration.kt @@ -16,9 +16,10 @@ package org.onap.ccsdk.cds.blueprintsprocessor.db -import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BluePrintDBLibPropertySevice +import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDBLibGenericService +import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.context.annotation.Bean import org.springframework.context.annotation.ComponentScan @@ -39,15 +40,15 @@ open class BluePrintDBLibConfiguration(private var bluePrintProperties: BluePrin /** * Exposed Dependency Service by this SSH Lib Module */ -//TODO("right now not wired with name ") fun BluePrintDependencyService.dbLibPropertyService(): BluePrintDBLibPropertySevice = - instance(DBLibConstants.SERVICE_BLUEPRINT_DB_LIB_PROPERTY) + instance(BluePrintDBLibPropertySevice::class) + +fun BluePrintDependencyService.primaryDBLibGenericService(): BluePrintDBLibGenericService = + instance(PrimaryDBLibGenericService::class) class DBLibConstants { companion object { - //TODO("right now not wired with name ") - const val SERVICE_BLUEPRINT_DB_LIB_PROPERTY = "blueprint-db-lib-property-service" const val PREFIX_DB_PRIMARY: String = "blueprintsprocessor.db.primary" //list of database @@ -62,7 +63,5 @@ class DBLibConstants { const val DRIVER_MYSQL_DB = "com.mysql.jdbc.Driver" const val DRIVER_ORACLE_DB = "oracle.jdbc.driver.OracleDriver" const val DRIVER_POSTGRES_DB = "org.postgresql.Driver" - - } }
\ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BluePrintDBLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BluePrintDBLibPropertyService.kt index cf2ca550e..2ae50424f 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BluePrintDBLibPropertyService.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BluePrintDBLibPropertyService.kt @@ -32,7 +32,7 @@ class BluePrintDBLibPropertySevice(private var bluePrintProperties: BluePrintPro } fun JdbcTemplate(selector: String): BluePrintDBLibGenericService { - val prefix = "blueprintsprocessor.database.$selector" + val prefix = "blueprintsprocessor.db.$selector" val dBConnetionProperties = dBDataSourceProperties(prefix) return blueprintDBDataSourceService(dBConnetionProperties) } |