From 7bbeeda4e4ff25a073c9d1a8992fe68aaf470e6b Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Fri, 30 Aug 2019 12:24:19 -0400 Subject: [PATCH] Refactor catalog service to blueprint processor. Change-Id: Ia4bfc7c1b3ffb4020458f18deb71a2cf451ab65e Issue-ID: CCSDK-1663 Signed-off-by: Brinda Santh --- .../modules/commons/db-lib/pom.xml | 4 -- .../db}/BlueprintCatalogServiceImpl.kt | 2 +- .../db/BlueprintProcessorCatalogServiceImpl.kt | 1 - .../BlueprintProcessorModelContentRepository.kt | 1 - .../BlueprintProcessorModelRepository.kt | 1 - .../ControllerBlueprintModelContentRepository.kt | 1 - .../ControllerBlueprintModelRepository.kt | 1 - .../primary}/repository/ModelContentRepository.kt | 4 +- .../db/primary}/repository/ModelRepository.kt | 2 +- .../db/BlueprintProcessorCatalogServiceImplTest.kt | 1 - .../load/ControllerBlueprintCatalogServiceImpl.kt | 2 +- .../modules/inbounds/resource-api/pom.xml | 4 -- ms/blueprintsprocessor/parent/pom.xml | 5 --- .../modules/db-resources/pom.xml | 48 ---------------------- .../resources/BlueprintCatalogServiceImplTest.kt | 21 ---------- ms/controllerblueprints/modules/pom.xml | 1 - ms/controllerblueprints/modules/service/pom.xml | 4 -- ms/controllerblueprints/parent/pom.xml | 5 --- 18 files changed, 5 insertions(+), 103 deletions(-) rename ms/{controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources => blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db}/BlueprintCatalogServiceImpl.kt (98%) rename ms/{controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources => blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary}/repository/ModelContentRepository.kt (96%) rename ms/{controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources => blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary}/repository/ModelRepository.kt (97%) delete mode 100644 ms/controllerblueprints/modules/db-resources/pom.xml delete mode 100644 ms/controllerblueprints/modules/db-resources/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/BlueprintCatalogServiceImplTest.kt diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml index f6288d784..783d8efbe 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml @@ -33,10 +33,6 @@ org.onap.ccsdk.cds.controllerblueprints blueprint-core - - org.onap.ccsdk.cds.controllerblueprints - db-resources - org.onap.ccsdk.cds.controllerblueprints blueprint-validation diff --git a/ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/BlueprintCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintCatalogServiceImpl.kt similarity index 98% rename from ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/BlueprintCatalogServiceImpl.kt rename to ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintCatalogServiceImpl.kt index 7244e00e5..4a1e8f194 100644 --- a/ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/BlueprintCatalogServiceImpl.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintCatalogServiceImpl.kt @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.onap.ccsdk.cds.controllerblueprints.db.resources +package org.onap.ccsdk.cds.blueprintsprocessor.db import org.onap.ccsdk.cds.controllerblueprints.core.* import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt index ce2aa95b5..1509e11f1 100755 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt @@ -28,7 +28,6 @@ import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintCompileCache import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils -import org.onap.ccsdk.cds.controllerblueprints.db.resources.BlueprintCatalogServiceImpl import org.slf4j.LoggerFactory import org.springframework.dao.DataIntegrityViolationException import org.springframework.stereotype.Service diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/BlueprintProcessorModelContentRepository.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/BlueprintProcessorModelContentRepository.kt index c914af8f3..e8cdee397 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/BlueprintProcessorModelContentRepository.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/BlueprintProcessorModelContentRepository.kt @@ -17,6 +17,5 @@ package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintProcessorModel import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintProcessorModelContent -import org.onap.ccsdk.cds.controllerblueprints.db.resources.repository.ModelContentRepository interface BlueprintProcessorModelContentRepository : ModelContentRepository \ 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/repository/BlueprintProcessorModelRepository.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/BlueprintProcessorModelRepository.kt index 4f22bf07d..e200184d6 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/BlueprintProcessorModelRepository.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/BlueprintProcessorModelRepository.kt @@ -16,6 +16,5 @@ package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintProcessorModel -import org.onap.ccsdk.cds.controllerblueprints.db.resources.repository.ModelRepository interface BlueprintProcessorModelRepository : ModelRepository diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ControllerBlueprintModelContentRepository.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ControllerBlueprintModelContentRepository.kt index 59b82a3da..3dbaf7b58 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ControllerBlueprintModelContentRepository.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ControllerBlueprintModelContentRepository.kt @@ -17,6 +17,5 @@ package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModel import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModelContent -import org.onap.ccsdk.cds.controllerblueprints.db.resources.repository.ModelContentRepository interface ControllerBlueprintModelContentRepository : ModelContentRepository diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ControllerBlueprintModelRepository.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ControllerBlueprintModelRepository.kt index c26475b1d..4e765cd28 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ControllerBlueprintModelRepository.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ControllerBlueprintModelRepository.kt @@ -16,6 +16,5 @@ package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModel -import org.onap.ccsdk.cds.controllerblueprints.db.resources.repository.ModelRepository interface ControllerBlueprintModelRepository : ModelRepository diff --git a/ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/repository/ModelContentRepository.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ModelContentRepository.kt similarity index 96% rename from ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/repository/ModelContentRepository.kt rename to ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ModelContentRepository.kt index a2c37593b..59f2a20f5 100644 --- a/ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/repository/ModelContentRepository.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ModelContentRepository.kt @@ -15,12 +15,12 @@ * limitations under the License. */ -package org.onap.ccsdk.cds.controllerblueprints.db.resources.repository +package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository import org.jetbrains.annotations.NotNull -import java.util.Optional import org.springframework.data.jpa.repository.JpaRepository import org.springframework.data.repository.NoRepositoryBean +import java.util.* /** * @param Model diff --git a/ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/repository/ModelRepository.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ModelRepository.kt similarity index 97% rename from ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/repository/ModelRepository.kt rename to ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ModelRepository.kt index c00b7b6e4..4ad14758c 100644 --- a/ms/controllerblueprints/modules/db-resources/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/repository/ModelRepository.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/repository/ModelRepository.kt @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.onap.ccsdk.cds.controllerblueprints.db.resources.repository +package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository import org.jetbrains.annotations.NotNull import org.springframework.data.jpa.repository.JpaRepository diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt index 1a1aa0b49..11cd90e7d 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt @@ -27,7 +27,6 @@ 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 diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ControllerBlueprintCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ControllerBlueprintCatalogServiceImpl.kt index e91f4918c..146eeeb4d 100755 --- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ControllerBlueprintCatalogServiceImpl.kt +++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ControllerBlueprintCatalogServiceImpl.kt @@ -26,7 +26,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPath -import org.onap.ccsdk.cds.controllerblueprints.db.resources.BlueprintCatalogServiceImpl +import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintCatalogServiceImpl import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModel import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModelContent import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository.ControllerBlueprintModelRepository diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml index 53c1e975b..e343a6f3b 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml @@ -37,10 +37,6 @@ blueprint-core - - 4.0.0 - - org.onap.ccsdk.cds.controllerblueprints - modules - 0.6.1-SNAPSHOT - - db-resources - Controller Blueprints DB Resources - - - - - - - org.onap.ccsdk.cds.controllerblueprints - blueprint-core - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.springframework.boot - spring-boot-starter-logging - - - - - diff --git a/ms/controllerblueprints/modules/db-resources/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/BlueprintCatalogServiceImplTest.kt b/ms/controllerblueprints/modules/db-resources/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/BlueprintCatalogServiceImplTest.kt deleted file mode 100644 index 9c08301de..000000000 --- a/ms/controllerblueprints/modules/db-resources/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/db/resources/BlueprintCatalogServiceImplTest.kt +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright © 2019 Bell Canada - * Modifications Copyright © 2019 Bell Canada. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.cds.controllerblueprints.db.resources - -// TODO -class BlueprintCatalogServiceImplTest \ No newline at end of file diff --git a/ms/controllerblueprints/modules/pom.xml b/ms/controllerblueprints/modules/pom.xml index 0b3d05192..07121226f 100644 --- a/ms/controllerblueprints/modules/pom.xml +++ b/ms/controllerblueprints/modules/pom.xml @@ -30,7 +30,6 @@ blueprint-core resource-dict - db-resources blueprint-validation service diff --git a/ms/controllerblueprints/modules/service/pom.xml b/ms/controllerblueprints/modules/service/pom.xml index d06669eb6..0d822514a 100644 --- a/ms/controllerblueprints/modules/service/pom.xml +++ b/ms/controllerblueprints/modules/service/pom.xml @@ -36,10 +36,6 @@ org.jetbrains.kotlinx kotlinx-coroutines-reactor - - org.onap.ccsdk.cds.controllerblueprints - db-resources - org.onap.ccsdk.cds.controllerblueprints blueprint-validation diff --git a/ms/controllerblueprints/parent/pom.xml b/ms/controllerblueprints/parent/pom.xml index 0026fe49c..ea0f4adb9 100644 --- a/ms/controllerblueprints/parent/pom.xml +++ b/ms/controllerblueprints/parent/pom.xml @@ -220,11 +220,6 @@ resource-dict ${project.version} - - org.onap.ccsdk.cds.controllerblueprints - db-resources - ${project.version} - org.onap.ccsdk.cds.controllerblueprints blueprint-validation -- 2.16.6