summaryrefslogtreecommitdiffstats
path: root/common-be/src/main/java/org/openecomp
diff options
context:
space:
mode:
authorToshimichi Fukuda <t_fukuda@jp.fujitsu.com>2019-04-18 21:38:46 +0900
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-05-07 16:09:28 +0000
commit51411acd1d4b06fc9bbc40338a27dd061dba425f (patch)
tree51cbc4bb3372b7aa06e566eec6181b7a1838eee5 /common-be/src/main/java/org/openecomp
parent55c536e65dcbd1981de61c6c8bea318585324d22 (diff)
Change to enable SDC list type input
Change-Id: Ic3a9c6e714a5afd22b58bf2cb066932b1ec2a5c0 Issue-ID: SDC-2046 Signed-off-by: Toshimichi Fukuda <t_fukuda@jp.fujitsu.com> Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Signed-off-by: Ayumu Ueha <ueha.ayumu@jp.fujitsu.com>
Diffstat (limited to 'common-be/src/main/java/org/openecomp')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/DataTypeDataDefinition.java14
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java79
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java3
3 files changed, 64 insertions, 32 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/DataTypeDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/DataTypeDataDefinition.java
index 358f8ef614..a4042d9917 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/DataTypeDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/DataTypeDataDefinition.java
@@ -22,6 +22,8 @@ package org.openecomp.sdc.be.datatypes.elements;
import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
+import java.util.List;
+
public class DataTypeDataDefinition extends ToscaDataDefinition {
private String name;
@@ -43,6 +45,8 @@ public class DataTypeDataDefinition extends ToscaDataDefinition {
*/
private Long modificationTime;
+ private List<PropertyDataDefinition> propertiesData;
+
public DataTypeDataDefinition() {
}
@@ -104,11 +108,19 @@ public class DataTypeDataDefinition extends ToscaDataDefinition {
this.modificationTime = modificationTime;
}
+ public List<PropertyDataDefinition> getPropertiesData() {
+ return propertiesData;
+ }
+
+ public void setPropertiesData(List<PropertyDataDefinition> propertiesData) {
+ this.propertiesData = propertiesData;
+ }
+
@Override
public String toString() {
return "DataTypeDataDefinition [name=" + name + ", uniqueId=" + uniqueId + ", derivedFromName="
+ derivedFromName + ", description=" + description + ", creationTime=" + creationTime
- + ", modificationTime=" + modificationTime + "]";
+ + ", modificationTime=" + modificationTime + ", propertiesData=" + propertiesData + "]";
}
}
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 fed728dade..218b648742 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
@@ -75,6 +75,8 @@ public class PropertyDataDefinition extends ToscaDataDefinition {
private List<GetInputValueDataDefinition> getInputValues;
+ private Boolean isDeclaredListInput = Boolean.FALSE;
+
private List<GetPolicyValueDataDefinition> getPolicyValues;
public PropertyDataDefinition() {
@@ -86,35 +88,36 @@ public class PropertyDataDefinition extends ToscaDataDefinition {
}
- public PropertyDataDefinition(PropertyDataDefinition p) {
+ public PropertyDataDefinition(PropertyDataDefinition propertyDataDefinition) {
super();
- this.setUniqueId(p.getUniqueId());
- this.setRequired(p.isRequired());
- this.setDefaultValue(p.getDefaultValue());
- this.setDescription(p.getDescription());
- this.setSchema(p.getSchema());
- this.setPassword(p.isPassword());
- this.setType(p.getType());
- this.setName(p.getName());
- this.setValue(p.getValue());
- this.setRequired(p.isRequired());
- this.setHidden(p.isHidden());
- this.setLabel(p.getLabel());
- this.setImmutable(p.isImmutable());
- this.setParentUniqueId(p.getParentUniqueId());
- this.setOwnerId(p.getOwnerId());
- this.setGetInputValues(p.getGetInputValues());
- this.setGetPolicyValues(p.getGetPolicyValues());
- this.setInputPath(p.getInputPath());
- this.setStatus(p.getStatus());
- this.setInputId(p.getInputId());
- this.setInstanceUniqueId(p.getInstanceUniqueId());
- this.setPropertyId(p.getPropertyId());
- this.parentPropertyType = p.getParentPropertyType();
- this.subPropertyInputPath = p.getSubPropertyInputPath();
- if(isNotEmpty(p.annotations)){
- this.setAnnotations(p.annotations);
+ this.setUniqueId(propertyDataDefinition.getUniqueId());
+ this.setRequired(propertyDataDefinition.isRequired());
+ this.setDefaultValue(propertyDataDefinition.getDefaultValue());
+ this.setDescription(propertyDataDefinition.getDescription());
+ this.setSchema(propertyDataDefinition.getSchema());
+ this.setPassword(propertyDataDefinition.isPassword());
+ this.setType(propertyDataDefinition.getType());
+ this.setName(propertyDataDefinition.getName());
+ this.setValue(propertyDataDefinition.getValue());
+ this.setRequired(propertyDataDefinition.isRequired());
+ this.setHidden(propertyDataDefinition.isHidden());
+ this.setLabel(propertyDataDefinition.getLabel());
+ this.setImmutable(propertyDataDefinition.isImmutable());
+ this.setParentUniqueId(propertyDataDefinition.getParentUniqueId());
+ this.setOwnerId(propertyDataDefinition.getOwnerId());
+ this.setGetInputValues(propertyDataDefinition.getGetInputValues());
+ this.setGetPolicyValues(propertyDataDefinition.getGetPolicyValues());
+ this.setInputPath(propertyDataDefinition.getInputPath());
+ this.setStatus(propertyDataDefinition.getStatus());
+ this.setInputId(propertyDataDefinition.getInputId());
+ this.setInstanceUniqueId(propertyDataDefinition.getInstanceUniqueId());
+ this.setPropertyId(propertyDataDefinition.getPropertyId());
+ this.parentPropertyType = propertyDataDefinition.getParentPropertyType();
+ this.subPropertyInputPath = propertyDataDefinition.getSubPropertyInputPath();
+ if(isNotEmpty(propertyDataDefinition.annotations)){
+ this.setAnnotations(propertyDataDefinition.annotations);
}
+ this.setIsDeclaredListInput(propertyDataDefinition.getIsDeclaredListInput());
}
public String getParentPropertyType() {
@@ -321,13 +324,21 @@ public class PropertyDataDefinition extends ToscaDataDefinition {
this.propertyId = propertyId;
}
+ public Boolean getIsDeclaredListInput() {
+ return isDeclaredListInput;
+ }
+
+ public void setIsDeclaredListInput(Boolean isDeclaredListInput) {
+ this.isDeclaredListInput = isDeclaredListInput;
+ }
+
@Override
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
- + "parentPropertyType" + parentPropertyType
- + "subPropertyInputPath" + subPropertyInputPath +"]";
+ + instanceUniqueId + ", propertyId=" + propertyId + ", parentUniqueId=" + parentUniqueId + ", getInputValues=" + getInputValues + ", isDeclaredListInput=" + isDeclaredListInput
+ + ", parentPropertyType=" + parentPropertyType
+ + ", subPropertyInputPath=" + subPropertyInputPath +"]";
}
@Override
@@ -344,6 +355,7 @@ public class PropertyDataDefinition extends ToscaDataDefinition {
result = prime * result + ((uniqueId == null) ? 0 : uniqueId.hashCode());
result = prime * result + ((parentUniqueId == null) ? 0 : parentUniqueId.hashCode());
result = prime * result + ((status == null) ? 0 : status.hashCode());
+ result = prime * result + ((isDeclaredListInput == null) ? 0 : isDeclaredListInput.hashCode());
return result;
}
@@ -446,6 +458,13 @@ public class PropertyDataDefinition extends ToscaDataDefinition {
} else if (!status.equals(other.status)) {
return false;
}
+ if (isDeclaredListInput == null) {
+ if (other.isDeclaredListInput != null) {
+ return false;
+ }
+ } else if (!isDeclaredListInput.equals(other.isDeclaredListInput)) {
+ return false;
+ }
return true;
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java
index a0843eb81f..8d83be461f 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java
@@ -45,7 +45,8 @@ public enum ComponentFieldsEnum {
POLICIES("policies"),
NON_EXCLUDED_POLICIES("nonExcludedPolicies"),
NODE_FILTER("nodeFilter"),
- COMPONENT_INSTANCES_INTERFACES("componentInstancesInterfaces")
+ COMPONENT_INSTANCES_INTERFACES("componentInstancesInterfaces"),
+ DATA_TYPES("dataTypes")
;