diff options
Diffstat (limited to 'common-be')
4 files changed, 17 insertions, 7 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CapabilityDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CapabilityDataDefinition.java index fdd1386e48..2612e6f888 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CapabilityDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CapabilityDataDefinition.java @@ -32,7 +32,7 @@ import java.util.List; */ public class CapabilityDataDefinition extends ToscaDataDefinition { - public static final String MIN_OCCURRENCES = "1"; + public static final String MIN_OCCURRENCES = "0"; public static final String MAX_OCCURRENCES = "UNBOUNDED"; /** diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RelationshipInstDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RelationshipInstDataDefinition.java index 72d9c36bf6..2f995fd844 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RelationshipInstDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RelationshipInstDataDefinition.java @@ -32,6 +32,7 @@ public class RelationshipInstDataDefinition extends ToscaDataDefinition { this.setDescription(cdt.getDescription()); this.setType(cdt.getType()); this.setValidSourceTypes(cdt.getValidSourceTypes()); + this.setValidTargetTypes(cdt.getValidTargetTypes()); this.setVersion(cdt.getVersion()); this.setOriginUI(cdt.isOriginUI()); this.setCreationTime(cdt.getCreationTime()); @@ -54,11 +55,11 @@ public class RelationshipInstDataDefinition extends ToscaDataDefinition { return (String) getToscaPresentationValue(JsonPresentationFields.REQUIREMENT); } public void setCapability(String capability) { - setToscaPresentationValue(JsonPresentationFields.CAPAPILITY, capability); + setToscaPresentationValue(JsonPresentationFields.CAPABILITY, capability); } public String getCapability() { - return (String) getToscaPresentationValue(JsonPresentationFields.CAPAPILITY); + return (String) getToscaPresentationValue(JsonPresentationFields.CAPABILITY); } public void setToId(Object toId) { setToscaPresentationValue(JsonPresentationFields.TO_ID, toId); @@ -144,6 +145,14 @@ public class RelationshipInstDataDefinition extends ToscaDataDefinition { setToscaPresentationValue(JsonPresentationFields.VALID_SOURCE_TYPES, validSourceTypes); } + public List<String> getValidTargetTypes() { + return (List<String>) getToscaPresentationValue(JsonPresentationFields.VALID_TARGET_TYPES); + } + + public void setValidTargetTypes(List<String> validTargetTypes) { + setToscaPresentationValue(JsonPresentationFields.VALID_TARGET_TYPES, validTargetTypes); + } + public String getVersion() { return (String) getToscaPresentationValue(JsonPresentationFields.VERSION); } diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementDataDefinition.java index 4ede93eaa6..0df5ba500d 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementDataDefinition.java @@ -31,7 +31,7 @@ import java.util.List; */ public class RequirementDataDefinition extends ToscaDataDefinition { - public static final String MIN_OCCURRENCES = "1"; + public static final String MIN_OCCURRENCES = "0"; public static final String MAX_OCCURRENCES = "UNBOUNDED"; public static final String MAX_DEFAULT_OCCURRENCES = "1"; @@ -107,11 +107,11 @@ public class RequirementDataDefinition extends ToscaDataDefinition { */ public String getCapability() { - return (String) getToscaPresentationValue(JsonPresentationFields.CAPAPILITY); + return (String) getToscaPresentationValue(JsonPresentationFields.CAPABILITY); } public void setCapability(String capability) { - setToscaPresentationValue(JsonPresentationFields.CAPAPILITY, capability); + setToscaPresentationValue(JsonPresentationFields.CAPABILITY, capability); } /** 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 7a4c3d4af7..a72984ab7d 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 @@ -129,10 +129,11 @@ public enum JsonPresentationFields { SOURCE("source", null), //Requirement - CAPAPILITY("capability", null), + CAPABILITY("capability", null), NODE("node", null), RELATIONSHIP("relationship", null), VALID_SOURCE_TYPES("validSourceTypes", null), + VALID_TARGET_TYPES("validTargetTypes", null), REQUIREMENT_ID("requirementId", null), PARENT_NAME("parentName", null), PREVIOUS_NAME("previousName", null), |