diff options
author | Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com> | 2018-09-05 17:42:22 +0000 |
---|---|---|
committer | Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com> | 2018-09-05 17:42:22 +0000 |
commit | e2ed7eb15fdda46c51f08eeb688fcc75ef45098b (patch) | |
tree | 59d27d6092f5eae996cf9df9ff4fc22a030532c9 /components/core/src | |
parent | 5996f186c7c195bf2d4e1b1874c7784cdaa00e39 (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/core/src')
-rw-r--r-- | components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt | 5 |
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 5075e7261..cf5f9e20c 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)
}
|