Merge "Bug 500: Updated data APIs with new concepts."
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / data / DataChange.java
index 0fea50b777f14dc31275f9b75c7d1bf4622f6ece..ebffbcc811747307f2a3a67a7b83cb403d5757c2 100644 (file)
@@ -10,22 +10,77 @@ package org.opendaylight.controller.md.sal.common.api.data;
 import java.util.Map;
 import java.util.Set;
 
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
+import org.opendaylight.yangtools.concepts.Path;
 
+public interface DataChange<P extends Path<P>, D> {
 
-public interface DataChange<P/* extends Path<P> */,D> {
+    /**
+     * Returns a map of paths and newly created objects
+     *
+     * @return map of paths and newly created objects
+     */
+    Map<P, D> getCreatedOperationalData();
 
-    Map<P,D> getCreatedOperationalData();
+    /**
+     * Returns a map of paths and newly created objects
+     *
+     * @return map of paths and newly created objects
+     */
+    Map<P, D> getCreatedConfigurationData();
 
-    Map<P,D> getUpdatedOperationalData();
+    /**
+     * Returns a map of paths and respective updated objects after update.
+     *
+     * Original state of the object is in
+     * {@link #getOriginalOperationalData()}
+     *
+     * @return map of paths and newly created objects
+     */
+    Map<P, D> getUpdatedOperationalData();
 
-    Set<P> getRemovedOperationalData();
+    /**
+     * Returns a map of paths and respective updated objects after update.
+     *
+     * Original state of the object is in
+     * {@link #getOriginalConfigurationData()}
+     *
+     * @return map of paths and newly created objects
+     */
+    Map<P, D> getUpdatedConfigurationData();
 
-    Map<P,D> getCreatedConfigurationData();
 
-    Map<P,D> getUpdatedConfigurationData();
 
+    /**
+     * Returns a set of paths of removed objects.
+     *
+     * Original state of the object is in
+     * {@link #getOriginalConfigurationData()}
+     *
+     * @return map of paths and newly created objects
+     */
     Set<P> getRemovedConfigurationData();
 
+    /**
+     * Returns a set of paths of removed objects.
+     *
+     * Original state of the object is in
+     * {@link #getOriginalOperationalData()}
+     *
+     * @return map of paths and newly created objects
+     */
+    Set<P> getRemovedOperationalData();
+
+    /**
+     * Return a map of paths and original state of updated and removed objectd.
+     *
+     * @return map of paths and original state of updated and removed objectd.
+     */
+    Map<P, D> getOriginalConfigurationData();
+
+    /**
+     * Return a map of paths and original state of updated and removed objectd.
+     *
+     * @return map of paths and original state of updated and removed objectd.
+     */
+    Map<P, D> getOriginalOperationalData();
 }