aboutsummaryrefslogtreecommitdiffstats
path: root/common-be
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2020-11-27 17:26:46 +0000
committerVasyl Razinkov <vasyl.razinkov@est.tech>2020-12-15 14:24:59 +0000
commit08fee6aa89ec2a0fd021c969af78ba422f86949f (patch)
treeffdb1001016bde3fdf265ad95db8f2ea21a564da /common-be
parent3f816f6fdeb32061c77ab9799e18f2cb41ce8ea7 (diff)
Add metadata to topology inputs1.8.0
Change-Id: If57e16003532d59552fa0b5cacc69a792e5b877a Issue-ID: SDC-3399 Signed-off-by: MichaelMorris <michael.morris@est.tech>
Diffstat (limited to 'common-be')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java7
1 files changed, 7 insertions, 0 deletions
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<GetPolicyValueDataDefinition> getPolicyValues;
private List<String> propertyConstraints;
+
+ private Map<String, String> 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()));
}