From 6896c1b309aaa50dca820169b9f1ae3f8af84294 Mon Sep 17 00:00:00 2001 From: siddharth0905 Date: Wed, 10 Apr 2019 17:49:51 +0530 Subject: Apply Valid Value Constraints validation Apply Valid Value Constraints validation for FE and BE in Property Assignment, Input, Service Consumption screen Change-Id: I01c7523bad702f003cd52fd88bc69fe950b2b4f3 Issue-ID: SDC-2224 Signed-off-by: siddharth0905 --- .../elements/OperationInputDefinition.java | 7 +++++++ .../datatypes/elements/PropertyDataDefinition.java | 24 +++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'common-be') diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationInputDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationInputDefinition.java index 1e8ef50564..ab3f536d63 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationInputDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationInputDefinition.java @@ -38,6 +38,13 @@ public class OperationInputDefinition extends InputDataDefinition { setSourceProperty(sourceProperty); } + public OperationInputDefinition(OperationInputDefinition oid) { + super(oid); + setName(oid.getName()); + setSource(oid.getSource()); + setSourceProperty(oid.getSourceProperty()); + } + public OperationInputDefinition(String name, String property, Boolean mandatory, String type) { super(); setName(name); diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java index c4a78433f5..88863b2cf5 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java @@ -59,6 +59,8 @@ public class PropertyDataDefinition extends ToscaDataDefinition { private String inputId; private String instanceUniqueId; private String propertyId; + private String parentPropertyType; + private String subPropertyInputPath; private List annotations; /** @@ -100,11 +102,29 @@ public class PropertyDataDefinition extends ToscaDataDefinition { this.setInputId(p.getInputId()); this.setInstanceUniqueId(p.getInstanceUniqueId()); this.setPropertyId(p.getPropertyId()); + this.setParentPropertyType(p.getParentPropertyType()); + this.setSubPropertyInputPath(p.getSubPropertyInputPath()); if(isNotEmpty(p.annotations)){ this.setAnnotations(p.annotations); } } + public String getParentPropertyType() { + return parentPropertyType; + } + + public void setParentPropertyType(String parentPropertyType) { + this.parentPropertyType = parentPropertyType; + } + + public String getSubPropertyInputPath() { + return subPropertyInputPath; + } + + public void setSubPropertyInputPath(String subPropertyInputPath) { + this.subPropertyInputPath = subPropertyInputPath; + } + public String getInputPath() { return inputPath; } @@ -285,7 +305,9 @@ public class PropertyDataDefinition extends ToscaDataDefinition { public String toString() { return "PropertyDataDefinition [uniqueId=" + uniqueId + ", type=" + type + ", required=" + required + ", definition=" + definition + ", defaultValue=" + defaultValue + ", description=" + description + ", schema=" + schema + ", password=" + password + ", name=" + name + ", value=" + value + ", label=" + label + ", hidden=" + hidden + ", immutable=" + immutable + ", inputPath=" + inputPath + ", status=" + status + ", inputId=" + inputId + ", instanceUniqueId=" - + instanceUniqueId + ", propertyId=" + propertyId + ", parentUniqueId=" + parentUniqueId + ", getInputValues=" + getInputValues + "]"; + + instanceUniqueId + ", propertyId=" + propertyId + ", parentUniqueId=" + parentUniqueId + ", getInputValues=" + getInputValues + + "parentPropertyType" + parentPropertyType + + "subPropertyInputPath" + subPropertyInputPath +"]"; } @Override -- cgit 1.2.3-korg