summaryrefslogtreecommitdiffstats
path: root/common-be
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2021-10-01 11:30:49 +0100
committerAndr� Schmid <andre.schmid@est.tech>2021-11-05 17:14:06 +0000
commit1de1692115d1df5b4e07c1feb21d098899a6604b (patch)
tree1e26079e5cc5dc708eb666611f98dd0fc0af571d /common-be
parent2b55a906b7115ff2b156b35a4ff66811157111ee (diff)
Add UI support for adding tosca artifact types
UI support for adding artifacts to an interface operation implementation Issue-ID: SDC-3768 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: I71b3e49a160521e35a45515ad7adef836f901e78
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="