Get rid of netconf operation filters
[controller.git] / opendaylight / netconf / netconf-impl / src / main / java / org / opendaylight / controller / netconf / impl / mapping / operations / DefaultStopExi.java
index 6ea5deb64576f7d936e30f438315e51b823434ef..ae3b00b11ac167029546e38ed0392d6c5d43d809 100644 (file)
@@ -7,20 +7,17 @@
  */\r
 package org.opendaylight.controller.netconf.impl.mapping.operations;\r
 \r
-import org.opendaylight.controller.netconf.api.NetconfSession;\r
 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;\r
-import org.opendaylight.controller.netconf.api.NetconfOperationRouter;\r
+import org.opendaylight.controller.netconf.api.NetconfSession;\r
 import org.opendaylight.controller.netconf.mapping.api.DefaultNetconfOperation;\r
-import org.opendaylight.controller.netconf.mapping.api.HandlingPriority;\r
-import org.opendaylight.controller.netconf.util.mapping.AbstractNetconfOperation;\r
+import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation;\r
 import org.opendaylight.controller.netconf.util.xml.XmlElement;\r
-import org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants;\r
 import org.slf4j.Logger;\r
 import org.slf4j.LoggerFactory;\r
 import org.w3c.dom.Document;\r
 import org.w3c.dom.Element;\r
 \r
-public class DefaultStopExi extends AbstractNetconfOperation implements DefaultNetconfOperation {\r
+public class DefaultStopExi extends AbstractSingletonNetconfOperation implements DefaultNetconfOperation {\r
 \r
     public static final String STOP_EXI = "stop-exi";\r
     private NetconfSession netconfSession;\r
@@ -33,20 +30,13 @@ public class DefaultStopExi extends AbstractNetconfOperation implements DefaultN
     }\r
 \r
     @Override\r
-    protected HandlingPriority canHandle(String operationName,\r
-            String netconfOperationNamespace) {\r
-        if (operationName.equals(STOP_EXI) == false)\r
-            return HandlingPriority.CANNOT_HANDLE;\r
-        if (netconfOperationNamespace\r
-                .equals(XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0) == false)\r
-            return HandlingPriority.CANNOT_HANDLE;\r
-\r
-        return HandlingPriority.HANDLE_WITH_DEFAULT_PRIORITY;\r
+    protected String getOperationName() {\r
+        return STOP_EXI;\r
     }\r
 \r
     @Override\r
-    protected Element handle(Document document, XmlElement operationElement,\r
-            NetconfOperationRouter opRouter) throws NetconfDocumentedException {\r
+    protected Element handleWithNoSubsequentOperations(Document document, XmlElement operationElement)\r
+            throws NetconfDocumentedException {\r
         throw new UnsupportedOperationException("Not implemented");\r
         /*\r
         netconfSession.remove(ExiDecoderHandler.class);\r