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 / dsl / BluePrintDSL.kt
@@ -17,8 +17,8 @@
 package org.onap.ccsdk.cds.controllerblueprints.core.dsl
 
 import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
 import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
 import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
 import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
@@ -35,9 +35,9 @@ fun blueprint(
     version: String,
     author: String,
     tags: String,
-    block: DSLBlueprintBuilder.() -> Unit
-): DSLBlueprint {
-    return DSLBlueprintBuilder(name, version, author, tags).apply(block).build()
+    block: DSLBluePrintBuilder.() -> Unit
+): DSLBluePrint {
+    return DSLBluePrintBuilder(name, version, author, tags).apply(block).build()
 }
 
 // TOSCA DSLs
@@ -172,59 +172,59 @@ fun getNodeTemplateOperationOutput(
 
 /** Blueprint Type Extensions */
 fun ServiceTemplateBuilder.nodeTypeComponent() {
-    val nodeType = BlueprintTypes.nodeTypeComponent()
+    val nodeType = BluePrintTypes.nodeTypeComponent()
     if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
     this.nodeTypes!![nodeType.id!!] = nodeType
 }
 
-fun BlueprintTypes.nodeTypeComponent(): NodeType {
+fun BluePrintTypes.nodeTypeComponent(): NodeType {
     return nodeType(
-        id = BlueprintConstants.MODEL_TYPE_NODE_COMPONENT,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_NODES_ROOT,
+        id = BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_NODES_ROOT,
         description = "This is default Component Node"
     ) {
     }
 }
 
 @Deprecated("CDS won't support, use implerative workflow definitions.")
-fun BlueprintTypes.nodeTypeWorkflow(): NodeType {
+fun BluePrintTypes.nodeTypeWorkflow(): NodeType {
     return nodeType(
-        id = BlueprintConstants.MODEL_TYPE_NODE_WORKFLOW,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_NODES_ROOT,
+        id = BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_NODES_ROOT,
         description = "This is default Workflow Node"
     ) {
     }
 }
 
 fun ServiceTemplateBuilder.nodeTypeVnf() {
-    val nodeType = BlueprintTypes.nodeTypeVnf()
+    val nodeType = BluePrintTypes.nodeTypeVnf()
     if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
     this.nodeTypes!![nodeType.id!!] = nodeType
 }
 
-fun BlueprintTypes.nodeTypeVnf(): NodeType {
+fun BluePrintTypes.nodeTypeVnf(): NodeType {
     return nodeType(
-        id = BlueprintConstants.MODEL_TYPE_NODE_VNF,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_NODES_ROOT,
+        id = BluePrintConstants.MODEL_TYPE_NODE_VNF,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_NODES_ROOT,
         description = "This is default VNF Node"
     ) {
     }
 }
 
 fun ServiceTemplateBuilder.nodeTypeResourceSource() {
-    val nodeType = BlueprintTypes.nodeTypeResourceSource()
+    val nodeType = BluePrintTypes.nodeTypeResourceSource()
     if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
     this.nodeTypes!![nodeType.id!!] = nodeType
 }
 
-fun BlueprintTypes.nodeTypeResourceSource(): NodeType {
+fun BluePrintTypes.nodeTypeResourceSource(): NodeType {
     return nodeType(
-        id = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_NODES_ROOT,
+        id = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_NODES_ROOT,
         description = "This is default Resource Source Node"
     ) {
     }
@@ -232,16 +232,16 @@ fun BlueprintTypes.nodeTypeResourceSource(): NodeType {
 
 /** Artifacts */
 fun ServiceTemplateBuilder.artifactTypeTemplateVelocity() {
-    val artifactType = BlueprintTypes.artifactTypeTemplateVelocity()
+    val artifactType = BluePrintTypes.artifactTypeTemplateVelocity()
     if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
     this.artifactTypes!![artifactType.id!!] = artifactType
 }
 
-fun BlueprintTypes.artifactTypeTemplateVelocity(): ArtifactType {
+fun BluePrintTypes.artifactTypeTemplateVelocity(): ArtifactType {
     return artifactType(
-        id = BlueprintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_VELOCITY,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+        id = BluePrintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_VELOCITY,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
         description = "Velocity Artifact"
     ) {
         fileExt("vtl")
@@ -249,16 +249,16 @@ fun BlueprintTypes.artifactTypeTemplateVelocity(): ArtifactType {
 }
 
 fun ServiceTemplateBuilder.artifactTypeTempleJinja() {
-    val artifactType = BlueprintTypes.artifactTypeTempleJinja()
+    val artifactType = BluePrintTypes.artifactTypeTempleJinja()
     if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
     this.artifactTypes!![artifactType.id!!] = artifactType
 }
 
-fun BlueprintTypes.artifactTypeTempleJinja(): ArtifactType {
+fun BluePrintTypes.artifactTypeTempleJinja(): ArtifactType {
     return artifactType(
-        id = BlueprintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_JINJA,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+        id = BluePrintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_JINJA,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
         description = "Jinja Artifact"
     ) {
         fileExt("jinja")
@@ -266,16 +266,16 @@ fun BlueprintTypes.artifactTypeTempleJinja(): ArtifactType {
 }
 
 fun ServiceTemplateBuilder.artifactTypeMappingResource() {
-    val artifactType = BlueprintTypes.artifactTypeMappingResource()
+    val artifactType = BluePrintTypes.artifactTypeMappingResource()
     if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
     this.artifactTypes!![artifactType.id!!] = artifactType
 }
 
-fun BlueprintTypes.artifactTypeMappingResource(): ArtifactType {
+fun BluePrintTypes.artifactTypeMappingResource(): ArtifactType {
     return artifactType(
-        id = BlueprintConstants.MODEL_TYPE_ARTIFACT_MAPPING_RESOURCE,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+        id = BluePrintConstants.MODEL_TYPE_ARTIFACT_MAPPING_RESOURCE,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
         description = "Mapping Resource Artifact"
     ) {
         fileExt("json")
@@ -283,11 +283,11 @@ fun BlueprintTypes.artifactTypeMappingResource(): ArtifactType {
 }
 
 @Deprecated("CDS won't support", replaceWith = ReplaceWith("artifactTypeScriptKotlin"))
-fun BlueprintTypes.artifactTypeScriptJython(): ArtifactType {
+fun BluePrintTypes.artifactTypeScriptJython(): ArtifactType {
     return artifactType(
-        id = BlueprintConstants.MODEL_TYPE_ARTIFACT_SCRIPT_JYTHON,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+        id = BluePrintConstants.MODEL_TYPE_ARTIFACT_SCRIPT_JYTHON,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
         description = "Jython Script Artifact"
     ) {
         fileExt("py")
@@ -295,16 +295,16 @@ fun BlueprintTypes.artifactTypeScriptJython(): ArtifactType {
 }
 
 fun ServiceTemplateBuilder.artifactTypeScriptKotlin() {
-    val artifactType = BlueprintTypes.artifactTypeScriptKotlin()
+    val artifactType = BluePrintTypes.artifactTypeScriptKotlin()
     if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
     this.artifactTypes!![artifactType.id!!] = artifactType
 }
 
-fun BlueprintTypes.artifactTypeScriptKotlin(): ArtifactType {
+fun BluePrintTypes.artifactTypeScriptKotlin(): ArtifactType {
     return artifactType(
-        id = BlueprintConstants.MODEL_TYPE_ARTIFACT_SCRIPT_KOTLIN,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+        id = BluePrintConstants.MODEL_TYPE_ARTIFACT_SCRIPT_KOTLIN,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
         description = "Kotlin Script Artifact"
     ) {
         fileExt("kts")
@@ -312,43 +312,43 @@ fun BlueprintTypes.artifactTypeScriptKotlin(): ArtifactType {
 }
 
 fun ServiceTemplateBuilder.artifactTypeK8sProfileFolder() {
-    val artifactType = BlueprintTypes.artifactTypeK8sProfileFolder()
+    val artifactType = BluePrintTypes.artifactTypeK8sProfileFolder()
     if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
     this.artifactTypes!![artifactType.id!!] = artifactType
 }
 
-fun BlueprintTypes.artifactTypeK8sProfileFolder(): ArtifactType {
+fun BluePrintTypes.artifactTypeK8sProfileFolder(): ArtifactType {
     return artifactType(
-        id = BlueprintConstants.MODEL_TYPE_ARTIFACT_K8S_PROFILE,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+        id = BluePrintConstants.MODEL_TYPE_ARTIFACT_K8S_PROFILE,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
         description = "K8s Profile Folder Artifact"
     ) {
     }
 }
 
 fun ServiceTemplateBuilder.artifactTypeK8sConfigFolder() {
-    val artifactType = BlueprintTypes.artifactTypeK8sConfigFolder()
+    val artifactType = BluePrintTypes.artifactTypeK8sConfigFolder()
     if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
     this.artifactTypes!![artifactType.id!!] = artifactType
 }
 
-fun BlueprintTypes.artifactTypeK8sConfigFolder(): ArtifactType {
+fun BluePrintTypes.artifactTypeK8sConfigFolder(): ArtifactType {
     return artifactType(
-        id = BlueprintConstants.MODEL_TYPE_ARTIFACT_K8S_CONFIG,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+        id = BluePrintConstants.MODEL_TYPE_ARTIFACT_K8S_CONFIG,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
         description = "K8s Config Folder Artifact"
     ) {
     }
 }
 
 @Deprecated("CDS won't support, use implerative workflow definitions.")
-fun BlueprintTypes.artifactTypeDirectedGraph(): ArtifactType {
+fun BluePrintTypes.artifactTypeDirectedGraph(): ArtifactType {
     return artifactType(
-        id = BlueprintConstants.MODEL_TYPE_ARTIFACT_DIRECTED_GRAPH,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+        id = BluePrintConstants.MODEL_TYPE_ARTIFACT_DIRECTED_GRAPH,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
         description = "Directed Graph Artifact"
     ) {
         fileExt("xml", "json")
@@ -356,16 +356,16 @@ fun BlueprintTypes.artifactTypeDirectedGraph(): ArtifactType {
 }
 
 fun ServiceTemplateBuilder.artifactTypeComponentJar() {
-    val artifactType = BlueprintTypes.artifactTypeComponentJar()
+    val artifactType = BluePrintTypes.artifactTypeComponentJar()
     if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
     this.artifactTypes!![artifactType.id!!] = artifactType
 }
 
-fun BlueprintTypes.artifactTypeComponentJar(): ArtifactType {
+fun BluePrintTypes.artifactTypeComponentJar(): ArtifactType {
     return artifactType(
-        id = BlueprintConstants.MODEL_TYPE_ARTIFACT_COMPONENT_JAR,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+        id = BluePrintConstants.MODEL_TYPE_ARTIFACT_COMPONENT_JAR,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
         description = "Component Artifact"
     ) {
         fileExt("jar")
@@ -375,49 +375,49 @@ fun BlueprintTypes.artifactTypeComponentJar(): ArtifactType {
 /** Relationship Types */
 
 fun ServiceTemplateBuilder.relationshipTypeConnectsTo() {
-    val relationshipType = BlueprintTypes.relationshipTypeConnectsTo()
+    val relationshipType = BluePrintTypes.relationshipTypeConnectsTo()
     if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
     this.relationshipTypes!![relationshipType.id!!] = relationshipType
 }
 
-fun BlueprintTypes.relationshipTypeConnectsTo(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsTo(): RelationshipType {
     return relationshipType(
-        id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
+        id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
         description = "Relationship connects to"
     ) {
-        validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+        validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
     }
 }
 
 fun ServiceTemplateBuilder.relationshipTypeDependsOn() {
-    val relationshipType = BlueprintTypes.relationshipTypeDependsOn()
+    val relationshipType = BluePrintTypes.relationshipTypeDependsOn()
     if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
     this.relationshipTypes!![relationshipType.id!!] = relationshipType
 }
 
-fun BlueprintTypes.relationshipTypeDependsOn(): RelationshipType {
+fun BluePrintTypes.relationshipTypeDependsOn(): RelationshipType {
     return relationshipType(
-        id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_DEPENDS_ON,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
+        id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_DEPENDS_ON,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
         description = "Relationship depends on"
     ) {
     }
 }
 
 fun ServiceTemplateBuilder.relationshipTypeHostedOn() {
-    val relationshipType = BlueprintTypes.relationshipTypeHostedOn()
+    val relationshipType = BluePrintTypes.relationshipTypeHostedOn()
     if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
     this.relationshipTypes!![relationshipType.id!!] = relationshipType
 }
 
-fun BlueprintTypes.relationshipTypeHostedOn(): RelationshipType {
+fun BluePrintTypes.relationshipTypeHostedOn(): RelationshipType {
     return relationshipType(
-        id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_HOSTED_ON,
-        version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
-        derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
+        id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_HOSTED_ON,
+        version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+        derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
         description = "Relationship hosted on"
     ) {
     }