From 52443341dbc778648a8705dc5b62ed172ed2ccf5 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Wed, 13 Mar 2019 10:56:28 -0400 Subject: Add node template workflow service. Change-Id: I3a9167fe58b697f8fb9c7f5fd09768950afe1ff4 Issue-ID: CCSDK-1154 Signed-off-by: Muthuramalingam, Brinda Santh --- .../controllerblueprints/core/CustomFunctions.kt | 4 ++++ .../BluePrintWorkflowExecutionService.kt | 26 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BluePrintWorkflowExecutionService.kt (limited to 'ms/controllerblueprints/modules/blueprint-core') diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/CustomFunctions.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/CustomFunctions.kt index 7d98c42d1..462935d61 100644 --- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/CustomFunctions.kt +++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/CustomFunctions.kt @@ -50,6 +50,10 @@ fun MutableMap.asJsonNode(): JsonNode { return JacksonUtils.jsonNodeFromObject(this) } +fun MutableMap.asObjectNode(): ObjectNode { + return JacksonUtils.objectNodeFromObject(this) +} + fun format(message: String, vararg args: Any?): String { if (args != null && args.isNotEmpty()) { return MessageFormatter.arrayFormat(message, args).message diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BluePrintWorkflowExecutionService.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BluePrintWorkflowExecutionService.kt new file mode 100644 index 000000000..c536aef72 --- /dev/null +++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BluePrintWorkflowExecutionService.kt @@ -0,0 +1,26 @@ +/* + * Copyright © 2019 IBM. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.controllerblueprints.core.interfaces + +import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService + +interface BluePrintWorkflowExecutionService { + + suspend fun executeBluePrintWorkflow(bluePrintRuntimeService: BluePrintRuntimeService<*>, + executionServiceInput: Input, + properties: MutableMap = hashMapOf()): Output +} \ No newline at end of file -- cgit 1.2.3-korg