summaryrefslogtreecommitdiffstats
path: root/common-be/src/main/java
diff options
context:
space:
mode:
authorJvD_Ericsson <jeff.van.dam@est.tech>2022-02-17 15:48:20 +0000
committerMichael Morris <michael.morris@est.tech>2022-03-10 13:27:17 +0000
commit767b122ea026099e17a2ffde30e6718d2abf150f (patch)
treea03f53058977efeeb8e60ec28808775aaaeacb9d /common-be/src/main/java
parentca1cef5e1c74dc5e8d2fb17864648e94b9b66aa0 (diff)
Support occurrences on node templates
Issue-ID: SDC-3711 Change-Id: I9f25454faa8be6987f336b7efd3821cfa09585a1 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
Diffstat (limited to 'common-be/src/main/java')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java21
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java2
2 files changed, 22 insertions, 1 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java
index afcc0e6d9f..ce8dda0b39 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java
@@ -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() +"]";
}
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java
index 8fce664686..e36e4ef734 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java
@@ -200,6 +200,8 @@ public enum JsonPresentationFields {
CI_IS_PROXY("isProxy", null),
CI_DIRECTIVES("directives", null),
CI_ARTIFACTS("artifacts", null),
+ CI_MAX_OCCURRENCES("maxOccurrences", null),
+ CI_MIN_OCCURRENCES("minOccurrences", null),
//path
FORWARDING_PATH("forwardingPath", null),