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 / BlueprintDesignTimeValidatorService.kt
 
 package org.onap.ccsdk.cds.controllerblueprints.validation
 
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants
@@ -33,21 +33,21 @@ import java.io.File
 import java.util.UUID
 
 @Service("bluePrintDesignTimeValidatorService")
-open class BluePrintDesignTimeValidatorService(
-    private val bluePrintTypeValidatorService: BluePrintTypeValidatorService,
+open class BlueprintDesignTimeValidatorService(
+    private val bluePrintTypeValidatorService: BlueprintTypeValidatorService,
     private val resourceDefinitionValidator: ResourceDefinitionValidator
 ) :
-    BluePrintValidatorService {
+    BlueprintValidatorService {
 
-    private val log = LoggerFactory.getLogger(BluePrintDesignTimeValidatorService::class.toString())
+    private val log = LoggerFactory.getLogger(BlueprintDesignTimeValidatorService::class.toString())
 
-    override suspend fun validateBluePrints(basePath: String): Boolean {
+    override suspend fun validateBlueprints(basePath: String): Boolean {
 
-        val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(UUID.randomUUID().toString(), basePath)
-        return validateBluePrints(bluePrintRuntimeService)
+        val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(UUID.randomUUID().toString(), basePath)
+        return validateBlueprints(bluePrintRuntimeService)
     }
 
-    override suspend fun validateBluePrints(bluePrintRuntimeService: BluePrintRuntimeService<*>): Boolean {
+    override suspend fun validateBlueprints(bluePrintRuntimeService: BlueprintRuntimeService<*>): Boolean {
 
         bluePrintTypeValidatorService.validateServiceTemplate(
             bluePrintRuntimeService, "service_template",
@@ -57,18 +57,18 @@ open class BluePrintDesignTimeValidatorService(
         // Validate Resource Definitions
         validateResourceDefinitions(bluePrintRuntimeService)
 
-        if (bluePrintRuntimeService.getBluePrintError().errors.size > 0) {
-            throw BluePrintException("failed in blueprint validation : ${bluePrintRuntimeService.getBluePrintError().errors.joinToString("\n")}")
+        if (bluePrintRuntimeService.getBlueprintError().errors.size > 0) {
+            throw BlueprintException("failed in blueprint validation : ${bluePrintRuntimeService.getBlueprintError().errors.joinToString("\n")}")
         }
         return true
     }
 
-    private fun validateResourceDefinitions(bluePrintRuntimeService: BluePrintRuntimeService<*>) {
+    private fun validateResourceDefinitions(bluePrintRuntimeService: BlueprintRuntimeService<*>) {
         // Validate Resource Dictionary
         val blueprintBasePath = bluePrintRuntimeService.bluePrintContext().rootPath
 
         val resourceDefinitionsPath = blueprintBasePath.plus(File.separator)
-            .plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR).plus(File.separator)
+            .plus(BlueprintConstants.TOSCA_DEFINITIONS_DIR).plus(File.separator)
             .plus("${ResourceDictionaryConstants.PATH_RESOURCE_DEFINITION_TYPE}.json")
 
         val resourceDefinitionFile = File(resourceDefinitionsPath)