From 08fee6aa89ec2a0fd021c969af78ba422f86949f Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Fri, 27 Nov 2020 17:26:46 +0000 Subject: Add metadata to topology inputs Change-Id: If57e16003532d59552fa0b5cacc69a792e5b877a Issue-ID: SDC-3399 Signed-off-by: MichaelMorris --- .../sdc/be/datatypes/elements/PropertyDataDefinition.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'common-be') diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java index 5d9453a731..d9e053f454 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java @@ -25,6 +25,7 @@ import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields; import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition; import java.util.ArrayList; +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -32,6 +33,7 @@ import java.util.Set; import lombok.Data; import lombok.EqualsAndHashCode; +import org.apache.commons.collections.MapUtils; import static org.apache.commons.collections.CollectionUtils.isNotEmpty; @EqualsAndHashCode(callSuper = false) @@ -84,6 +86,8 @@ public class PropertyDataDefinition extends ToscaDataDefinition { private List getPolicyValues; private List propertyConstraints; + + private Map metadata; public PropertyDataDefinition() { super(); @@ -123,6 +127,9 @@ public class PropertyDataDefinition extends ToscaDataDefinition { if (isNotEmpty(propertyDataDefinition.annotations)) { this.setAnnotations(propertyDataDefinition.annotations); } + if (MapUtils.isNotEmpty(propertyDataDefinition.getMetadata())) { + setMetadata(new HashMap<>(propertyDataDefinition.getMetadata())); + } if(isNotEmpty(propertyDataDefinition.getPropertyConstraints())){ setPropertyConstraints(new ArrayList<>(propertyDataDefinition.getPropertyConstraints())); } -- cgit 1.2.3-korg