Revert "Renaming Files having BluePrint to have Blueprint"
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / inbounds / designer-api / src / main / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / designer / api / enhancer / BluePrintEnhancerServiceImpl.kt
 package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
 
 import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiDomains
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
 import org.onap.ccsdk.cds.controllerblueprints.core.httpProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
 import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
 import org.onap.ccsdk.cds.controllerblueprints.core.updateErrorMessage
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintFileUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
 import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils
 import org.onap.ccsdk.cds.error.catalog.core.ErrorCatalogCodes
 import org.onap.ccsdk.cds.error.catalog.core.utils.errorCauseOrDefault
@@ -36,28 +36,28 @@ import java.io.IOException
 import java.util.UUID
 
 @Service
-open class BlueprintEnhancerServiceImpl(
-    private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
+open class BluePrintEnhancerServiceImpl(
+    private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
     private val resourceDefinitionEnhancerService: ResourceDefinitionEnhancerService
-) : BlueprintEnhancerService {
+) : BluePrintEnhancerService {
 
-    private val log = logger(BlueprintEnhancerServiceImpl::class)
+    private val log = logger(BluePrintEnhancerServiceImpl::class)
 
-    override suspend fun enhance(basePath: String, enrichedBasePath: String): BlueprintContext {
+    override suspend fun enhance(basePath: String, enrichedBasePath: String): BluePrintContext {
 
         // Copy the Blueprint Content to Target Location
-        BlueprintFileUtils.copyBlueprint(basePath, enrichedBasePath)
+        BluePrintFileUtils.copyBluePrint(basePath, enrichedBasePath)
 
         // Enhance the Blueprint
         return enhance(enrichedBasePath)
     }
 
-    @Throws(BlueprintException::class)
-    override suspend fun enhance(basePath: String): BlueprintContext {
+    @Throws(BluePrintException::class)
+    override suspend fun enhance(basePath: String): BluePrintContext {
 
         log.info("Enhancing blueprint($basePath)")
-        val blueprintRuntimeService = BlueprintMetadataUtils
-            .getBaseEnhancementBlueprintRuntime(UUID.randomUUID().toString(), basePath)
+        val blueprintRuntimeService = BluePrintMetadataUtils
+            .getBaseEnhancementBluePrintRuntime(UUID.randomUUID().toString(), basePath)
 
         try {
 
@@ -73,15 +73,15 @@ open class BlueprintEnhancerServiceImpl(
             )
 
             // Write the Enhanced Blueprint Definitions
-            BlueprintFileUtils.writeEnhancedBlueprint(blueprintRuntimeService.bluePrintContext())
+            BluePrintFileUtils.writeEnhancedBluePrint(blueprintRuntimeService.bluePrintContext())
 
             // Write the Enhanced Blueprint Resource Definitions
             ResourceDictionaryUtils.writeResourceDefinitionTypes(basePath, resourceDefinitions)
 
-            if (blueprintRuntimeService.getBlueprintError().allErrors().isNotEmpty()) {
-                throw BlueprintException(blueprintRuntimeService.getBlueprintError().allErrors().toString())
+            if (blueprintRuntimeService.getBluePrintError().allErrors().isNotEmpty()) {
+                throw BluePrintException(blueprintRuntimeService.getBluePrintError().allErrors().toString())
             }
-        } catch (e: BlueprintProcessorException) {
+        } catch (e: BluePrintProcessorException) {
             val errorMsg = "Error while enriching the CBA package."
             throw e.updateErrorMessage(
                 DesignerApiDomains.DESIGNER_API, errorMsg,