Support occurrences on node templates
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / ComponentInstanceDataDefinition.java
index afcc0e6..ce8dda0 100644 (file)
@@ -53,6 +53,8 @@ public class ComponentInstanceDataDefinition extends ToscaDataDefinition {
         setDescription(dataDefinition.getDescription());
         setPosX(dataDefinition.getPosX());
         setPosY(dataDefinition.getPosY());
+        setMinOccurrences(dataDefinition.getMinOccurrences());
+        setMaxOccurrences(dataDefinition.getMaxOccurrences());
         setPropertyValueCounter(dataDefinition.getPropertyValueCounter());
         setNormalizedName(dataDefinition.getNormalizedName());
         setOriginType(dataDefinition.getOriginType());
@@ -138,6 +140,22 @@ public class ComponentInstanceDataDefinition extends ToscaDataDefinition {
         setToscaPresentationValue(JsonPresentationFields.CI_POS_Y, posY);
     }
 
+    public String getMinOccurrences() {
+        return (String) getToscaPresentationValue(JsonPresentationFields.CI_MIN_OCCURRENCES);
+    }
+
+    public void setMinOccurrences(String minOccurrences) {
+        setToscaPresentationValue(JsonPresentationFields.CI_MIN_OCCURRENCES, minOccurrences);
+    }
+
+    public String getMaxOccurrences() {
+        return (String) getToscaPresentationValue(JsonPresentationFields.CI_MAX_OCCURRENCES);
+    }
+
+    public void setMaxOccurrences(String maxOccurrences) {
+        setToscaPresentationValue(JsonPresentationFields.CI_MAX_OCCURRENCES, maxOccurrences);
+    }
+
     public String getComponentUid() {
         return (String) getToscaPresentationValue(JsonPresentationFields.CI_COMPONENT_UID);
     }
@@ -346,7 +364,8 @@ public class ComponentInstanceDataDefinition extends ToscaDataDefinition {
                 + getAttributeValueCounter() + ", inputValueCounter=" + getInputValueCounter() + ", originType="
                 + getOriginType() + ", customizationUUID=" + getCustomizationUUID() + ", componentName="
                 + getComponentName() + ", componentVersion=" + getComponentVersion() + ", toscaComponentName="
-                + getToscaComponentName() + ", directives =" + getDirectivesString() + "]";
+                + getToscaComponentName() + ", directives =" + getDirectivesString() + ", minOccurrences ="
+                + getMinOccurrences() + ", maxOccurrences =" + getMaxOccurrences() +"]";
     }
 
 }