From e398bb0eac655ea80507825ff039c874dd7dee6d Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Tue, 14 Jun 2022 12:01:07 +0100 Subject: Fix VFC map or list property update Fixes two problems in the update of VFC map or list properties. One was related to a schema validation in the backend. The other is related to setting the property value when the default value was being edited. Change-Id: Icd85346144c8763ced1b8fbcd750c9baf783f6a6 Issue-ID: SDC-4050 Signed-off-by: andre.schmid --- .../java/org/openecomp/sdc/be/model/tosca/ToscaType.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'catalog-model/src/main') diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/ToscaType.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/ToscaType.java index a880db0c14..98ca5d02ab 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/ToscaType.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/ToscaType.java @@ -27,6 +27,8 @@ import java.text.SimpleDateFormat; import java.util.List; import java.util.Locale; import java.util.Map; +import lombok.AllArgsConstructor; +import lombok.Getter; import org.openecomp.sdc.be.model.tosca.constraints.ConstraintUtil; import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintValueDoNotMatchPropertyTypeException; @@ -35,6 +37,7 @@ import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintValueDoN * * @author mkv */ +@AllArgsConstructor public enum ToscaType { // @formatter:off STRING("string"), @@ -51,11 +54,8 @@ public enum ToscaType { SCALAR_UNIT_FREQUENCY("scalar-unit.frequency"); // @formatter:on - private String type; - - ToscaType(String type) { - this.type = type; - } + @Getter + private final String type; public static ToscaType getToscaType(String typeName) { if (typeName == null) { @@ -92,10 +92,6 @@ public enum ToscaType { return ToscaPropertyType.MAP.getType().equals(type) || ToscaPropertyType.LIST.getType().equals(type); } - public String getType() { - return type; - } - public boolean isValidValue(String value) { switch (this) { case BOOLEAN: -- cgit 1.2.3-korg