aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2021-07-26 12:00:59 -0400
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2021-07-28 09:06:26 -0400
commit45263f50896a7021cd17d78ce83b29365cb19c29 (patch)
tree0245881b0c3badd2e72144dc29311f4e7df58e38 /ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
parent76cb04c2302c9f8f0395f86d8e8d246fdae0fd28 (diff)
Revert "Renaming Files having BluePrint to have Blueprint"1.1.5
The renaming in CCSDK-3098 caused breaking changes to the grpc api and compile issues for kotlin scripts. Issue-ID: CCSDK-3385 Change-Id: I0d745cb858371678eabcb2284671c1fd76a1ab6d Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt28
1 files changed, 14 insertions, 14 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
index 78f9e1688..08de136d8 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
@@ -18,9 +18,9 @@ package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils
import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
@@ -41,25 +41,25 @@ class ModelTypeValidator {
fun validateModelTypeDefinition(definitionType: String, definitionContent: JsonNode): Boolean {
when (definitionType) {
- BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE -> {
JacksonUtils.readValue(definitionContent, DataType::class.java)
- ?: throw BlueprintException("Model type definition is not DataType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not DataType valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE -> {
JacksonUtils.readValue(definitionContent, NodeType::class.java)
- ?: throw BlueprintException("Model type definition is not NodeType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not NodeType valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE -> {
JacksonUtils.readValue(definitionContent, ArtifactType::class.java)
- ?: throw BlueprintException("Model type definition is not ArtifactType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not ArtifactType valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_CAPABILITY_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_CAPABILITY_TYPE -> {
JacksonUtils.readValue(definitionContent, CapabilityDefinition::class.java)
- ?: throw BlueprintException("Model type definition is not CapabilityDefinition valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not CapabilityDefinition valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE -> {
JacksonUtils.readValue(definitionContent, RelationshipType::class.java)
- ?: throw BlueprintException("Model type definition is not RelationshipType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not RelationshipType valid content $definitionContent")
}
}
return true
@@ -74,7 +74,7 @@ class ModelTypeValidator {
fun validateModelType(modelType: ModelType?): Boolean {
checkNotNull(modelType) { "Model Type Information is missing." }
- val validRootTypes = BlueprintTypes.validModelTypes()
+ val validRootTypes = BluePrintTypes.validModelTypes()
check(validRootTypes.contains(modelType.definitionType)) {
"Not Valid Model Root Type(${modelType.definitionType}), It should be $validRootTypes"