summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ArtifactCategory.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ArtifactCategory.java')
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ArtifactCategory.java65
1 files changed, 29 insertions, 36 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ArtifactCategory.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ArtifactCategory.java
index c037832e58..e1405d5435 100644
--- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ArtifactCategory.java
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ArtifactCategory.java
@@ -7,9 +7,9 @@
* 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.
@@ -17,7 +17,6 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.core.enrichment.types;
import java.util.Collections;
@@ -26,42 +25,36 @@ import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Getter;
-
@AllArgsConstructor
public enum ArtifactCategory {
-
- INFORMATIONAL("Informational"),
- DEPLOYMENT("Deployment");
-
- private static final Map<String, ArtifactCategory> mMap =
- Collections.unmodifiableMap(initializeMapping());
-
- @Getter
- private String displayName;
-
- /**
- * Initialize mapping map.
- *
- * @return the map
- */
- public static Map<String, ArtifactCategory> initializeMapping() {
- Map<String, ArtifactCategory> typeMap = new HashMap<>();
- for (ArtifactCategory v : ArtifactCategory.values()) {
- typeMap.put(v.displayName, v);
+ INFORMATIONAL("Informational"), DEPLOYMENT("Deployment");
+ private static final Map<String, ArtifactCategory> mMap = Collections.unmodifiableMap(initializeMapping());
+ @Getter
+ private String displayName;
+
+ /**
+ * Initialize mapping map.
+ *
+ * @return the map
+ */
+ public static Map<String, ArtifactCategory> initializeMapping() {
+ Map<String, ArtifactCategory> typeMap = new HashMap<>();
+ for (ArtifactCategory v : ArtifactCategory.values()) {
+ typeMap.put(v.displayName, v);
+ }
+ return typeMap;
}
- return typeMap;
- }
- /**
- * Gets artifact type by display name.
- *
- * @param displayName the display name
- * @return the artifact type by display name
- */
- public static ArtifactCategory getArtifactTypeByDisplayName(String displayName) {
- if (mMap.containsKey(displayName)) {
- return mMap.get(displayName);
+ /**
+ * Gets artifact type by display name.
+ *
+ * @param displayName the display name
+ * @return the artifact type by display name
+ */
+ public static ArtifactCategory getArtifactTypeByDisplayName(String displayName) {
+ if (mMap.containsKey(displayName)) {
+ return mMap.get(displayName);
+ }
+ return null;
}
- return null;
- }
}