Replace SchemaPath with SchemaNodeIdentifier.Absolute/QName
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / dom / api / DOMNotification.java
index ca8f4e42d739af59f9d2be25832f81f9f83f9772..9d2c58c5ba7e41bf0c285e069efb868980476ba7 100644 (file)
@@ -7,12 +7,15 @@
  */
 package org.opendaylight.mdsal.dom.api;
 
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
+import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
 
 /**
- * A single YANG notification.
+ * A single YANG notification. This interface captures the data portion of a notification. Implementations may choose
+ * to additionally implement {@link DOMEvent}, in which case {@link DOMEvent#getEventInstant()} returns the time when
+ * this notification was generated -- and corresponds to <a href="https://tools.ietf.org/html/rfc5277#section-2.2.1">
+ * RFC5277</a> NETCONF notification's {@code eventTime} parameter.
  */
 public interface DOMNotification {
     /**
@@ -20,12 +23,12 @@ public interface DOMNotification {
      *
      * @return Notification type.
      */
-    @Nonnull SchemaPath getType();
+    @NonNull Absolute getType();
 
     /**
      * Return the body of this notification.
      *
      * @return Notification body.
      */
-    @Nonnull ContainerNode getBody();
+    @NonNull ContainerNode getBody();
 }