summaryrefslogtreecommitdiffstats
path: root/common-be
diff options
context:
space:
mode:
Diffstat (limited to 'common-be')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java
index bc9bc3387f..4eee04272c 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java
@@ -20,13 +20,12 @@
package org.openecomp.sdc.be.datatypes.elements;
-import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
-import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
-import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum;
-
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
+import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
+import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum;
import org.openecomp.sdc.common.api.ArtifactTypeEnum;
public class ArtifactDataDefinition extends ToscaDataDefinition {
@@ -78,7 +77,9 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
}
this.setGeneratedFromId(a.getGeneratedFromId());
this.setIsFromCsar(a.getIsFromCsar());
-
+ if (a.getProperties() != null) {
+ this.setProperties(new ArrayList<>(a.getProperties()));
+ }
}
@@ -365,6 +366,14 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
}
+ public List<PropertyDataDefinition> getProperties() {
+ return (List<PropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.PROPERTIES);
+ }
+
+ private void setProperties(final List<PropertyDataDefinition> properties) {
+ setToscaPresentationValue(JsonPresentationFields.PROPERTIES, properties);
+ }
+
@Override
public String toString() {
return "ArtifactDataDefinition [uniqueId=" + getUniqueId() + ", artifactType=" + getArtifactType() + ", artifactRef=" + getArtifactRef() + ", artifactName=" + getArtifactName() + ", artifactRepository=" + getArtifactRepository() + ", artifactChecksum="