summaryrefslogtreecommitdiffstats
path: root/common-be/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'common-be/src/main/java')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/AssetTypeEnum.java23
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentTypeEnum.java48
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ConnectionPointEnum.java14
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/CreatedFrom.java3
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/DeclarationTypeEnum.java3
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/EnvironmentStatusEnum.java13
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ExternalCategoryTypeEnum.java25
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnum.java17
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GroupTypeEnum.java14
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/InstantiationTypes.java16
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java34
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java12
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/MetadataKeyEnum.java12
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeFilterConstraintType.java3
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeTypeEnum.java15
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/OriginTypeEnum.java43
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PortMirroringEnum.java14
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PromoteVersionEnum.java5
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java19
19 files changed, 133 insertions, 200 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/AssetTypeEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/AssetTypeEnum.java
index 00105f8c5d..2094699534 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/AssetTypeEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/AssetTypeEnum.java
@@ -15,25 +15,16 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
public enum AssetTypeEnum {
RESOURCES("resources", "Resource"), SERVICES("services", "Service"), PRODUCTS("products", "Product");
- private String value;
-
- public String getValue() {
- return value;
- }
-
- public String getCorrespondingComponent() {
- return correspondingComponent;
- }
-
- private String correspondingComponent;
-
- AssetTypeEnum(String value, String correspondingComponent) {
- this.value = value;
- this.correspondingComponent = correspondingComponent;
- }
+ private final String value;
+ private final String correspondingComponent;
public static ComponentTypeEnum convertToComponentTypeEnum(String assetType) {
ComponentTypeEnum ret = null;
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentTypeEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentTypeEnum.java
index d155240e19..e4e689a967 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentTypeEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentTypeEnum.java
@@ -15,6 +15,11 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
public enum ComponentTypeEnum {
RESOURCE("Resource"),
SERVICE("Service"),
@@ -22,37 +27,12 @@ public enum ComponentTypeEnum {
PRODUCT("Product"),
SERVICE_INSTANCE("Service Instance");
- private String value;
-
- ComponentTypeEnum(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
-
// Those values cannot be another field in enum, because they are needed
// as constants for Swagger allowedValues param
public static final String RESOURCE_PARAM_NAME = "resources";
public static final String SERVICE_PARAM_NAME = "services";
public static final String PRODUCT_PARAM_NAME = "products";
-
- public NodeTypeEnum getNodeType() {
-
- switch (this) {
- case RESOURCE:
- return NodeTypeEnum.Resource;
- case SERVICE:
- return NodeTypeEnum.Service;
- case PRODUCT:
- return NodeTypeEnum.Product;
- case RESOURCE_INSTANCE:
- return NodeTypeEnum.ResourceInstance;
- default:
- throw new UnsupportedOperationException("No nodeType is defined for: " + this.getValue());
- }
- }
+ private final String value;
public static ComponentTypeEnum findByValue(String value) {
ComponentTypeEnum ret = null;
@@ -104,4 +84,20 @@ public enum ComponentTypeEnum {
}
return ret;
}
+
+ public NodeTypeEnum getNodeType() {
+
+ switch (this) {
+ case RESOURCE:
+ return NodeTypeEnum.Resource;
+ case SERVICE:
+ return NodeTypeEnum.Service;
+ case PRODUCT:
+ return NodeTypeEnum.Product;
+ case RESOURCE_INSTANCE:
+ return NodeTypeEnum.ResourceInstance;
+ default:
+ throw new UnsupportedOperationException("No nodeType is defined for: " + this.getValue());
+ }
+ }
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ConnectionPointEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ConnectionPointEnum.java
index aea66c9d47..2791055ed5 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ConnectionPointEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ConnectionPointEnum.java
@@ -17,24 +17,24 @@ package org.openecomp.sdc.be.datatypes.enums;
import java.util.Arrays;
import java.util.List;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+@Getter
+@AllArgsConstructor
public enum ConnectionPointEnum {
CAPABILITY("capability"), REQUIREMENT("requirement");
- private String data;
private static List<ConnectionPointEnum> connectionPointEnums = Arrays.asList(values());
+ private final String data;
- ConnectionPointEnum(String inData) {
- this.data = inData;
+ public static ConnectionPointEnum getConnectionPointEnum(String data) {
+ return connectionPointEnums.stream().filter(cp -> cp.toString().equals(data)).findAny().orElse(null);
}
@Override
public String toString() {
return data;
}
-
- public static ConnectionPointEnum getConnectionPointEnum(String data) {
- return connectionPointEnums.stream().filter(cp -> cp.toString().equals(data)).findAny().orElse(null);
- }
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/CreatedFrom.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/CreatedFrom.java
index 74b8cba9c0..9c61120f94 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/CreatedFrom.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/CreatedFrom.java
@@ -15,6 +15,9 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.Getter;
+
+@Getter
public enum CreatedFrom {
UI,
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/DeclarationTypeEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/DeclarationTypeEnum.java
index 30b536ea1d..76ce9cd44b 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/DeclarationTypeEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/DeclarationTypeEnum.java
@@ -20,6 +20,9 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.Getter;
+
+@Getter
public enum DeclarationTypeEnum {
INPUT,
OUTPUT,
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/EnvironmentStatusEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/EnvironmentStatusEnum.java
index aabe4aabbe..635574b413 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/EnvironmentStatusEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/EnvironmentStatusEnum.java
@@ -15,6 +15,11 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
public enum EnvironmentStatusEnum {
UNKNOWN("unknown"),
IN_PROGRESS("in_progress"),
@@ -23,14 +28,6 @@ public enum EnvironmentStatusEnum {
private final String name;
- EnvironmentStatusEnum(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
public static EnvironmentStatusEnum getByName(final String name) {
switch (name) {
case ("in_progress"):
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ExternalCategoryTypeEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ExternalCategoryTypeEnum.java
index 22ef7f3031..4b466dd724 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ExternalCategoryTypeEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ExternalCategoryTypeEnum.java
@@ -15,31 +15,22 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
/**
- * Category Type Enum
- * Any service category to be supported by SDC Ext API can be added here
+ * Category Type Enum Any service category to be supported by SDC Ext API can be added here
*
* @author atifhusain
*/
+@Getter
+@AllArgsConstructor
public enum ExternalCategoryTypeEnum {
PARTNER_DOMAIN_SERVICE("Partner Domain Service", true);
- private String value;
- private boolean isAtomicType;
-
- ExternalCategoryTypeEnum(String value, boolean isAtomicType) {
- this.value = value;
- this.isAtomicType = isAtomicType;
- }
-
- public String getValue() {
- return value;
- }
-
- public boolean isAtomicType() {
- return isAtomicType;
- }
+ private final String value;
+ private final boolean isAtomicType;
public static ExternalCategoryTypeEnum getType(String type) {
for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnum.java
index ffe64e73df..e4245f37fd 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnum.java
@@ -18,21 +18,18 @@ package org.openecomp.sdc.be.datatypes.enums;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+@Getter
+@AllArgsConstructor
public enum FilterKeyEnum {
- RESOURCE_TYPE("resourceType"), SUB_CATEGORY("subCategory"), CATEGORY("category"), DISTRIBUTION_STATUS("distributionStatus"), NAME_FRAGMENT("nameFragment");
+ RESOURCE_TYPE("resourceType"), SUB_CATEGORY("subCategory"), CATEGORY("category"), DISTRIBUTION_STATUS("distributionStatus"), NAME_FRAGMENT(
+ "nameFragment");
private static final int NUMBER_OF_RESOURCES_FILTERED = 3;
private static final int NUMBER_OF_SERVICES_FILTERED = 4;
- private String name;
-
- FilterKeyEnum(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
+ private final String name;
public static List<String> getAllFilters() {
return Arrays.stream(FilterKeyEnum.values()).map(FilterKeyEnum::getName).collect(Collectors.toList());
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GroupTypeEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GroupTypeEnum.java
index 7d55845a0b..4801706a05 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GroupTypeEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GroupTypeEnum.java
@@ -16,16 +16,14 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
public enum GroupTypeEnum {
VF_MODULE("org.openecomp.groups.VfModule"), HEAT_STACK("org.openecomp.groups.HeatStack");
- private String groupTypeName;
-
- GroupTypeEnum(String groupTypeName) {
- this.groupTypeName = groupTypeName;
- }
+ private final String groupTypeName;
- public String getGroupTypeName() {
- return groupTypeName;
- }
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/InstantiationTypes.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/InstantiationTypes.java
index 319c98dcca..dc0908be8d 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/InstantiationTypes.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/InstantiationTypes.java
@@ -16,21 +16,17 @@
package org.openecomp.sdc.be.datatypes.enums;
import java.util.stream.Stream;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+@Getter
+@AllArgsConstructor
public enum InstantiationTypes {
A_LA_CARTE("A-la-carte"),
MACRO("Macro");
- private String value;
-
- InstantiationTypes(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
+ private final String value;
/**
* Checks if enum with the given type exists.
@@ -41,6 +37,6 @@ public enum InstantiationTypes {
public static boolean containsName(String type) {
return Stream.of(InstantiationTypes.values())
- .anyMatch(instType -> type.equals(instType.getValue()));
+ .anyMatch(instType -> type.equals(instType.getValue()));
}
}
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 2ec5b286b8..36d0f40311 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
@@ -105,10 +105,8 @@ public enum JsonPresentationFields {
HEAT_PARAMETERS("heatParameters", null),
GENERATED_FROM_ID("generatedFromId", null),
-
// end artifacts
-
//property
DEFINITION("definition", null),
DEFAULT_VALUE("defaultValue", null),
@@ -236,20 +234,20 @@ public enum JsonPresentationFields {
IS_VSP_ARCHIVED("isVspArchived", GraphPropertyEnum.IS_VSP_ARCHIVED),
CI_IS_ORIGIN_ARCHIVED("isOriginArchived", null),
- //Interface Operation
- IO_OPERATION_TYPE("operationType",null),
- IO_INPUT_PARAMETERS("inputParams",null),
- IO_OUTPUT_PARAMETERS("outputParams",null),
+ //Interface Operation
+ IO_OPERATION_TYPE("operationType", null),
+ IO_INPUT_PARAMETERS("inputParams", null),
+ IO_OUTPUT_PARAMETERS("outputParams", null),
IO_PARAM_NAME("paramName", null),
IO_PARAM_ID("paramId", null),
IO_NAME("name", null),
- IO_MANDATORY("mandatory", null),
- IO_TYPE("type", null),
- IO_PROPERTY("property", null),
- IO_WORKFLOW_NAME("workflowName", null),
- IO_WORKFLOW_VERSION("workflowVersion", null),
- IO_WORKFLOW_ID("workflowId", null),
- IO_WORKFLOW_VERSION_ID("workflowVersionId", null),
+ IO_MANDATORY("mandatory", null),
+ IO_TYPE("type", null),
+ IO_PROPERTY("property", null),
+ IO_WORKFLOW_NAME("workflowName", null),
+ IO_WORKFLOW_VERSION("workflowVersion", null),
+ IO_WORKFLOW_ID("workflowId", null),
+ IO_WORKFLOW_VERSION_ID("workflowVersionId", null),
IO_WORKFLOW_ASSOCIATION_TYPE("workflowAssociationType", null),
//Interface
@@ -274,11 +272,6 @@ public enum JsonPresentationFields {
@ToString.Exclude
private final GraphPropertyEnum storedAs;
- @JsonValue
- public String getPresentation() {
- return presentation;
- }
-
public static String getPresentationByGraphProperty(GraphPropertyEnum property) {
for (JsonPresentationFields currPresentation : JsonPresentationFields.values()) {
if (currPresentation.getStoredAs() == property) {
@@ -298,4 +291,9 @@ public enum JsonPresentationFields {
return null;
}
+ @JsonValue
+ public String getPresentation() {
+ return presentation;
+ }
+
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java
index 5f20c58a84..b3e55ac930 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java
@@ -24,14 +24,14 @@ package org.openecomp.sdc.be.datatypes.enums;
import java.util.List;
import java.util.Map;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+@Getter
+@AllArgsConstructor
public class JsonPresentationFieldsExtractor {
- private Map<String, Object> properties;
-
- public JsonPresentationFieldsExtractor(Map<String, Object> properties) {
- this.properties = properties;
- }
+ private final Map<String, Object> properties;
public String getUniqueId() {
return (String) properties.get(JsonPresentationFields.UNIQUE_ID.getPresentation());
@@ -148,7 +148,7 @@ public class JsonPresentationFieldsExtractor {
}
public ResourceTypeEnum getResourceType() {
- return ResourceTypeEnum.valueOf((String)properties.get(JsonPresentationFields.RESOURCE_TYPE.getPresentation()));
+ return ResourceTypeEnum.valueOf((String) properties.get(JsonPresentationFields.RESOURCE_TYPE.getPresentation()));
}
public String getToscaResourceName() {
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/MetadataKeyEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/MetadataKeyEnum.java
index 0ed8eab720..138c60b4e0 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/MetadataKeyEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/MetadataKeyEnum.java
@@ -18,19 +18,17 @@
*/
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.AllArgsConstructor;
import lombok.Getter;
+@Getter
+@AllArgsConstructor
public enum MetadataKeyEnum {
- METADATA_KEYS("metadataKeys"),
- NAME("name"),
+ METADATA_KEYS("metadataKeys"),
+ NAME("name"),
MANDATORY("mandatory"),
VALID_VALUES("validValues");
- @Getter
private final String name;
- MetadataKeyEnum(final String name) {
- this.name = name;
- }
-
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeFilterConstraintType.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeFilterConstraintType.java
index 76db876b04..13b6629b3c 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeFilterConstraintType.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeFilterConstraintType.java
@@ -32,11 +32,10 @@ public enum NodeFilterConstraintType {
PROPERTIES(NodeFilterConstraintType.PROPERTIES_PARAM_NAME),
CAPABILITIES(NodeFilterConstraintType.CAPABILITIES_PARAM_NAME);
- private final String type;
-
// Those values are needed as constants for Swagger allowedValues param
public static final String PROPERTIES_PARAM_NAME = "properties";
public static final String CAPABILITIES_PARAM_NAME = "capabilities";
+ private final String type;
/**
* Parse a String to the related {@link NodeFilterConstraintType}.
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeTypeEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeTypeEnum.java
index a6266d30f0..592bdc45b4 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeTypeEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeTypeEnum.java
@@ -15,6 +15,11 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
public enum NodeTypeEnum {
User("user"),
Service("service"),
@@ -60,15 +65,7 @@ public enum NodeTypeEnum {
AnnotationType("annotationType"),
Component("component");
- private String name;
-
- NodeTypeEnum(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
+ private final String name;
public static NodeTypeEnum getByName(String name) {
for (NodeTypeEnum inst : NodeTypeEnum.values()) {
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/OriginTypeEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/OriginTypeEnum.java
index 5e709054a4..5fad178090 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/OriginTypeEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/OriginTypeEnum.java
@@ -15,6 +15,11 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
public enum OriginTypeEnum {
PRODUCT("Product", "Product", "product instance", ComponentTypeEnum.PRODUCT, false),
SERVICE("Service", "Service", "service instance", ComponentTypeEnum.SERVICE, false),
@@ -30,39 +35,11 @@ public enum OriginTypeEnum {
ServiceProxy("Service Proxy", "Service Proxy", "service proxy", ComponentTypeEnum.RESOURCE, false),
ServiceSubstitution("Service Substitution", "Service Substitution", "service substitution", ComponentTypeEnum.RESOURCE, false);
- private String value;
- private String displayValue;
- private String instanceType;
- private ComponentTypeEnum componentType;
- private boolean isAtomicType;
-
- OriginTypeEnum(String value, String displayValue, String instanceType, ComponentTypeEnum componentType, boolean isAtomicType) {
- this.value = value;
- this.displayValue = displayValue;
- this.instanceType = instanceType;
- this.componentType = componentType;
- this.isAtomicType = isAtomicType;
- }
-
- public String getValue() {
- return value;
- }
-
- public String getDisplayValue() {
- return displayValue;
- }
-
- public String getInstanceType() {
- return instanceType;
- }
-
- public ComponentTypeEnum getComponentType() {
- return componentType;
- }
-
- public boolean isAtomicType() {
- return isAtomicType;
- }
+ private final String value;
+ private final String displayValue;
+ private final String instanceType;
+ private final ComponentTypeEnum componentType;
+ private final boolean isAtomicType;
public static OriginTypeEnum findByValue(String value) {
OriginTypeEnum ret = null;
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PortMirroringEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PortMirroringEnum.java
index 305ae79821..a75ee15239 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PortMirroringEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PortMirroringEnum.java
@@ -22,17 +22,15 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
public enum PortMirroringEnum {
CISCO_VENDOR_NAME("CISCO"),
CISCO_VENDOR_MODEL_NUMBER("4500x");
- private String value;
-
- public String getValue() {
- return value;
- }
+ private final String value;
- PortMirroringEnum(String value) {
- this.value = value;
- }
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PromoteVersionEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PromoteVersionEnum.java
index 3ad423927a..379ef69381 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PromoteVersionEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PromoteVersionEnum.java
@@ -22,8 +22,11 @@
package org.openecomp.sdc.be.datatypes.enums;
+import lombok.Getter;
+
+@Getter
public enum PromoteVersionEnum {
-
+
NONE,
MINOR,
MAJOR
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java
index 2af43dcf78..d0f1c23545 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java
@@ -16,12 +16,16 @@
package org.openecomp.sdc.be.datatypes.enums;
import java.util.Arrays;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
/**
* Resource Type Enum
*
* @author mshitrit
*/
+@Getter
+@AllArgsConstructor
public enum ResourceTypeEnum {
VFC("VFC"/* (Virtual Function Component)"*/, true),
@@ -36,24 +40,11 @@ public enum ResourceTypeEnum {
ServiceProxy("ServiceProxy", true),
//Generic VFC/VF/PNF/Service Type
ABSTRACT("Abstract", true),
- SERVICE("Service"/*(Network Service)"*/,false);
+ SERVICE("Service"/*(Network Service)"*/, false);
private final String value;
private final boolean isAtomicType;
- ResourceTypeEnum(final String value, final boolean isAtomicType) {
- this.value = value;
- this.isAtomicType = isAtomicType;
- }
-
- public String getValue() {
- return value;
- }
-
- public boolean isAtomicType() {
- return isAtomicType;
- }
-
public static ResourceTypeEnum getType(final String type) {
if (type == null) {
return null;