Merge "fixed sonar issue in AssignVlanTagResponse"
[ccsdk/apps.git] / components / core / src / main / kotlin / org / onap / ccsdk / apps / controllerblueprints / core / service / PropertyAssignmentService.kt
index 131bb30..36c141f 100644 (file)
@@ -18,6 +18,8 @@
 package org.onap.ccsdk.apps.controllerblueprints.core.service\r
 \r
 \r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import com.fasterxml.jackson.databind.JsonNode\r
 import com.fasterxml.jackson.databind.node.NullNode\r
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants\r
@@ -26,19 +28,16 @@ import org.onap.ccsdk.apps.controllerblueprints.core.data.*
 import org.onap.ccsdk.apps.controllerblueprints.core.format\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.ResourceResolverUtils\r
-import com.att.eelf.configuration.EELFLogger\r
-import com.att.eelf.configuration.EELFManager\r
 \r
 /**\r
  *\r
  *\r
  * @author Brinda Santh\r
  */\r
-class PropertyAssignmentService(var context: MutableMap<String, Any>,\r
-                                var bluePrintRuntimeService: BluePrintRuntimeService) {\r
+class PropertyAssignmentService(var bluePrintRuntimeService: BluePrintRuntimeService<MutableMap<String, JsonNode>>) {\r
     private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
-    private var bluePrintContext: BluePrintContext = bluePrintRuntimeService.bluePrintContext\r
+    private var bluePrintContext: BluePrintContext = bluePrintRuntimeService.bluePrintContext()\r
 \r
 /*\r
 \r
@@ -198,8 +197,7 @@ If Property Assignment is Expression.
     }\r
 \r
     fun artifactContent(artifactDefinition: ArtifactDefinition): String {\r
-        val bluePrintBasePath: String = context[BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH] as? String\r
-                ?: throw BluePrintException(format("failed to get property (%s) from context", BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH))\r
+        val bluePrintBasePath: String = bluePrintContext.rootPath\r
 \r
         if (artifactDefinition.repository != null) {\r
             TODO()\r