Adopt odlparent-10.0.0/yangtools-8.0.0-SNAPSHOT
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / dom / api / DOMDataTreeCandidate.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.dom.api;
9
10 import org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidateNode;
11
12 /**
13  * An encapsulation of a data tree modification. This candidate is ready for atomic commit to the
14  * data broker. It allows access to before- and after-state as it will be seen in to subsequent
15  * commit. This capture can be accessed for reference, but cannot be modified and the content is
16  * limited to nodes which were affected by the modification from which this instance originated.
17  */
18 public interface DOMDataTreeCandidate {
19
20     /**
21      * Get the candidate tree root path. This is the path of the root node relative to the root of
22      * InstanceIdentifier namespace.
23      *
24      * @return Relative path of the root node
25      */
26     DOMDataTreeIdentifier getRootPath();
27
28     /**
29      * Get the candidate tree root node.
30      *
31      * @return Candidate tree root node
32      */
33     DataTreeCandidateNode getRootNode();
34 }