Fix sonar warnings in config-util.
[controller.git] / opendaylight / config / config-manager-facade-xml / src / main / java / org / opendaylight / controller / config / facade / xml / strategy / EditStrategyType.java
index c5af3ec065f3bb53b1de1a87a0d2954a614bc8ca..9954592b0a624268f446cfe20ae7e12174533b5d 100644 (file)
@@ -17,7 +17,7 @@ public enum EditStrategyType {
     // can be default
     merge, replace, none,
     // additional per element
-    delete, remove;
+    delete, remove, recreate;
 
     private static final Set<EditStrategyType> defaultStrats = EnumSet.of(merge, replace, none);
 
@@ -31,6 +31,7 @@ public enum EditStrategyType {
         case none:
         case remove:
         case delete:
+        case recreate:
             return false;
         case replace:
             return true;
@@ -47,9 +48,9 @@ public enum EditStrategyType {
                 throw new OperationNotPermittedException(String.format("With "
                         + defaultStrategy
                         + " as default-operation operations on module elements are not permitted since the default option is restrictive"),
-                        DocumentedException.ErrorType.application,
-                        DocumentedException.ErrorTag.operation_failed,
-                        DocumentedException.ErrorSeverity.error);
+                        DocumentedException.ErrorType.APPLICATION,
+                        DocumentedException.ErrorTag.OPERATION_FAILED,
+                        DocumentedException.ErrorSeverity.ERROR);
             }
         }
 
@@ -64,6 +65,8 @@ public enum EditStrategyType {
             return new DeleteEditConfigStrategy();
         case remove:
             return new RemoveEditConfigStrategy();
+        case recreate:
+            return new ReCreateEditConfigStrategy();
         case none:
             return new NoneEditConfigStrategy();
         default: