Decouple config and netconf subsystems.
[controller.git] / opendaylight / netconf / netconf-mapping-api / src / main / java / org / opendaylight / controller / netconf / mapping / api / NetconfOperationChainedExecution.java
index 22981530177dc57c2fd90bca03b7ea04880cd2c5..e474422cec317f8dfc390912e1f0ff10843d0b91 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.controller.netconf.mapping.api;
 
-import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
+import org.opendaylight.controller.config.util.xml.DocumentedException;
 import org.w3c.dom.Document;
 
 /**
@@ -26,5 +26,19 @@ public interface NetconfOperationChainedExecution {
     /**
      * Do not execute if this is termination point
      */
-    Document execute(Document requestMessage) throws NetconfDocumentedException;
+    Document execute(Document requestMessage) throws DocumentedException;
+
+    public static final NetconfOperationChainedExecution EXECUTION_TERMINATION_POINT = new NetconfOperationChainedExecution() {
+        @Override
+        public boolean isExecutionTermination() {
+            return true;
+        }
+
+        @Override
+        public Document execute(Document requestMessage) throws DocumentedException {
+            throw new IllegalStateException("This execution represents the termination point in operation execution and cannot be executed itself");
+        }
+    };
+
+
 }