Do not pretty-print body class
[yangtools.git] / data / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / tree / DataTreeModificationCursor.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.yangtools.yang.data.api.schema.tree;
9
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
12 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
13
14 /**
15  * Extension to the {@link DataTreeSnapshotCursor} which allows modifying the data tree.
16  * An instance of this interface can be obtained from {@link CursorAwareDataTreeModification}
17  * and modifications made through this interface are staged in the parent modification.
18  */
19 @Beta
20 public interface DataTreeModificationCursor extends DataTreeSnapshotCursor {
21     /**
22      * Delete the specified child.
23      *
24      * @param child Child identifier
25      * @throws BackendFailedException when implementation-specific errors occurs
26      *                                while servicing the request.
27      */
28     void delete(PathArgument child);
29
30     /**
31      * Merge the specified data with the currently-present data
32      * at specified path.
33      *
34      * @param child Child identifier
35      * @param data Data to be merged
36      * @throws BackendFailedException when implementation-specific errors occurs
37      *                                while servicing the request.
38      */
39     void merge(PathArgument child, NormalizedNode data);
40
41     /**
42      * Replace the data at specified path with supplied data.
43      *
44      * @param child Child identifier
45      * @param data New node data
46      * @throws BackendFailedException when implementation-specific errors occurs
47      *                                while servicing the request.
48      */
49     void write(PathArgument child, NormalizedNode data);
50 }