summaryrefslogtreecommitdiffstats
path: root/common-be/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'common-be/src/main')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java9
1 files changed, 9 insertions, 0 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 4eee04272c..5927a5abe7 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
@@ -369,6 +369,15 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
public List<PropertyDataDefinition> getProperties() {
return (List<PropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.PROPERTIES);
}
+
+ public void addProperty(final PropertyDataDefinition property) {
+ List<PropertyDataDefinition> properties = (List<PropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.PROPERTIES);
+ if (properties == null) {
+ properties = new ArrayList<>();
+ setProperties(properties);
+ }
+ properties.add(property);
+ }
private void setProperties(final List<PropertyDataDefinition> properties) {
setToscaPresentationValue(JsonPresentationFields.PROPERTIES, properties);