summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main/java
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-05-05 23:18:00 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2022-05-09 12:19:59 +0000
commit9f25403b73e8c66d0c0d9f3e8b05d8b5069bb783 (patch)
tree3a86c0263cc11933ce7dc139a4cc0b8004f543b5 /catalog-model/src/main/java
parent6140bdb1768134828d68d02c392c0cade6739d3b (diff)
Fix property validation for data type in model
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-3990 Change-Id: I702960519cd9ef6ff7a905d837de7ca5b8f29599
Diffstat (limited to 'catalog-model/src/main/java')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
index bf8d6aed15..931d5993ea 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
@@ -835,6 +835,13 @@ public class PropertyOperation extends AbstractOperation implements IPropertyOpe
}
return true;
}
+
+ public boolean isPropertyTypeValid(final IComplexDefaultValue property, final Map<String, DataTypeDefinition> dataTypes) {
+ if (property == null) {
+ return false;
+ }
+ return ToscaPropertyType.isValidType(property.getType()) != null || dataTypes.containsKey(property.getType());
+ }
@Override
public ImmutablePair<String, Boolean> isPropertyInnerTypeValid(IComplexDefaultValue property, Map<String, DataTypeDefinition> dataTypes) {