summaryrefslogtreecommitdiffstats
path: root/common-be/src
diff options
context:
space:
mode:
Diffstat (limited to 'common-be/src')
-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
-rw-r--r--common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/GroupTypeDataDefinitionTest.java274
4 files changed, 18 insertions, 380 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
diff --git a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/GroupTypeDataDefinitionTest.java b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/GroupTypeDataDefinitionTest.java
deleted file mode 100644
index 2a75b785c5..0000000000
--- a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/elements/GroupTypeDataDefinitionTest.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.be.datatypes.elements;
-
-import org.junit.Test;
-
-import java.util.List;
-import java.util.Map;
-
-
-public class GroupTypeDataDefinitionTest {
-
- private GroupTypeDataDefinition createTestSubject() {
- return new GroupTypeDataDefinition();
- }
-
- @Test
- public void testCopyConstructor() throws Exception {
- GroupTypeDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- new GroupTypeDataDefinition(testSubject);
- }
-
- @Test
- public void testGetType() throws Exception {
- GroupTypeDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getType();
- }
-
-
- @Test
- public void testSetType() throws Exception {
- GroupTypeDataDefinition testSubject;
- String type = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setType(type);
- }
-
-
- @Test
- public void testGetVersion() throws Exception {
- GroupTypeDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getVersion();
- }
-
-
- @Test
- public void testSetVersion() throws Exception {
- GroupTypeDataDefinition testSubject;
- String version = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setVersion(version);
- }
-
-
- @Test
- public void testGetMembers() throws Exception {
- GroupTypeDataDefinition testSubject;
- List<String> result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getMembers();
- }
-
-
- @Test
- public void testSetMembers() throws Exception {
- GroupTypeDataDefinition testSubject;
- List<String> members = null;
-
- // default test
- testSubject = createTestSubject();
- testSubject.setMembers(members);
- }
-
-
- @Test
- public void testGetMetadata() throws Exception {
- GroupTypeDataDefinition testSubject;
- Map<String, String> result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getMetadata();
- }
-
-
- @Test
- public void testSetMetadata() throws Exception {
- GroupTypeDataDefinition testSubject;
- Map<String, String> metadata = null;
-
- // default test
- testSubject = createTestSubject();
- testSubject.setMetadata(metadata);
- }
-
-
- @Test
- public void testGetDescription() throws Exception {
- GroupTypeDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getDescription();
- }
-
-
- @Test
- public void testSetDescription() throws Exception {
- GroupTypeDataDefinition testSubject;
- String description = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setDescription(description);
- }
-
-
- @Test
- public void testGetUniqueId() throws Exception {
- GroupTypeDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getUniqueId();
- }
-
-
- @Test
- public void testSetUniqueId() throws Exception {
- GroupTypeDataDefinition testSubject;
- String uniqueId = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setUniqueId(uniqueId);
- }
-
-
- @Test
- public void testGetCreationTime() throws Exception {
- GroupTypeDataDefinition testSubject;
- Long result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getCreationTime();
- }
-
-
- @Test
- public void testSetCreationTime() throws Exception {
- GroupTypeDataDefinition testSubject;
- Long creationTime = null;
-
- // default test
- testSubject = createTestSubject();
- testSubject.setCreationTime(creationTime);
- }
-
-
- @Test
- public void testGetModificationTime() throws Exception {
- GroupTypeDataDefinition testSubject;
- Long result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getModificationTime();
- }
-
-
- @Test
- public void testSetModificationTime() throws Exception {
- GroupTypeDataDefinition testSubject;
- Long modificationTime = null;
-
- // default test
- testSubject = createTestSubject();
- testSubject.setModificationTime(modificationTime);
- }
-
-
- @Test
- public void testToString() throws Exception {
- GroupTypeDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.toString();
- }
-
-
- @Test
- public void testGetDerivedFrom() throws Exception {
- GroupTypeDataDefinition testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getDerivedFrom();
- }
-
-
- @Test
- public void testSetDerivedFrom() throws Exception {
- GroupTypeDataDefinition testSubject;
- String derivedFrom = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setDerivedFrom(derivedFrom);
- }
-
-
- @Test
- public void testIsHighestVersion() throws Exception {
- GroupTypeDataDefinition testSubject;
- boolean result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.isHighestVersion();
- }
-
-
- @Test
- public void testSetHighestVersion() throws Exception {
- GroupTypeDataDefinition testSubject;
- boolean isLatestVersion = false;
-
- // default test
- testSubject = createTestSubject();
- testSubject.setHighestVersion(isLatestVersion);
- }
-}