Cache netconf operations
[netconf.git] / netconf / netconf-monitoring / src / main / java / org / opendaylight / netconf / monitoring / Get.java
index 9e122e36c35e39b37972ba96f4592fe1d73a763d..6b80a135489acef199c1970405c0f6e03debbf27 100644 (file)
@@ -8,10 +8,9 @@
 package org.opendaylight.netconf.monitoring;
 
 import java.util.Collections;
-import org.opendaylight.controller.config.util.xml.DocumentedException;
-import org.opendaylight.controller.config.util.xml.XmlElement;
-import org.opendaylight.controller.config.util.xml.XmlMappingConstants;
+import org.opendaylight.netconf.api.DocumentedException;
 import org.opendaylight.netconf.api.monitoring.NetconfMonitoringService;
+import org.opendaylight.netconf.api.xml.XmlElement;
 import org.opendaylight.netconf.api.xml.XmlNetconfConstants;
 import org.opendaylight.netconf.mapping.api.HandlingPriority;
 import org.opendaylight.netconf.mapping.api.NetconfOperationChainedExecution;
@@ -33,10 +32,9 @@ public class Get extends AbstractNetconfOperation {
         this.netconfMonitor = netconfMonitor;
     }
 
-    private Element getPlaceholder(final Document innerResult)
-            throws DocumentedException {
+    private static Element getPlaceholder(final Document innerResult) throws DocumentedException {
         final XmlElement rootElement = XmlElement.fromDomElementWithExpected(
-                innerResult.getDocumentElement(), XmlMappingConstants.RPC_REPLY_KEY,
+                innerResult.getDocumentElement(), XmlNetconfConstants.RPC_REPLY_KEY,
                 XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);
         return rootElement.getOnlyChildElement(XmlNetconfConstants.DATA_KEY).getDomElement();
     }
@@ -86,8 +84,7 @@ public class Get extends AbstractNetconfOperation {
 
     @Override
     protected Element handle(final Document document, final XmlElement message,
-                             final NetconfOperationChainedExecution subsequentOperation)
-            throws DocumentedException {
+                             final NetconfOperationChainedExecution subsequentOperation) {
         throw new UnsupportedOperationException("Never gets called");
     }
 }