Merge "adding isBroadcast and isMulticast functions to Ethernet"
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-data-api / src / main / java / org / opendaylight / controller / yang / data / api / CompositeNodeModification.java
1 /*\r
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.controller.yang.data.api;\r
9 \r
10 import org.opendaylight.controller.yang.common.QName;\r
11 \r
12 /**\r
13  * For the use cases of changing the state data, the node modifications are\r
14  * modeled as part of additional metadata in data tree. The modification types\r
15  * are based on Netconf edit-config RPCs. In order to modify the configuration\r
16  * or state data tree the user must create a tree representing the modification\r
17  * of the data and apply that modification to the target tree.\r
18  * \r
19  * \r
20  * @see <a href="http://tools.ietf.org/html/rfc6241">Network Configuration\r
21  *      Protocol (NETCONF)</a>\r
22  * \r
23  */\r
24 public interface CompositeNodeModification extends CompositeNode {\r
25 \r
26     ModifyAction getModificationAction();\r
27 \r
28     // Container Modification\r
29 \r
30     /**\r
31      * The data identified by the node containing this modification is merged\r
32      * with the data at the corresponding level in the data tree\r
33      * \r
34      * @param node\r
35      *            in data tree\r
36      */\r
37     void mergeChild(CompositeNode node);\r
38 \r
39     /**\r
40      * The data identified by the node containing this modification replaces any\r
41      * related data in the target data tree If no such data exists in the target\r
42      * data tree, the child node is created.\r
43      * \r
44      * @param node\r
45      *            composite node\r
46      */\r
47     void replaceChild(CompositeNode node);\r
48 \r
49     /**\r
50      * Adds new composite node into data tree\r
51      * \r
52      * @param node\r
53      *            composite node\r
54      */\r
55     void addChild(CompositeNode node);\r
56 \r
57     /**\r
58      * The data identified by the node containing this modification is deleted\r
59      * from the target data tree if and only if the data currently exists in the\r
60      * target data tree. If the data does not exist, an error is returned with\r
61      * an error value of "data-missing".\r
62      * \r
63      * @param node\r
64      */\r
65     void deleteChild(CompositeNode node);\r
66 \r
67     /**\r
68      * The data identified by the node containing this attribute is deleted from\r
69      * the target data tree if the data currently exists in the target data\r
70      * tree. If the data does not exist, the modification is silently ignored.\r
71      * \r
72      * @param node\r
73      *            composite node\r
74      */\r
75     void removeChild(CompositeNode node);\r
76 \r
77     // Leaf Modifications\r
78 \r
79     /**\r
80      * The data identified by the node containing this modification replaces any\r
81      * related data in the target data tree If no such data exists in the target\r
82      * data tree, it is created.\r
83      * \r
84      * @param leaf\r
85      */\r
86     void replaceSimpleNode(SimpleNode<?> leaf);\r
87 \r
88     /**\r
89      * The data identified by the node containing this modification is deleted\r
90      * from the target data tree if and only if the data currently exists in the\r
91      * target data tree. If the data does not exist, an error is returned with\r
92      * an error value of "data-missing".\r
93      * \r
94      * @param leaf\r
95      */\r
96     void deleteSimpleNode(SimpleNode<?> leaf);\r
97 \r
98     /**\r
99      * The data identified by the node containing this attribute is deleted from\r
100      * the target data tree if the data currently exists in the target data\r
101      * tree. If the data does not exist, the modification is silently ignored.\r
102      * \r
103      * @param leaf\r
104      */\r
105     void removeSimpleNode(SimpleNode<?> leaf);\r
106 \r
107     void removeLeaf(SimpleNode<?> leaf);\r
108 \r
109     void removeLeaf(QName leaf);\r
110 }\r