Revert "Renaming Files having BluePrint to have Blueprint"
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / blueprints / blueprint-validation / src / main / kotlin / org / onap / ccsdk / cds / controllerblueprints / validation / BluePrintWorkflowValidatorImpl.kt
 
 package org.onap.ccsdk.cds.controllerblueprints.validation
 
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
 import org.onap.ccsdk.cds.controllerblueprints.validation.utils.PropertyAssignmentValidationUtils
 import org.slf4j.LoggerFactory
 import org.springframework.beans.factory.config.ConfigurableBeanFactory
@@ -30,20 +30,20 @@ import org.springframework.stereotype.Service
 
 @Service("default-workflow-validator")
 @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintWorkflowValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) : BlueprintWorkflowValidator {
+open class BluePrintWorkflowValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) : BluePrintWorkflowValidator {
 
-    private val log = LoggerFactory.getLogger(BlueprintServiceTemplateValidatorImpl::class.toString())
-    lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+    private val log = LoggerFactory.getLogger(BluePrintServiceTemplateValidatorImpl::class.toString())
+    lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
 
     var paths: MutableList<String> = arrayListOf()
 
-    override fun validate(bluePrintRuntimeService: BlueprintRuntimeService<*>, workflowName: String, workflow: Workflow) {
+    override fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, workflowName: String, workflow: Workflow) {
         log.info("Validating Workflow($workflowName)")
 
         this.bluePrintRuntimeService = bluePrintRuntimeService
 
         paths.add(workflowName)
-        paths.joinToString(BlueprintConstants.PATH_DIVIDER)
+        paths.joinToString(BluePrintConstants.PATH_DIVIDER)
 
         // Validate Workflow Inputs
         validateInputs(workflow)
@@ -55,7 +55,7 @@ open class BlueprintWorkflowValidatorImpl(private val bluePrintTypeValidatorServ
         paths.add("steps")
         workflow.steps?.forEach { stepName, step ->
             paths.add(stepName)
-            paths.joinToString(BlueprintConstants.PATH_DIVIDER)
+            paths.joinToString(BluePrintConstants.PATH_DIVIDER)
 
             // Validate target
             step.target?.let {
@@ -65,18 +65,18 @@ open class BlueprintWorkflowValidatorImpl(private val bluePrintTypeValidatorServ
                     val nodeTypeDerivedFrom = bluePrintRuntimeService.bluePrintContext().nodeTemplateNodeType(it).derivedFrom
 
                     check(
-                        nodeTypeDerivedFrom == BlueprintConstants.MODEL_TYPE_NODE_WORKFLOW ||
-                            nodeTypeDerivedFrom == BlueprintConstants.MODEL_TYPE_NODE_COMPONENT
+                        nodeTypeDerivedFrom == BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW ||
+                            nodeTypeDerivedFrom == BluePrintConstants.MODEL_TYPE_NODE_COMPONENT
                     ) {
                         "NodeType(${nodeTemplate.type}) derived from is '$nodeTypeDerivedFrom', Expected " +
-                            "'${BlueprintConstants.MODEL_TYPE_NODE_WORKFLOW}' or '${BlueprintConstants.MODEL_TYPE_NODE_COMPONENT}'"
+                            "'${BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW}' or '${BluePrintConstants.MODEL_TYPE_NODE_COMPONENT}'"
                     }
                 } catch (e: Exception) {
-                    bluePrintRuntimeService.getBlueprintError()
+                    bluePrintRuntimeService.getBluePrintError()
                         .addError(
                             "Failed to validate Workflow($workflowName)'s step($stepName)'s " +
                                 "definition",
-                            paths.joinToString(BlueprintConstants.PATH_DIVIDER), e.message!!,
+                            paths.joinToString(BluePrintConstants.PATH_DIVIDER), e.message!!,
                             "BlueprintWorkflowValidatorImpl"
                         )
                 }