diff options
author | Tal Gitelman <tg851x@intl.att.com> | 2017-06-29 19:30:00 +0300 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2017-06-29 21:32:19 +0300 |
commit | ed7e1c3dfe332abc67ed943717db2ee94406f95e (patch) | |
tree | e0f2f39596656456272900f59aadc3dff6c6e828 /common-be/src/main/java | |
parent | 68ccc45de18f41cddb79de33a245bceb3b063ffb (diff) |
[SDC] rebase code
Change-Id: I456ec65a233d277e6bae35e140f2e3da5765bae6
Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'common-be/src/main/java')
2 files changed, 52 insertions, 4 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 e236fcb963..b6f9b82c45 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 @@ -60,6 +60,7 @@ public class ComponentInstanceDataDefinition extends ToscaDataDefinition impleme private String componentName; private String componentVersion; private String toscaComponentName; + private String invariantName; public ComponentInstanceDataDefinition() { super(); @@ -82,6 +83,7 @@ public class ComponentInstanceDataDefinition extends ToscaDataDefinition impleme this.componentName = dataDefinition.componentName; this.componentVersion = dataDefinition.componentVersion; this.toscaComponentName = dataDefinition.toscaComponentName; + this.invariantName = dataDefinition.invariantName; } public String getIcon() { @@ -152,8 +154,19 @@ public class ComponentInstanceDataDefinition extends ToscaDataDefinition impleme } public void setName(String name) { + if(invariantName == null){ + invariantName = name; + } this.name = name; } + + public String getInvariantName() { + return invariantName; + } + + public void setInvariantName(String invariantName) { + this.invariantName = invariantName; + } public Integer getPropertyValueCounter() { return propertyValueCounter; 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 e669d66c50..0b8456bd5c 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 @@ -66,7 +66,9 @@ public class PropertyDataDefinition extends ToscaDataDefinition implements Seria private String inputPath; private String status; - + private String inputId; + private String instanceUniqueId; + private String propertyId; /** * The resource id which this property belongs to */ @@ -85,7 +87,6 @@ public class PropertyDataDefinition extends ToscaDataDefinition implements Seria } public PropertyDataDefinition(PropertyDataDefinition p) { - super(); this.setUniqueId(p.getUniqueId()); this.setRequired(p.isRequired()); @@ -105,7 +106,9 @@ public class PropertyDataDefinition extends ToscaDataDefinition implements Seria this.setGetInputValues(p.getInputValues); this.setInputPath(p.getInputPath()); this.setStatus(p.getStatus()); - + this.setInputId(p.getInputId()); + this.setInstanceUniqueId(p.getInstanceUniqueId()); + this.setPropertyId(p.getPropertyId()); } public String getInputPath() { @@ -247,9 +250,36 @@ public class PropertyDataDefinition extends ToscaDataDefinition implements Seria this.status = status; } + public String getInputId() { + return inputId; + } + + public void setInputId(String inputId) { + this.inputId = inputId; + } + + public String getInstanceUniqueId() { + return instanceUniqueId; + } + + public void setInstanceUniqueId(String instanceUniqueId) { + this.instanceUniqueId = instanceUniqueId; + } + + public String getPropertyId() { + return propertyId; + } + + public void setPropertyId(String propertyId) { + this.propertyId = propertyId; + } + + @Override public String toString() { - return "PropertyDataDefinition [uniqueId=" + uniqueId + ", type=" + type + ", required=" + required + ", defaultValue=" + defaultValue + ", description=" + description + ", entrySchema=" + schema + ", parentUniqueId=" + parentUniqueId + ", password=" + password + "]"; + 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 + "]"; } @Override @@ -362,6 +392,11 @@ public class PropertyDataDefinition extends ToscaDataDefinition implements Seria } return null; } + + public void convertPropertyDataToInstancePropertyData(){ + if(null != value) + defaultValue = value; + } |