diff options
author | JvD_Ericsson <jeff.van.dam@est.tech> | 2022-02-17 15:48:20 +0000 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2022-03-10 13:27:17 +0000 |
commit | 767b122ea026099e17a2ffde30e6718d2abf150f (patch) | |
tree | a03f53058977efeeb8e60ec28808775aaaeacb9d /common-be/src/main/java/org/openecomp | |
parent | ca1cef5e1c74dc5e8d2fb17864648e94b9b66aa0 (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/org/openecomp')
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), |