Policy 1707 commit to LF
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / openecomp / policy / api / DictionaryType.java
index 0935f64..b50f398 100644 (file)
 
 package org.openecomp.policy.api;
 
-public enum DictionaryType {
+import com.fasterxml.jackson.annotation.JsonCreator;
+
+public enum DictionaryType{
        /**
         * Indicates Common Dictionaries. 
         */
        Common("Common"),
+       /**
+        * Indicates Action Policy Dictionaries
+        */
+       Action("Action"),
        /**
         * Indicates ClosedLoop Policy Dictionaries. 
         */
@@ -32,7 +38,7 @@ public enum DictionaryType {
        /**
         * Indicates Firewall Config Policy Dictionaries. 
         */
-       Firewall("FW"),
+       Firewall("Firewall"),
        /**
         * Indicates Decision Policy Dictionaries. 
         */
@@ -44,7 +50,7 @@ public enum DictionaryType {
        /**
         * Indicates DCAE Micro Service Policy Dictionaries. 
         */
-       MicroService("MS"),
+       MicroService("MicroService"),
        /**
         * Indicates Descriptive Scope Dictionaries
         */
@@ -53,6 +59,14 @@ public enum DictionaryType {
         * Indicates Policy Scope Dictionaries
         */
        PolicyScope("PolicyScope"),
+       /**
+        * Indicates Enforcer Dictionaries
+        */
+       Enforcer("Enforcer"),
+       /**
+        * Indicates SafePolicy Dictionaries
+        */
+       SafePolicy("SafePolicy"),
        ;
        
        private String name;
@@ -69,5 +83,14 @@ public enum DictionaryType {
                return this.name;
        }
        
+       @JsonCreator
+    public static DictionaryType create (String value) {
+        for(DictionaryType type: values()){
+            if(type.toString().equals(value) || type.equals(DictionaryType.valueOf(value))){
+                return type;
+            }
+        }
+        throw new IllegalArgumentException();
+    }
 
 }