Merge "BUG-2329 Add test for anyxmls inside rpc resonse for netcfon-connector"
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / authorization / AppRoleLevel.java
index aa6514cd74e2f0ed8d338fb49e3d62c74c3b9286..124b495147db61d99b53b24138bf47e5dda4083c 100644 (file)
@@ -19,7 +19,7 @@ import java.io.Serializable;
  */
 public enum AppRoleLevel implements Serializable {
     APPADMIN(0, "App-Admin", "Application Administrator"), APPUSER(1,
-            "App-User", "Application User"), APPOPERATOR(2, "Network-Operator",
+            "App-User", "Application User"), APPOPERATOR(2, "App-Operator",
             "Application Operator"), NOUSER(255, "Unknown User", "Unknown User");
 
     private int userLevel;
@@ -43,4 +43,13 @@ public enum AppRoleLevel implements Serializable {
     public String toStringPretty() {
         return this.prettyLevel;
     }
+
+    public static AppRoleLevel fromString(String levelString) {
+        for (AppRoleLevel rolelevel : AppRoleLevel.values()) {
+                if (rolelevel.toString().equals(levelString)) {
+                        return rolelevel;
+                }
+        }
+        return null;
+    }
 }