Propagate EffectiveModelContext to more places
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / tree / DataTreeSnapshot.java
index e31750f4533380a4aff987e7b84b87c94ff10096..3197e9814ba42582f06d91735618ed5611284886 100644 (file)
@@ -11,13 +11,13 @@ import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 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;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextProvider;
 
 /**
  * Read-only snapshot of a {@link DataTree}. The snapshot is stable and isolated, e.g. data tree changes occurring after
  * the snapshot has been taken are not visible through the snapshot.
  */
-public interface DataTreeSnapshot {
+public interface DataTreeSnapshot extends EffectiveModelContextProvider {
     /**
      * Read a particular node from the snapshot.
      *
@@ -32,15 +32,5 @@ public interface DataTreeSnapshot {
      *
      * @return A new data tree modification
      */
-    DataTreeModification newModification();
-
-    /**
-     * Return the current {@link SchemaContext}, which is being used for operations.
-     *
-     * @return Current schema context.
-     */
-    // FIXME: 3.0.0: Make this method non-default.
-    default @NonNull SchemaContext getSchemaContext() {
-        throw new UnsupportedOperationException("Not implemented by  " + getClass());
-    }
+    @NonNull DataTreeModification newModification();
 }