summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-03-13 10:56:28 -0400
committerBrinda Santh Muthuramalingam <brindasanth@in.ibm.com>2019-03-13 21:16:15 +0000
commit52443341dbc778648a8705dc5b62ed172ed2ccf5 (patch)
tree7ec4e82dfa4d5e9ad14173491273062844464f61 /ms/controllerblueprints
parent98a78186e305ce39663e0232e5ed9c35b2f6d4a8 (diff)
Add node template workflow service.
Change-Id: I3a9167fe58b697f8fb9c7f5fd09768950afe1ff4 Issue-ID: CCSDK-1154 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints')
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/CustomFunctions.kt4
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BluePrintWorkflowExecutionService.kt26
2 files changed, 30 insertions, 0 deletions
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<String, *>.asJsonNode(): JsonNode {
return JacksonUtils.jsonNodeFromObject(this)
}
+fun MutableMap<String, *>.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<Input, Output> {
+
+ suspend fun executeBluePrintWorkflow(bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ executionServiceInput: Input,
+ properties: MutableMap<String, Any> = hashMapOf()): Output
+} \ No newline at end of file