Introduce restconf.server.{api,spi,mdsal}
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / server / mdsal / streams / notif / NotificationFormatter.java
similarity index 88%
rename from restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/NotificationFormatter.java
rename to restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/mdsal/streams/notif/NotificationFormatter.java
index c009fd7f39677ae87a6d97ac5eeb0e73c93a8256..7e4b5ec09c5394b1a03a2b5dcaca1000db8fe585 100644 (file)
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.restconf.nb.rfc8040.streams;
+package org.opendaylight.restconf.server.mdsal.streams.notif;
 
 import java.io.IOException;
 import java.time.Instant;
@@ -14,6 +14,8 @@ import javax.xml.transform.dom.DOMResult;
 import javax.xml.xpath.XPathExpressionException;
 import org.opendaylight.mdsal.dom.api.DOMEvent;
 import org.opendaylight.mdsal.dom.api.DOMNotification;
+import org.opendaylight.restconf.server.spi.EventFormatter;
+import org.opendaylight.restconf.server.spi.TextParameters;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.remote.rev140114.CreateNotificationStream;
 import org.opendaylight.yangtools.yang.data.codec.xml.XMLStreamNormalizedNodeStreamWriter;
 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
@@ -33,8 +35,8 @@ abstract class NotificationFormatter extends EventFormatter<DOMNotification> {
     }
 
     @Override
-    final void fillDocument(final Document doc, final EffectiveModelContext schemaContext, final DOMNotification input)
-            throws IOException {
+    protected final void fillDocument(final Document doc, final EffectiveModelContext schemaContext,
+            final DOMNotification input) throws IOException {
         final var notificationElement = createNotificationElement(doc,
             input instanceof DOMEvent domEvent ? domEvent.getEventInstant() : Instant.now());
         // FIXME: what is this really?!