From d9fdc75c0db6150363a3bd63055fe5f323ce1727 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh(bs2796)" Date: Thu, 6 Dec 2018 13:25:36 -0500 Subject: Store step inputs to blueprint runtime service. Change-Id: Ib01edfc358625d25ac0625f88739c7c57f7f967c Issue-ID: CCSDK-670 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) --- .../org/onap/ccsdk/apps/controllerblueprints/core/CustomFunctions.kt | 4 ++++ .../controllerblueprints/core/interfaces/BlueprintFunctionNode.kt | 2 ++ 2 files changed, 6 insertions(+) (limited to 'components/core/src') diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/CustomFunctions.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/CustomFunctions.kt index 2329fc93..4d1d9b65 100644 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/CustomFunctions.kt +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/CustomFunctions.kt @@ -49,6 +49,10 @@ fun Double.asJsonPrimitive(): DoubleNode { return DoubleNode.valueOf(this) } +fun MutableMap.asJsonNode(): JsonNode { + return JacksonUtils.jsonNodeFromObject(this) +} + fun format(message: String, vararg args: Any?): String { if (args != null && args.isNotEmpty()) { return MessageFormatter.arrayFormat(message, args).message diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BlueprintFunctionNode.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BlueprintFunctionNode.kt index 6add70e6..0b9f1f18 100644 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BlueprintFunctionNode.kt +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BlueprintFunctionNode.kt @@ -22,6 +22,8 @@ import java.util.function.Function interface BlueprintFunctionNode : Function { + fun getName(): String + @Throws(BluePrintProcessorException::class) fun prepareRequest(executionRequest: T): T -- cgit 1.2.3-korg