diff options
author | Brinda Santh <brindasanth@in.ibm.com> | 2019-09-05 11:06:48 -0400 |
---|---|---|
committer | Brinda Santh <brindasanth@in.ibm.com> | 2019-09-05 11:06:48 -0400 |
commit | a2d60124bd44c767c42f4aa4ac8a7edafbfa3e39 (patch) | |
tree | 45cd9390e65bf1b3851f1e00f7a4cdf21054b93e /ms/controllerblueprints/modules | |
parent | 8d94f0bd0a9e4d1c57e98df726841dd0e2978569 (diff) |
Add Config based blueprint process consumer
Change-Id: I9e37ecb5032047f835f3b2ea20b2689c76353497
Issue-ID: CCSDK-1668
Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules')
-rw-r--r-- | ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt index 08bc6c3fd..b74b7e4cf 100644 --- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt +++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt @@ -54,6 +54,10 @@ fun String.asJsonPrimitive(): TextNode { return TextNode(this) } +inline fun <reified T : Any> String.jsonAsType(): T { + return JacksonUtils.readValue<T>(this.trim()) +} + // If you know the string is json content, then use the function directly fun String.jsonAsJsonType(): JsonNode { return JacksonUtils.jsonNode(this.trim()) |