2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
\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
8 package org.opendaylight.controller.yang.data.api;
\r
10 import org.opendaylight.controller.yang.common.QName;
\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
20 * @see <a href="http://tools.ietf.org/html/rfc6241">Network Configuration
\r
21 * Protocol (NETCONF)</a>
\r
24 public interface CompositeNodeModification extends CompositeNode {
\r
26 ModifyAction getModificationAction();
\r
28 // Container Modification
\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
37 void mergeChild(CompositeNode node);
\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
47 void replaceChild(CompositeNode node);
\r
50 * Adds new composite node into data tree
\r
55 void addChild(CompositeNode node);
\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
65 void deleteChild(CompositeNode node);
\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
75 void removeChild(CompositeNode node);
\r
77 // Leaf Modifications
\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
86 void replaceSimpleNode(SimpleNode<?> leaf);
\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
96 void deleteSimpleNode(SimpleNode<?> leaf);
\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
105 void removeSimpleNode(SimpleNode<?> leaf);
\r
107 void removeLeaf(SimpleNode<?> leaf);
\r
109 void removeLeaf(QName leaf);
\r