Migrate ccsdk/apps to ccsdk/cds
[ccsdk/cds.git] / ms / blueprintsprocessor / functions / resource-resolution / src / main / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / functions / resource / resolution / ResourceAssignmentRuntimeService.kt
@@ -1,88 +1,88 @@
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution\r
-\r
-import com.fasterxml.jackson.databind.JsonNode\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException\r
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext\r
-import org.onap.ccsdk.apps.controllerblueprints.core.service.DefaultBluePrintRuntimeService\r
-\r
-class ResourceAssignmentRuntimeService(private var id: String, private var bluePrintContext: BluePrintContext)\r
-    : DefaultBluePrintRuntimeService(id, bluePrintContext) {\r
-\r
-    private lateinit var resolutionId: String\r
-    private var resourceStore: MutableMap<String, JsonNode> = hashMapOf()\r
-\r
-    fun createUniqueId(key: String) {\r
-        resolutionId = "$id-$key"\r
-    }\r
-\r
-    fun cleanResourceStore() {\r
-        resourceStore.clear()\r
-    }\r
-\r
-    fun putResolutionStore(key: String, value: JsonNode) {\r
-        resourceStore[key] = value\r
-    }\r
-\r
-    fun getResolutionStore(key: String): JsonNode {\r
-        return resourceStore[key]\r
-                ?: throw BluePrintProcessorException("failed to get execution property ($key)")\r
-    }\r
-\r
-    fun checkResolutionStore(key: String): Boolean {\r
-        return resourceStore.containsKey(key)\r
-    }\r
-\r
-    fun getJsonNodeFromResolutionStore(key: String): JsonNode {\r
-        return getResolutionStore(key)\r
-    }\r
-\r
-    fun getStringFromResolutionStore(key: String): String? {\r
-        return getResolutionStore(key).asText()\r
-    }\r
-\r
-    fun getBooleanFromResolutionStore(key: String): Boolean? {\r
-        return getResolutionStore(key).asBoolean()\r
-    }\r
-\r
-    fun getIntFromResolutionStore(key: String): Int? {\r
-        return getResolutionStore(key).asInt()\r
-    }\r
-\r
-    fun getDoubleFromResolutionStore(key: String): Double? {\r
-        return getResolutionStore(key).asDouble()\r
-    }\r
-\r
-    fun putDictionaryStore(key: String, value: JsonNode) {\r
-        resourceStore["dictionary-$key"] = value\r
-    }\r
-\r
-    fun getDictionaryStore(key: String): JsonNode {\r
-        return resourceStore["dictionary-$key"]\r
-                ?: throw BluePrintProcessorException("failed to get execution property (dictionary-$key)")\r
-    }\r
-\r
-    fun checkDictionaryStore(key: String): Boolean {\r
-        return resourceStore.containsKey("dictionary-$key")\r
-    }\r
-\r
-    fun getJsonNodeFromDictionaryStore(key: String): JsonNode {\r
-        return getResolutionStore("dictionary-$key")\r
-    }\r
-\r
-    fun getStringFromDictionaryStore(key: String): String? {\r
-        return getResolutionStore("dictionary-$key").asText()\r
-    }\r
-\r
-    fun getBooleanFromDictionaryStore(key: String): Boolean? {\r
-        return getResolutionStore("dictionary-$key").asBoolean()\r
-    }\r
-\r
-    fun getIntFromDictionaryStore(key: String): Int? {\r
-        return getResolutionStore("dictionary-$key").asInt()\r
-    }\r
-\r
-    fun getDoubleFromDictionaryStore(key: String): Double? {\r
-        return getResolutionStore("dictionary-$key").asDouble()\r
-    }\r
-\r
-}\r
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
+
+import com.fasterxml.jackson.databind.JsonNode
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+
+class ResourceAssignmentRuntimeService(private var id: String, private var bluePrintContext: BluePrintContext)
+    : DefaultBluePrintRuntimeService(id, bluePrintContext) {
+
+    private lateinit var resolutionId: String
+    private var resourceStore: MutableMap<String, JsonNode> = hashMapOf()
+
+    fun createUniqueId(key: String) {
+        resolutionId = "$id-$key"
+    }
+
+    fun cleanResourceStore() {
+        resourceStore.clear()
+    }
+
+    fun putResolutionStore(key: String, value: JsonNode) {
+        resourceStore[key] = value
+    }
+
+    fun getResolutionStore(key: String): JsonNode {
+        return resourceStore[key]
+                ?: throw BluePrintProcessorException("failed to get execution property ($key)")
+    }
+
+    fun checkResolutionStore(key: String): Boolean {
+        return resourceStore.containsKey(key)
+    }
+
+    fun getJsonNodeFromResolutionStore(key: String): JsonNode {
+        return getResolutionStore(key)
+    }
+
+    fun getStringFromResolutionStore(key: String): String? {
+        return getResolutionStore(key).asText()
+    }
+
+    fun getBooleanFromResolutionStore(key: String): Boolean? {
+        return getResolutionStore(key).asBoolean()
+    }
+
+    fun getIntFromResolutionStore(key: String): Int? {
+        return getResolutionStore(key).asInt()
+    }
+
+    fun getDoubleFromResolutionStore(key: String): Double? {
+        return getResolutionStore(key).asDouble()
+    }
+
+    fun putDictionaryStore(key: String, value: JsonNode) {
+        resourceStore["dictionary-$key"] = value
+    }
+
+    fun getDictionaryStore(key: String): JsonNode {
+        return resourceStore["dictionary-$key"]
+                ?: throw BluePrintProcessorException("failed to get execution property (dictionary-$key)")
+    }
+
+    fun checkDictionaryStore(key: String): Boolean {
+        return resourceStore.containsKey("dictionary-$key")
+    }
+
+    fun getJsonNodeFromDictionaryStore(key: String): JsonNode {
+        return getResolutionStore("dictionary-$key")
+    }
+
+    fun getStringFromDictionaryStore(key: String): String? {
+        return getResolutionStore("dictionary-$key").asText()
+    }
+
+    fun getBooleanFromDictionaryStore(key: String): Boolean? {
+        return getResolutionStore("dictionary-$key").asBoolean()
+    }
+
+    fun getIntFromDictionaryStore(key: String): Int? {
+        return getResolutionStore("dictionary-$key").asInt()
+    }
+
+    fun getDoubleFromDictionaryStore(key: String): Double? {
+        return getResolutionStore("dictionary-$key").asDouble()
+    }
+
+}