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 / BluePrintExpressionService.kt
@@ -21,9 +21,9 @@ import com.fasterxml.jackson.databind.JsonNode
 import com.fasterxml.jackson.databind.node.ArrayNode
 import com.fasterxml.jackson.databind.node.ObjectNode
 import com.fasterxml.jackson.databind.node.TextNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
 import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactExpression
 import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeExpression
 import org.onap.ccsdk.cds.controllerblueprints.core.data.DSLExpression
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory
  *
  * @author Brinda Santh
  */
-object BlueprintExpressionService {
+object BluePrintExpressionService {
 
     val log = LoggerFactory.getLogger(this::class.toString())
 
@@ -47,9 +47,9 @@ object BlueprintExpressionService {
         val json = propertyAssignmentNode.toString()
         // FIXME("Check if any Optimisation needed")
         return (
-            json.contains(BlueprintConstants.EXPRESSION_GET_INPUT) ||
-                json.contains(BlueprintConstants.EXPRESSION_GET_ATTRIBUTE) ||
-                json.contains(BlueprintConstants.EXPRESSION_GET_PROPERTY)
+            json.contains(BluePrintConstants.EXPRESSION_GET_INPUT) ||
+                json.contains(BluePrintConstants.EXPRESSION_GET_ATTRIBUTE) ||
+                json.contains(BluePrintConstants.EXPRESSION_GET_PROPERTY)
             )
     }
 
@@ -58,35 +58,35 @@ object BlueprintExpressionService {
         log.trace("Assignment Data/Expression : {}", propertyAssignmentNode)
         val expressionData = ExpressionData(valueNode = propertyAssignmentNode)
         if (propertyAssignmentNode is ObjectNode) {
-            val commands: Set<String> = propertyAssignmentNode.fieldNames().asSequence().toList().intersect(BlueprintTypes.validCommands())
+            val commands: Set<String> = propertyAssignmentNode.fieldNames().asSequence().toList().intersect(BluePrintTypes.validCommands())
             if (commands.isNotEmpty()) {
                 expressionData.isExpression = true
                 expressionData.command = commands.first()
                 expressionData.expressionNode = propertyAssignmentNode
 
                 when (expressionData.command) {
-                    BlueprintConstants.EXPRESSION_GET_INPUT -> {
+                    BluePrintConstants.EXPRESSION_GET_INPUT -> {
                         expressionData.inputExpression = populateInputExpression(propertyAssignmentNode)
                     }
-                    BlueprintConstants.EXPRESSION_GET_ATTRIBUTE -> {
+                    BluePrintConstants.EXPRESSION_GET_ATTRIBUTE -> {
                         expressionData.attributeExpression = populateAttributeExpression(propertyAssignmentNode)
                     }
-                    BlueprintConstants.EXPRESSION_GET_PROPERTY -> {
+                    BluePrintConstants.EXPRESSION_GET_PROPERTY -> {
                         expressionData.propertyExpression = populatePropertyExpression(propertyAssignmentNode)
                     }
-                    BlueprintConstants.EXPRESSION_GET_OPERATION_OUTPUT -> {
+                    BluePrintConstants.EXPRESSION_GET_OPERATION_OUTPUT -> {
                         expressionData.operationOutputExpression = populateOperationOutputExpression(propertyAssignmentNode)
                     }
-                    BlueprintConstants.EXPRESSION_GET_ARTIFACT -> {
+                    BluePrintConstants.EXPRESSION_GET_ARTIFACT -> {
                         expressionData.artifactExpression = populateArtifactExpression(propertyAssignmentNode)
                     }
                 }
             }
         } else if (propertyAssignmentNode is TextNode &&
-            propertyAssignmentNode.textValue().startsWith(BlueprintConstants.EXPRESSION_DSL_REFERENCE)
+            propertyAssignmentNode.textValue().startsWith(BluePrintConstants.EXPRESSION_DSL_REFERENCE)
         ) {
             expressionData.isExpression = true
-            expressionData.command = BlueprintConstants.EXPRESSION_DSL_REFERENCE
+            expressionData.command = BluePrintConstants.EXPRESSION_DSL_REFERENCE
             expressionData.dslExpression = populateDSLExpression(propertyAssignmentNode)
         }
         return expressionData
@@ -96,7 +96,7 @@ object BlueprintExpressionService {
     fun populateDSLExpression(jsonNode: TextNode): DSLExpression {
         return DSLExpression(
             propertyName = jsonNode.textValue()
-                .removePrefix(BlueprintConstants.EXPRESSION_DSL_REFERENCE)
+                .removePrefix(BluePrintConstants.EXPRESSION_DSL_REFERENCE)
         )
     }
 
@@ -109,7 +109,7 @@ object BlueprintExpressionService {
     fun populatePropertyExpression(jsonNode: JsonNode): PropertyExpression {
         val arrayNode: ArrayNode = jsonNode.first() as ArrayNode
         check(arrayNode.size() >= 2) {
-            throw BlueprintException(
+            throw BluePrintException(
                 String.format(
                     "missing property expression, " +
                         "it should be [ <modelable_entity_name>, <optional_req_or_cap_name>, <property_name>, " +
@@ -149,7 +149,7 @@ object BlueprintExpressionService {
     fun populateAttributeExpression(jsonNode: JsonNode): AttributeExpression {
         val arrayNode: ArrayNode = jsonNode.first() as ArrayNode
         check(arrayNode.size() >= 2) {
-            throw BlueprintException(
+            throw BluePrintException(
                 String.format(
                     "missing attribute expression, " +
                         "it should be [ <modelable_entity_name>, <optional_req_or_cap_name>, <attribute_name>," +
@@ -190,7 +190,7 @@ object BlueprintExpressionService {
         val arrayNode: ArrayNode = jsonNode.first() as ArrayNode
 
         check(arrayNode.size() >= 4) {
-            throw BlueprintException(
+            throw BluePrintException(
                 String.format(
                     "missing operation output expression, " +
                         "it should be (<modelable_entity_name>, <interface_name>, <operation_name>, <output_variable_name>) , but present {}",
@@ -217,7 +217,7 @@ object BlueprintExpressionService {
         val arrayNode: ArrayNode = jsonNode.first() as ArrayNode
 
         check(arrayNode.size() >= 2) {
-            throw BlueprintException(
+            throw BluePrintException(
                 String.format(
                     "missing artifact expression, " +
                         "it should be [ <modelable_entity_name>, <artifact_name>, <location>, <remove> ] , but present {}",