summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-09-05 17:42:22 +0000
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-09-05 17:42:22 +0000
commitcb7b049aa0ae2a0eda114a5793a1af4db51b148f (patch)
tree525aebb60987c6ff4cb85f03841395ccf08132ae /components
parent6f4d12b7cd5c64a5797a560325a54bb9ac1884ab (diff)
Controller Blueprints Microservice
Modify Model Type and Resource Defintions persistance and access from String to JSON type for easy handling. Change-Id: Icfe7e95abad715b0ccad16c681ed057d289a6229 Issue-ID: CCSDK-431 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'components')
-rw-r--r--components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
index 5075e726..cf5f9e20 100644
--- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
+++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
@@ -50,6 +50,11 @@ object JacksonUtils {
}
@JvmStatic
+ fun <T> readValue(node: JsonNode, valueType: Class<T>): T? {
+ return jacksonObjectMapper().treeToValue(node, valueType)
+ }
+
+ @JvmStatic
fun getContent(fileName: String): String {
return File(fileName).readText(Charsets.UTF_8)
}