X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2Ftree%2FDataTreeCandidateNode.java;h=528419d235033ec8d85d43cfb36229bd477b13e6;hp=b1ca45b53e3320e18a6ce7bdc761420e01c4b033;hb=3b301f14027755f8924714c25d888132080f6b54;hpb=290b7c23512204074fcd0fb7163b0adea48823fd diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/DataTreeCandidateNode.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/DataTreeCandidateNode.java index b1ca45b53e..528419d235 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/DataTreeCandidateNode.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/DataTreeCandidateNode.java @@ -12,11 +12,47 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import com.google.common.base.Optional; +/** + * A single node within a {@link DataTreeCandidate}. The nodes are organized + * in tree hierarchy, reflecting the modification from which this candidate + * was created. The node itself exposes the before- and after-image of the + * tree restricted to the modified nodes. + */ public interface DataTreeCandidateNode { + /** + * Get the node identifier. + * + * @return The node identifier. + */ PathArgument getIdentifier(); + + /** + * Get an unmodifiable iterable of modified child nodes. + * + * @return Unmodifiable iterable of modified child nodes. + */ Iterable getChildNodes(); + /** + * Return the type of modification this node is undergoing. + * + * @return Node modification type. + */ ModificationType getModificationType(); + + /** + * Return the before-image of data corresponding to the node. + * + * @return Node data as they were present in the tree before + * the modification was applied. + */ Optional> getDataAfter(); + + /** + * Return the after-image of data corresponding to the node. + * + * @return Node data as they will be present in the tree after + * the modification is applied. + */ Optional> getDataBefore(); }