aboutsummaryrefslogtreecommitdiffstats
path: root/common-be/src/main/java/org
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2022-09-15 14:27:20 +0100
committerMichael Morris <michael.morris@est.tech>2022-09-19 08:39:08 +0000
commit3935993a90fe768585ab5e908d6334567c1823de (patch)
tree6539da2e6809e0faa6859e5b9deb2ce6cdd93181 /common-be/src/main/java/org
parent0d38a72c022fa93dba0bf052f893e51fb73d3552 (diff)
Import unknown group types during Service import
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: Ic435ee0c440dd8ed64339bab08e921687d23b9c0 Issue-ID: SDC-4176
Diffstat (limited to 'common-be/src/main/java/org')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GroupTypeDataDefinition.java88
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaTypeDataDefinition.java34
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java2
3 files changed, 18 insertions, 106 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GroupTypeDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GroupTypeDataDefinition.java
index 19f88b3196..a2990f90bc 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GroupTypeDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GroupTypeDataDefinition.java
@@ -22,7 +22,13 @@ package org.openecomp.sdc.be.datatypes.elements;
import java.util.List;
import java.util.Map;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+@Getter
+@Setter
+@NoArgsConstructor
public class GroupTypeDataDefinition extends ToscaTypeDataDefinition {
private String uniqueId;
@@ -43,9 +49,6 @@ public class GroupTypeDataDefinition extends ToscaTypeDataDefinition {
*/
private Long modificationTime;
- public GroupTypeDataDefinition() {
- }
-
public GroupTypeDataDefinition(GroupTypeDataDefinition other) {
super(other);
this.uniqueId = other.uniqueId;
@@ -59,83 +62,12 @@ public class GroupTypeDataDefinition extends ToscaTypeDataDefinition {
this.derivedFrom = other.derivedFrom;
}
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public List<String> getMembers() {
- return members;
- }
-
- public void setMembers(List<String> members) {
- this.members = members;
- }
-
- public Map<String, String> getMetadata() {
- return metadata;
- }
-
- public void setMetadata(Map<String, String> metadata) {
- this.metadata = metadata;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getUniqueId() {
- return uniqueId;
- }
-
- public void setUniqueId(String uniqueId) {
- this.uniqueId = uniqueId;
- }
-
- public Long getCreationTime() {
- return creationTime;
- }
-
- public void setCreationTime(Long creationTime) {
- this.creationTime = creationTime;
- }
-
- public Long getModificationTime() {
- return modificationTime;
- }
-
- public void setModificationTime(Long modificationTime) {
- this.modificationTime = modificationTime;
- }
-
@Override
public String toString() {
- return "GroupTypeDataDefinition [uniqueId=" + uniqueId + ", type=" + getType() + ", name=" + getName() + ", icon=" + getIcon() + ", version=" + version
- + ", members=" + members + ", metadata=" + metadata + ", description=" + description + ", creationTime="
- + creationTime + ", modificationTime=" + modificationTime + "]";
- }
-
- public String getDerivedFrom() {
- return derivedFrom;
- }
-
- public void setDerivedFrom(String derivedFrom) {
- this.derivedFrom = derivedFrom;
- }
-
- public boolean isHighestVersion() {
- return highestVersion;
- }
-
- public void setHighestVersion(boolean isLatestVersion) {
- this.highestVersion = isLatestVersion;
+ return "GroupTypeDataDefinition [uniqueId=" + uniqueId + ", type=" + getType() + ", name=" + getName() + ", icon=" + getIcon() + ", version="
+ + version
+ + ", members=" + members + ", metadata=" + metadata + ", description=" + description + ", creationTime="
+ + creationTime + ", modificationTime=" + modificationTime + "]";
}
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaTypeDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaTypeDataDefinition.java
index b6f9fa236d..881122fe66 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaTypeDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaTypeDataDefinition.java
@@ -20,44 +20,24 @@
package org.openecomp.sdc.be.datatypes.elements;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
+@Getter
+@Setter
+@NoArgsConstructor
public class ToscaTypeDataDefinition extends ToscaDataDefinition {
private String name;
private String icon;
private String type;
- ToscaTypeDataDefinition() {
- }
-
ToscaTypeDataDefinition(ToscaTypeDataDefinition other) {
- this.name = other.getName();
+ this.name = other.name;
this.icon = other.icon;
this.type = other.type;
}
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getIcon() {
- return icon;
- }
-
- public void setIcon(String icon) {
- this.icon = icon;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java b/common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java
index ca349514f3..1d1bfa6eb9 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java
@@ -65,7 +65,7 @@ public class TypeUtils {
PARAMETERS("parameters"),
// Import Validations
TOSCA_VERSION("tosca_definitions_version"), TOPOLOGY_TEMPLATE("topology_template"), OCCURRENCES("occurrences"),
- NODE_TEMPLATES("node_templates"), GROUPS("groups"), INPUTS("inputs"),
+ NODE_TEMPLATES("node_templates"), GROUPS("groups"), GROUP_TYPES("group_types"), INPUTS("inputs"),
OUTPUTS("outputs"), RELATIONSHIP_TEMPLATES("relationship_templates"),
SUBSTITUTION_MAPPINGS("substitution_mappings"), NODE_TYPE("node_type"), DIRECTIVES("directives"),
// Attributes