summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2022-06-14 12:01:07 +0100
committerMichael Morris <michael.morris@est.tech>2022-06-20 15:57:04 +0000
commite398bb0eac655ea80507825ff039c874dd7dee6d (patch)
treefdf99c288406902cbe13adcc354f64dcf8d5c127 /catalog-model/src/main
parentce3e2816ec3aa034bdef323c1a33b71485e87eb0 (diff)
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 <andre.schmid@est.tech>
Diffstat (limited to 'catalog-model/src/main')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/ToscaType.java14
1 files changed, 5 insertions, 9 deletions
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: