*/
package org.opendaylight.restconf.nb.rfc8040.streams.listeners;
+import static org.opendaylight.restconf.nb.rfc8040.streams.listeners.NotificationFormatter.DATA_CHANGED_NOTIFICATION_ELEMENT;
+import static org.opendaylight.restconf.nb.rfc8040.streams.listeners.NotificationFormatter.DATA_CHANGE_EVENT_ELEMENT;
+import static org.opendaylight.restconf.nb.rfc8040.streams.listeners.NotificationFormatter.NOTIFICATION_ELEMENT;
+import static org.opendaylight.restconf.nb.rfc8040.streams.listeners.NotificationFormatter.NOTIFICATION_NAMESPACE;
+import static org.opendaylight.restconf.nb.rfc8040.streams.listeners.NotificationFormatter.SAL_REMOTE_NAMESPACE;
import static org.opendaylight.restconf.nb.rfc8040.streams.listeners.NotificationFormatter.XML_OUTPUT_FACTORY;
-import static org.opendaylight.restconf.nb.rfc8040.streams.listeners.XMLNotificationFormatter.DATA_CHANGE_EVENT_ELEMENT;
import java.io.IOException;
import java.time.Instant;
@Override
final void fillDocument(final Document doc, final EffectiveModelContext schemaContext,
final Collection<DataTreeCandidate> input) throws IOException {
- final Element notificationElement = doc.createElementNS("urn:ietf:params:xml:ns:netconf:notification:1.0",
- "notification");
+ final Element notificationElement = doc.createElementNS(NOTIFICATION_NAMESPACE, NOTIFICATION_ELEMENT);
final Element eventTimeElement = doc.createElement("eventTime");
eventTimeElement.setTextContent(toRFC3339(Instant.now()));
notificationElement.appendChild(eventTimeElement);
final Element notificationEventElement = doc.createElementNS(
- "urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote", "data-changed-notification");
+ SAL_REMOTE_NAMESPACE, DATA_CHANGED_NOTIFICATION_ELEMENT);
for (DataTreeCandidate candidate : input) {
final Element dataChangedElement = doc.createElement(DATA_CHANGE_EVENT_ELEMENT);