X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=yang%2Fyang-data-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fdata%2Fapi%2Fschema%2Ftree%2FDataTree.java;h=378b980dd91b726bbfe353aea5e0fd557709a511;hb=3b04def6d98ce20e7ced70d347bc994e15dcdadf;hp=7b0ae040bf7d6d3cc9219a3c1c6be87d54e6fd9d;hpb=e2ab87f6b2330a78068f360f3c2c8578126cde11;p=yangtools.git diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTree.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTree.java index 7b0ae040bf..378b980dd9 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTree.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTree.java @@ -7,40 +7,34 @@ */ package org.opendaylight.yangtools.yang.data.api.schema.tree; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import org.opendaylight.yangtools.yang.model.api.SchemaContext; /** * Interface representing a data tree which can be modified in an MVCC fashion. */ -public interface DataTree { - /** - * Take a read-only point-in-time snapshot of the tree. - * - * @return Data tree snapshot. - */ - DataTreeSnapshot takeSnapshot(); - +public interface DataTree extends DataTreeTip, ReadOnlyDataTree { /** * Make the data tree use a new schema context. The context will be used * only by subsequent operations. * * @param newSchemaContext new SchemaContext * @throws IllegalArgumentException if the new context is incompatible + * @throws NullPointerException if newSchemaContext is null + * @deprecated Prefer {@link #setEffectiveModelContext(EffectiveModelContext)}. */ + @Deprecated void setSchemaContext(SchemaContext newSchemaContext); /** - * Validate whether a particular modification can be applied to the data tree. - */ - void validate(DataTreeModification modification) throws DataValidationFailedException; - - /** - * Prepare a modification for commit. + * Make the data tree use a new schema context. The context will be used + * only by subsequent operations. * - * @param modification - * @return candidate data tree + * @param newModelContext new EffectiveModelContext + * @throws IllegalArgumentException if the new context is incompatible + * @throws NullPointerException if newModelContext is null */ - DataTreeCandidate prepare(DataTreeModification modification); + void setEffectiveModelContext(EffectiveModelContext newModelContext); /** * Commit a data tree candidate.