aboutsummaryrefslogtreecommitdiffstats
path: root/common-app-api/src
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2019-10-03 15:44:48 +0100
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-11-03 15:43:27 +0000
commit608be265c8491686f269ed12d5d48654ddb090b5 (patch)
tree83a5d2ea332ce8abd271b376306ce42d0466a61d /common-app-api/src
parent433947b5ab5e28fc29aee447de934de89a707419 (diff)
Create new non-mano Artifact Type entry for pnf software information
Issue-ID: SDC-2615 Change-Id: I4dd879d50b1dec58aceeaf0c265901c62d038071 Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Diffstat (limited to 'common-app-api/src')
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java27
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactTypeEnumTest.java12
2 files changed, 9 insertions, 30 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java
index 125cc68707..722a3e74cc 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java
@@ -22,10 +22,14 @@ package org.openecomp.sdc.common.api;
import java.util.ArrayList;
import java.util.List;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
/**
* Enum That Represents possible Artifacts Types.
*/
+@Getter
+@AllArgsConstructor
public enum ArtifactTypeEnum {
CHEF("CHEF"), PUPPET("PUPPET"), YANG("YANG"), SHELL_SCRIPT("SHELL_SCRIPT"), SHELL("SHELL"), ICON("ICON"), UNKNOWN("UNKNOWN"), HEAT("HEAT"), DG_XML("DG_XML"), MURANO_PKG("MURANO_PKG"), HEAT_ENV("HEAT_ENV"), YANG_XML("YANG_XML"), HEAT_VOL("HEAT_VOL"),
HEAT_NET("HEAT_NET"), OTHER("OTHER"), WORKFLOW("WORKFLOW"), NETWORK_CALL_FLOW("NETWORK_CALL_FLOW"), TOSCA_TEMPLATE("TOSCA_TEMPLATE"), TOSCA_CSAR("TOSCA_CSAR"), VNF_CATALOG("VNF_CATALOG"), VF_LICENSE("VF_LICENSE"), BPEL("BPEL"),
@@ -40,25 +44,12 @@ public enum ArtifactTypeEnum {
// MIB artifacts
SNMP_POLL("SNMP_POLL"), SNMP_TRAP("SNMP_TRAP"), GUIDE("GUIDE"),
PLAN("PLAN"), PM_DICTIONARY("PM_DICTIONARY"), YANG_MODULE("YANG_MODULE"),
- ANSIBLE_PLAYBOOK("ANSIBLE_PLAYBOOK"), ONBOARDED_PACKAGE("ONBOARDED_PACKAGE");
+ ANSIBLE_PLAYBOOK("ANSIBLE_PLAYBOOK"), ONBOARDED_PACKAGE("ONBOARDED_PACKAGE"), PNF_SW_INFORMATION("PNF_SW_INFORMATION");
- private String type;
-
- ArtifactTypeEnum(String type) {
- this.type = type;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
+ private final String type;
public static ArtifactTypeEnum findType(final String type) {
- for (ArtifactTypeEnum ate : ArtifactTypeEnum.values()) {
- // According to Pavel/Ella
+ for (final ArtifactTypeEnum ate : ArtifactTypeEnum.values()) {
if (ate.getType().equalsIgnoreCase(type)) {
return ate;
}
@@ -67,8 +58,8 @@ public enum ArtifactTypeEnum {
}
public static List<String> getAllTypes() {
- List<String> types = new ArrayList<>();
- for (ArtifactTypeEnum ate : ArtifactTypeEnum.values()) {
+ final List<String> types = new ArrayList<>();
+ for (final ArtifactTypeEnum ate : ArtifactTypeEnum.values()) {
types.add(ate.getType());
}
return types;
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactTypeEnumTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactTypeEnumTest.java
index 62ed59dcd3..86cdeaafa8 100644
--- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactTypeEnumTest.java
+++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactTypeEnumTest.java
@@ -41,18 +41,6 @@ public class ArtifactTypeEnumTest {
testSubject = createTestSubject();
result = testSubject.getType();
}
-
-
- @Test
- public void testSetType() throws Exception {
- ArtifactTypeEnum testSubject;
- String type = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setType(type);
- }
-
@Test
public void testFindType() throws Exception {