Revert "Renaming Files having BluePrint to have Blueprint"
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / commons / processor-core / src / main / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / core / cluster / BluePrintClusterExtensions.kt
@@ -20,30 +20,30 @@ import com.hazelcast.cluster.Member
 import kotlinx.coroutines.GlobalScope
 import kotlinx.coroutines.newSingleThreadContext
 import kotlinx.coroutines.withContext
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
 import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterLock
 import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterMember
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
 import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
 
 /**
  * Exposed Dependency Service by this Hazelcast Lib Module
  */
-fun BlueprintDependencyService.clusterService(): BlueprintClusterService =
+fun BluePrintDependencyService.clusterService(): BluePrintClusterService =
     instance(HazelcastClusterService::class)
 
 /** Optional Cluster Service, returns only if Cluster is enabled */
-fun BlueprintDependencyService.optionalClusterService(): BlueprintClusterService? {
-    return if (BlueprintConstants.CLUSTER_ENABLED) {
-        BlueprintDependencyService.clusterService()
+fun BluePrintDependencyService.optionalClusterService(): BluePrintClusterService? {
+    return if (BluePrintConstants.CLUSTER_ENABLED) {
+        BluePrintDependencyService.clusterService()
     } else null
 }
 
 /** Extension to convert Hazelcast Member to Blueprints Cluster Member */
 fun Member.toClusterMember(): ClusterMember {
-    val memberName: String = this.getAttribute(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID) ?: this.uuid.toString()
+    val memberName: String = this.getAttribute(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID) ?: this.uuid.toString()
     return ClusterMember(
         id = this.uuid.toString(),
         name = memberName,
@@ -53,7 +53,7 @@ fun Member.toClusterMember(): ClusterMember {
 
 /**
  * This function will try to acquire the lock and then execute the provided block.
- * If the lock cannot be acquired within timeout, a BlueprintException will be thrown.
+ * If the lock cannot be acquired within timeout, a BluePrintException will be thrown.
  *
  * Since a lock can only be unlocked by the the thread which acquired the lock,
  * this function will confine coroutines within the block to a dedicated thread.
@@ -69,7 +69,7 @@ suspend fun <R> ClusterLock.executeWithLock(acquireLockTimeout: Long, block: sus
                     lock.unLock()
                 }
             } else
-                throw BlueprintException("Failed to acquire lock within timeout")
+                throw BluePrintException("Failed to acquire lock within timeout")
         }
     }
 }