X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-notifications-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fnotifications%2Fimpl%2Fops%2FCreateSubscription.java;h=bdd1c3a6a72a2cebd1cba700b1936826667f085b;hp=0d6b4248f6a9a1ea741c0456e35828e2f15b0ffd;hb=refs%2Fchanges%2F13%2F23413%2F26;hpb=071a641d7c12c0e6112d5ce0afe806b54f116ed2 diff --git a/opendaylight/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/controller/netconf/notifications/impl/ops/CreateSubscription.java b/opendaylight/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/controller/netconf/notifications/impl/ops/CreateSubscription.java index 0d6b4248f6..bdd1c3a6a7 100644 --- a/opendaylight/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/controller/netconf/notifications/impl/ops/CreateSubscription.java +++ b/opendaylight/netconf/netconf-notifications-impl/src/main/java/org/opendaylight/controller/netconf/notifications/impl/ops/CreateSubscription.java @@ -12,7 +12,9 @@ import com.google.common.base.Optional; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import java.util.List; -import org.opendaylight.controller.netconf.api.NetconfDocumentedException; +import org.opendaylight.controller.config.util.xml.DocumentedException; +import org.opendaylight.controller.config.util.xml.XmlElement; +import org.opendaylight.controller.config.util.xml.XmlUtil; import org.opendaylight.controller.netconf.api.NetconfSession; import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants; import org.opendaylight.controller.netconf.mapping.api.SessionAwareNetconfOperation; @@ -22,8 +24,6 @@ import org.opendaylight.controller.netconf.notifications.NetconfNotificationRegi import org.opendaylight.controller.netconf.notifications.NotificationListenerRegistration; import org.opendaylight.controller.netconf.notifications.impl.NetconfNotificationManager; import org.opendaylight.controller.netconf.util.mapping.AbstractLastNetconfOperation; -import org.opendaylight.controller.netconf.util.xml.XmlElement; -import org.opendaylight.controller.netconf.util.xml.XmlUtil; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.CreateSubscriptionInput; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.StreamNameType; import org.slf4j.Logger; @@ -51,7 +51,7 @@ public class CreateSubscription extends AbstractLastNetconfOperation implements } @Override - protected Element handleWithNoSubsequentOperations(final Document document, final XmlElement operationElement) throws NetconfDocumentedException { + protected Element handleWithNoSubsequentOperations(final Document document, final XmlElement operationElement) throws DocumentedException { operationElement.checkName(CREATE_SUBSCRIPTION); operationElement.checkNamespace(CreateSubscriptionInput.QNAME.getNamespace().toString()); // FIXME reimplement using CODEC_REGISTRY and parse everything into generated class instance @@ -84,7 +84,7 @@ public class CreateSubscription extends AbstractLastNetconfOperation implements return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.absent()); } - private static StreamNameType parseStreamIfPresent(final XmlElement operationElement) throws NetconfDocumentedException { + private static StreamNameType parseStreamIfPresent(final XmlElement operationElement) throws DocumentedException { final Optional stream = operationElement.getOnlyChildElementWithSameNamespaceOptionally("stream"); return stream.isPresent() ? new StreamNameType(stream.get().getTextContent()) : NetconfNotificationManager.BASE_STREAM_NAME; }