Controller Blueprints Component Core
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Mon, 12 Nov 2018 18:49:04 +0000 (13:49 -0500)
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Mon, 12 Nov 2018 18:49:04 +0000 (13:49 -0500)
Define blueprint component or function Interface and Execution data..

Change-Id: I818096a65b750a0723dc14064a18d1b8b47fbaa1
Issue-ID: CCSDK-671
Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintConstants.kt
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/interfaces/BlueprintFunctionNode.kt [new file with mode: 0644]

index 2590d6d..84d2bef 100644 (file)
@@ -143,15 +143,15 @@ object BluePrintConstants {
     const val METADATA_TEMPLATE_VERSION = "template_version"\r
     const val METADATA_TEMPLATE_AUTHOR = "template_author"\r
     const val METADATA_TEMPLATE_TAGS = "template_tags"\r
+    const val METADATA_WORKFLOW_NAME = "workflow_name"\r
 \r
-    const val PAYLOAD_CONTENT = "payload-content"\r
     const val PAYLOAD_DATA = "payload-data"\r
-    const val SELECTOR = "selector"\r
+    const val PROPERTY_CURRENT_STEP = "current-step"\r
+    const val PROPERTY_CURRENT_NODE_TEMPLATE = "current-node-template"\r
     const val PROPERTY_CURRENT_INTERFACE = "current-interface"\r
     const val PROPERTY_CURRENT_OPERATION = "current-operation"\r
     const val PROPERTY_CURRENT_IMPLEMENTATION = "current-implementation"\r
-\r
-    const val PROPERTY_ACTION_NAME = "action"\r
+    const val PROPERTY_EXECUTION_REQUEST = "execution-request"\r
 \r
     const val OPERATION_PROCESS = "process"\r
     const val OPERATION_PREPARE = "prepare"\r
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
new file mode 100644 (file)
index 0000000..6add70e
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ *
+ * 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.BluePrintProcessorException
+import java.util.function.Function
+
+
+interface BlueprintFunctionNode<T, R> : Function<T, R> {
+
+    @Throws(BluePrintProcessorException::class)
+    fun prepareRequest(executionRequest: T): T
+
+    @Throws(BluePrintProcessorException::class)
+    fun process(executionRequest: T)
+
+    @Throws(BluePrintProcessorException::class)
+    fun recover(runtimeException: RuntimeException, executionRequest: T)
+
+    @Throws(BluePrintProcessorException::class)
+    fun prepareResponse(): R
+
+}
\ No newline at end of file