summaryrefslogtreecommitdiffstats
path: root/common-be/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'common-be/src/main/java/org')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/DataTypeDataDefinition.java74
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java19
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java4
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java2
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java16
5 files changed, 28 insertions, 87 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 75b5e56719..0574d1377c 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
@@ -20,10 +20,18 @@
package org.openecomp.sdc.be.datatypes.elements;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
import java.util.List;
+@Getter
+@Setter
+@NoArgsConstructor
+@ToString
public class DataTypeDataDefinition extends ToscaDataDefinition {
private String name;
@@ -47,10 +55,6 @@ public class DataTypeDataDefinition extends ToscaDataDefinition {
private List<PropertyDataDefinition> propertiesData;
- public DataTypeDataDefinition() {
-
- }
-
public DataTypeDataDefinition(DataTypeDataDefinition p) {
this.name = p.name;
this.uniqueId = p.uniqueId;
@@ -60,67 +64,5 @@ public class DataTypeDataDefinition extends ToscaDataDefinition {
this.modificationTime = p.modificationTime;
}
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDerivedFromName() {
- return derivedFromName;
- }
-
- public void setDerivedFromName(String derivedFromName) {
- this.derivedFromName = derivedFromName;
- }
-
- 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;
- }
-
- 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 + ", propertiesData=" + propertiesData + "]";
- }
}
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 42696e4ac1..643c03fbe1 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
@@ -15,6 +15,11 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
public enum ComponentFieldsEnum {
PROPERTIES("properties"),
@@ -47,19 +52,9 @@ public enum ComponentFieldsEnum {
NODE_FILTER("nodeFilter"),
SUBSTITUTION_FILTER("substitutionFilter"),
COMPONENT_INSTANCES_INTERFACES("componentInstancesInterfaces"),
- DATA_TYPES("dataTypes");
-
-
- private String value;
-
- ComponentFieldsEnum(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
+ DATA_TYPES("data_types");
+ private final String value;
public static ComponentFieldsEnum findByValue(String value) {
ComponentFieldsEnum ret = null;
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java
index 296b0067b8..1f1c01f9a4 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java
@@ -17,6 +17,7 @@ package org.openecomp.sdc.be.datatypes.enums;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
public enum GraphPropertyEnum {
@@ -51,6 +52,9 @@ public enum GraphPropertyEnum {
//used for category (old format, no json for categories)
ICONS("icons", String.class, false, false),
USE_SUBSTITUTION_FOR_NESTED_SERVICES("useServiceSubstitutionForNestedServices", Boolean.class, false, false),
+
+ DATA_TYPES("data_types", Map.class, false, false),
+
//Archive/Restore
IS_ARCHIVED("isArchived", Boolean.class, false, true),
IS_VSP_ARCHIVED("isVspArchived", Boolean.class, false, true),
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java
index 2dca70cad1..58baeb549c 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java
@@ -60,6 +60,8 @@ public enum JsonPresentationFields {
DERIVED_FROM_GENERIC_VERSION("derivedFromGenericVersion", null),
SERVICE_FUNCTION("serviceFunction", null),
+ DATA_TYPES("data_types", GraphPropertyEnum.DATA_TYPES),
+
////Inputs
ANNOTATIONS("annotations", null),
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 00e8a9ab09..66c64bd05f 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
@@ -21,6 +21,8 @@ package org.openecomp.sdc.be.utils;
import java.util.Map;
import java.util.function.Consumer;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
public class TypeUtils {
@@ -38,6 +40,8 @@ public class TypeUtils {
return FIRST_CERTIFIED_VERSION_VERSION;
}
+ @Getter
+ @AllArgsConstructor
public enum ToscaTagNamesEnum {
DERIVED_FROM("derived_from"), IS_PASSWORD("is_password"),
// Properties
@@ -64,17 +68,11 @@ public class TypeUtils {
//functions
GET_INPUT("get_input"),
// Definitions
- DATA_TYPES("data_types"), NODE_TYPES("node_types"), IMPORTS("imports");
+ DATA_TYPES("data_types"), NODE_TYPES("node_types"), IMPORTS("imports"),
- private final String elementName;
-
- ToscaTagNamesEnum(final String elementName) {
- this.elementName = elementName;
- }
+ DERIVED_FROM_NAME("derivedFromName");
- public String getElementName() {
- return elementName;
- }
+ private final String elementName;
}
}