diff options
Diffstat (limited to 'common-be/src/main/java/org')
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") ; |