aboutsummaryrefslogtreecommitdiffstats
path: root/common-be
diff options
context:
space:
mode:
Diffstat (limited to 'common-be')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java13
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java43
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;
+ }