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 / scripts / BluePrintCompileService.kt
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
 import org.jetbrains.kotlin.cli.common.messages.MessageCollector
 import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler
 import org.jetbrains.kotlin.config.Services
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
 import org.onap.ccsdk.cds.controllerblueprints.core.checkFileExists
 import org.onap.ccsdk.cds.controllerblueprints.core.logger
 import java.io.File
@@ -40,9 +40,9 @@ import kotlin.script.experimental.api.SourceCode
 import kotlin.script.experimental.jvm.util.classpathFromClasspathProperty
 import kotlin.system.measureTimeMillis
 
-open class BlueprintCompileService {
+open class BluePrintCompileService {
 
-    val log = logger(BlueprintCompileService::class)
+    val log = logger(BluePrintCompileService::class)
 
     companion object {
 
@@ -55,7 +55,7 @@ open class BlueprintCompileService {
 
     /** Compile the [bluePrintSourceCode] and get the [kClassName] instance for the constructor [args] */
     suspend fun <T> eval(
-        bluePrintSourceCode: BlueprintSourceCode,
+        bluePrintSourceCode: BluePrintSourceCode,
         kClassName: String,
         args: ArrayList<Any?>?
     ): T {
@@ -68,14 +68,14 @@ open class BlueprintCompileService {
             }
         }
 
-        val classLoaderWithDependencies = BlueprintCompileCache.classLoader(bluePrintSourceCode.cacheKey)
+        val classLoaderWithDependencies = BluePrintCompileCache.classLoader(bluePrintSourceCode.cacheKey)
 
         /** Create the instance from the class loader */
         return instance(classLoaderWithDependencies, kClassName, args)
     }
 
     /** Compile [bluePrintSourceCode] and put into cache */
-    suspend fun compile(bluePrintSourceCode: BlueprintSourceCode) {
+    suspend fun compile(bluePrintSourceCode: BluePrintSourceCode) {
         // TODO("Include Multiple folders")
         val sourcePath = bluePrintSourceCode.blueprintKotlinSources.first()
         val compiledJarFile = bluePrintSourceCode.targetJarFile
@@ -112,7 +112,7 @@ open class BlueprintCompileService {
                             checkFileExists(compiledJarFile) { "couldn't generate compiled jar(${compiledJarFile.absolutePath})" }
                         }
                         else -> {
-                            throw BlueprintException("$exitCode :${messageCollector.errors().joinToString("\n")}")
+                            throw BluePrintException("$exitCode :${messageCollector.errors().joinToString("\n")}")
                         }
                     }
                 }
@@ -125,21 +125,21 @@ open class BlueprintCompileService {
     /** create class [kClassName] instance from [classLoader] */
     fun <T> instance(classLoader: URLClassLoader, kClassName: String, args: ArrayList<Any?>? = arrayListOf()): T {
         val kClazz = classLoader.loadClass(kClassName)
-            ?: throw BlueprintException("failed to load class($kClassName) from current class loader.")
+            ?: throw BluePrintException("failed to load class($kClassName) from current class loader.")
 
         val instance = if (args.isNullOrEmpty()) {
             kClazz.newInstance()
         } else {
             kClazz.constructors
                 .single().newInstance(*args.toArray())
-        } ?: throw BlueprintException("failed to create class($kClassName) instance for constructor argument($args).")
+        } ?: throw BluePrintException("failed to create class($kClassName) instance for constructor argument($args).")
 
         return instance as T
     }
 }
 
 /** Compile source code information */
-open class BlueprintSourceCode : SourceCode {
+open class BluePrintSourceCode : SourceCode {
 
     lateinit var blueprintKotlinSources: MutableList<String>
     lateinit var moduleName: String