Eliminate unnecessary blocking checks
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / transactions / RestconfStrategy.java
index 0c01e6784f9644121d42a8f9bc86f0b2ffd6afaf..bfecd8893ac7341ada18bd2dc5539b925943c77d 100644 (file)
@@ -21,6 +21,7 @@ import org.opendaylight.netconf.dom.api.NetconfDataTreeService;
 import org.opendaylight.restconf.nb.rfc8040.handlers.TransactionChainHandler;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 /**
  * Baseline execution strategy for various RESTCONF operations.
@@ -96,6 +97,14 @@ public abstract class RestconfStrategy {
      */
     public abstract void delete(LogicalDatastoreType store, YangInstanceIdentifier path);
 
+    /**
+     * Remove data from the datastore.
+     *
+     * @param store the logical data store which should be modified
+     * @param path  the data object path
+     */
+    public abstract void remove(LogicalDatastoreType store, YangInstanceIdentifier path);
+
     /**
      * Merges a piece of data with the existing data at a specified path.
      *
@@ -109,19 +118,24 @@ public abstract class RestconfStrategy {
      * Stores a piece of data at the specified path.
      *
      * @param store the logical data store which should be modified
-     * @param path the data object path
-     * @param data the data object to be merged to the specified path
+     * @param path  the data object path
+     * @param data  the data object to be merged to the specified path
+     * @param schemaContext  static view of compiled yang files
      */
-    public abstract void create(LogicalDatastoreType store, YangInstanceIdentifier path, NormalizedNode<?, ?> data);
+    public abstract void create(LogicalDatastoreType store, YangInstanceIdentifier path, NormalizedNode<?, ?> data,
+                SchemaContext schemaContext);
 
     /**
      * Replace a piece of data at the specified path.
      *
-     * @param store the logical data store which should be modified
-     * @param path the data object path
-     * @param data the data object to be merged to the specified path
+     * @param store        the logical data store which should be modified
+     * @param path         the data object path
+     * @param data         the data object to be merged to the specified path
+     * @param schemaContext  static view of compiled yang files
      */
-    public abstract void replace(LogicalDatastoreType store, YangInstanceIdentifier path, NormalizedNode<?, ?> data);
+    public abstract void replace(LogicalDatastoreType store, YangInstanceIdentifier path, NormalizedNode<?, ?> data,
+                 SchemaContext schemaContext);
+
 
     /**
      * Get transaction chain for creating specific transaction for specific operation.