X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Frestconf-nb-rfc8040%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fnb%2Frfc8040%2Fstreams%2Flisteners%2FXMLNotificationFormatter.java;fp=restconf%2Frestconf-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fcommon%2Fformatters%2FXMLNotificationFormatter.java;h=b4afe63ee7fe9bac758c9c42ef0d7db710566b27;hb=0226b5a21bb755b75a25b208fd0ecca20fd8968c;hp=d1a7b9128a8a55be424032d00efaf4b83cc986c4;hpb=42cba77339bbf7c8ab664ba06cb0c813b1fe49b3;p=netconf.git diff --git a/restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/formatters/XMLNotificationFormatter.java b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/listeners/XMLNotificationFormatter.java similarity index 83% rename from restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/formatters/XMLNotificationFormatter.java rename to restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/listeners/XMLNotificationFormatter.java index d1a7b9128a..b4afe63ee7 100644 --- a/restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/formatters/XMLNotificationFormatter.java +++ b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/listeners/XMLNotificationFormatter.java @@ -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.common.formatters; +package org.opendaylight.restconf.nb.rfc8040.streams.listeners; import java.io.IOException; import java.io.StringWriter; @@ -19,7 +19,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWrit import org.opendaylight.yangtools.yang.data.codec.xml.XMLStreamNormalizedNodeStreamWriter; import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; -public class XMLNotificationFormatter extends NotificationFormatter { +final class XMLNotificationFormatter extends NotificationFormatter { private static final XMLNotificationFormatter INSTANCE = new XMLNotificationFormatter(); static final String NOTIFICATION_NAMESPACE = "urn:ietf:params:xml:ns:netconf:notification:1.0"; @@ -28,9 +28,9 @@ public class XMLNotificationFormatter extends NotificationFormatter { static final String DATA_CHANGED_NAMESPACE = "urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote"; static final String DATA_CHANGED_NOTIFICATION_ELEMENT = "data-changed-notification"; - public static final String DATA_CHANGE_EVENT_ELEMENT = "data-change-event"; + static final String DATA_CHANGE_EVENT_ELEMENT = "data-change-event"; - public static final NotificationFormatterFactory FACTORY = new NotificationFormatterFactory() { + static final NotificationFormatterFactory FACTORY = new NotificationFormatterFactory() { @Override public XMLNotificationFormatter getFormatter(final String xpathFilter) throws XPathExpressionException { return new XMLNotificationFormatter(xpathFilter); @@ -42,16 +42,17 @@ public class XMLNotificationFormatter extends NotificationFormatter { } }; - public XMLNotificationFormatter() { + XMLNotificationFormatter() { + } - public XMLNotificationFormatter(String xpathFilter) throws XPathExpressionException { + XMLNotificationFormatter(final String xpathFilter) throws XPathExpressionException { super(xpathFilter); } @Override - String createText(EffectiveModelContext schemaContext, DOMNotification input, Instant now, - boolean leafNodesOnly, boolean skipData) + String createText(final EffectiveModelContext schemaContext, final DOMNotification input, final Instant now, + final boolean leafNodesOnly, final boolean skipData) throws IOException { final StringWriter writer = new StringWriter(); try {