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().errors.isNotEmpty()) {
-                throw BluePrintException(blueprintRuntimeService.getBluePrintError().errors.toString())
+            if (blueprintRuntimeService.getBlueprintError().errors.isNotEmpty()) {
+                throw BlueprintException(blueprintRuntimeService.getBlueprintError().errors.toString())
             }
-        } catch (e: BluePrintProcessorException) {
+        } catch (e: BlueprintProcessorException) {
             val errorMsg = "Error while enriching the CBA package."
             throw e.updateErrorMessage(
                 DesignerApiDomains.DESIGNER_API, errorMsg,