From ee40d450585b13a5a6443946b5013e4ef64a9920 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh(bs2796)" Date: Mon, 12 Nov 2018 12:32:25 -0500 Subject: Controller Blueprints Component Core Modify test case blueprint data pointing to model catalog location. Change-Id: I601eddf899516b01ae8624c96aa13c5e236c8e5b Issue-ID: CCSDK-678 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) --- .../core/factory/BluePrintParserFactory.kt | 51 ---------------------- .../core/service/PropertyAssignmentService.kt | 4 +- 2 files changed, 2 insertions(+), 53 deletions(-) delete mode 100644 components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt (limited to 'components/core/src/main') diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt deleted file mode 100644 index 83233abc..00000000 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * 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.apps.controllerblueprints.core.factory - -import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintParserDefaultService -import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintParserService -import com.att.eelf.configuration.EELFLogger -import com.att.eelf.configuration.EELFManager - -/** - * - * BluePrintParserFactory - * @author Brinda Santh - */ - -object BluePrintParserFactory { - private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString()) - - var bluePrintParserServices: MutableMap = HashMap() - - init { - log.info("Initialised default BluePrintParser Service ") - bluePrintParserServices.put(org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants.TYPE_DEFAULT, BluePrintParserDefaultService()) - } - - fun register(key:String, bluePrintParserService: BluePrintParserService){ - bluePrintParserServices.put(key, bluePrintParserService) - } - - /** - * Called by clients to get a Blueprint Parser for the Blueprint parser type - */ - fun instance(key : String) : BluePrintParserService? { - return bluePrintParserServices.get(key) - } -} - diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt index 5b511f15..947eb41e 100644 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt @@ -197,8 +197,8 @@ If Property Assignment is Expression. } fun artifactContent(artifactDefinition: ArtifactDefinition): String { - val bluePrintBasePath: String = bluePrintRuntimeService.get(BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH) as? String - ?: throw BluePrintException(format("failed to get property (%s) from context", BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH)) + val bluePrintBasePath: String = bluePrintRuntimeService.get(BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH)?.asText() + ?: throw BluePrintException("failed to get property (${BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH}) from getStore") if (artifactDefinition.repository != null) { TODO() -- cgit 1.2.3-korg