Port WriteTransaction constants from controller
[mdsal.git] / binding2 / mdsal-binding2-api / src / main / java / org / opendaylight / mdsal / binding / javav2 / api / WriteTransaction.java
index 5065a7d383299b0de2e6565fc7761e9bd0680dcd..2dc6a49e31538720742ad0dd2b4fa2b714969b84 100644 (file)
@@ -76,7 +76,7 @@ public interface WriteTransaction extends AsyncWriteTransaction<InstanceIdentifi
      * @param data
      *            the data object to be written to the specified path
      * @param createMissingParents
-     *            if true, any missing parent nodes will be automatically
+     *            if {@link #CREATE_MISSING_PARENTS}, any missing parent nodes will be automatically
      *            created using a merge operation.
      * @param <T> data tree type
      * @throws IllegalStateException
@@ -132,7 +132,7 @@ public interface WriteTransaction extends AsyncWriteTransaction<InstanceIdentifi
      * @param data
      *            the data object to be merged to the specified path
      * @param createMissingParents
-     *            if true, any missing parent nodes will be automatically created
+     *            if {@link #CREATE_MISSING_PARENTS}, any missing parent nodes will be automatically created
      *            using a merge operation.
      * @param <T> data tree type
      * @throws IllegalStateException
@@ -143,4 +143,14 @@ public interface WriteTransaction extends AsyncWriteTransaction<InstanceIdentifi
 
     @Override
     void delete(LogicalDatastoreType store, InstanceIdentifier<? extends TreeNode> path);
+
+    /**
+     * Flag value indicating that missing parents should be created.
+     */
+    boolean CREATE_MISSING_PARENTS = true;
+
+    /**
+     * Flag value indicating that missing parents should cause an error.
+     */
+    boolean FAIL_ON_MISSING_PARENTS = false;
 }