Revert "Renaming Files having BluePrint to have Blueprint"
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / blueprints / blueprint-core / src / main / kotlin / org / onap / ccsdk / cds / controllerblueprints / core / service / BluePrintWorkflowService.kt
@@ -25,8 +25,8 @@ import kotlinx.coroutines.channels.Channel
 import kotlinx.coroutines.channels.actor
 import kotlinx.coroutines.channels.consumeEach
 import kotlinx.coroutines.launch
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
 import org.onap.ccsdk.cds.controllerblueprints.core.data.EdgeLabel
 import org.onap.ccsdk.cds.controllerblueprints.core.data.EdgeStatus
 import org.onap.ccsdk.cds.controllerblueprints.core.data.Graph
@@ -39,11 +39,11 @@ import org.onap.ccsdk.cds.controllerblueprints.core.outgoingEdgesNotInLabels
 import org.onap.ccsdk.cds.controllerblueprints.core.startNodes
 import kotlin.coroutines.CoroutineContext
 
-interface BlueprintWorkFlowService<In, Out> {
+interface BluePrintWorkFlowService<In, Out> {
 
     /** Executes imperative workflow graph [graph] for the bluePrintRuntimeService [bluePrintRuntimeService]
      * and workflow input [input]*/
-    suspend fun executeWorkflow(graph: Graph, bluePrintRuntimeService: BlueprintRuntimeService<*>, input: In): Out
+    suspend fun executeWorkflow(graph: Graph, bluePrintRuntimeService: BluePrintRuntimeService<*>, input: In): Out
 
     suspend fun initializeWorkflow(input: In): EdgeLabel
 
@@ -91,11 +91,11 @@ enum class EdgeAction(val id: String) {
 }
 
 /** Abstract workflow service implementation */
-abstract class AbstractBlueprintWorkFlowService<In, Out> : CoroutineScope, BlueprintWorkFlowService<In, Out> {
+abstract class AbstractBluePrintWorkFlowService<In, Out> : CoroutineScope, BluePrintWorkFlowService<In, Out> {
 
     lateinit var graph: Graph
 
-    private val log = logger(AbstractBlueprintWorkFlowService::class)
+    private val log = logger(AbstractBluePrintWorkFlowService::class)
 
     private val job = Job()
 
@@ -131,7 +131,7 @@ abstract class AbstractBlueprintWorkFlowService<In, Out> : CoroutineScope, Bluep
             // Wait for workflow completion or Error
             nodeActor.invokeOnClose { exception ->
                 launch {
-                    if (exception != null) exceptions.add(BlueprintProcessorException(exception))
+                    if (exception != null) exceptions.add(BluePrintProcessorException(exception))
                     log.info("workflow($workflowId) nodes completed with (${exceptions.size})exceptions")
                     val workflowOutput = prepareWorkflowOutput()
                     workflowExecuteMessage.output.complete(workflowOutput)
@@ -235,8 +235,8 @@ abstract class AbstractBlueprintWorkFlowService<In, Out> : CoroutineScope, Bluep
         suspend fun executeNodeWorker(message: NodeExecuteMessage<In, Out>) {
             val node = message.node
             node.status = NodeStatus.EXECUTING
-            val nodeState = if (node.id == BlueprintConstants.GRAPH_START_NODE_NAME ||
-                node.id == BlueprintConstants.GRAPH_END_NODE_NAME
+            val nodeState = if (node.id == BluePrintConstants.GRAPH_START_NODE_NAME ||
+                node.id == BluePrintConstants.GRAPH_END_NODE_NAME
             ) {
                 EdgeLabel.SUCCESS
             } else {
@@ -255,7 +255,7 @@ abstract class AbstractBlueprintWorkFlowService<In, Out> : CoroutineScope, Bluep
                 // Close the current channel
                 channel.close()
             } else if (!edgePresent) {
-                throw BlueprintProcessorException("node(${node.id}) outgoing edge($nodeState) is missing.")
+                throw BluePrintProcessorException("node(${node.id}) outgoing edge($nodeState) is missing.")
             } else {
                 val skippingEdges = graph.outgoingEdgesNotInLabels(node.id, arrayListOf(nodeState))
                 log.debug("Skipping node($node)'s outgoing edges($skippingEdges)")