From cb7b049aa0ae2a0eda114a5793a1af4db51b148f Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh(bs2796)" Date: Wed, 5 Sep 2018 17:42:22 +0000 Subject: 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) --- .../onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'components/core') 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 @@ -49,6 +49,11 @@ object JacksonUtils { return jacksonObjectMapper().readValue(content, valueType) } + @JvmStatic + fun readValue(node: JsonNode, valueType: Class): T? { + return jacksonObjectMapper().treeToValue(node, valueType) + } + @JvmStatic fun getContent(fileName: String): String { return File(fileName).readText(Charsets.UTF_8) -- cgit 1.2.3-korg