2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.data.tree.api;
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;
15 * Extension to the {@link DataTreeSnapshotCursor} which allows modifying the data tree. An instance of this interface
16 * can be obtained from {@link CursorAwareDataTreeModification} and modifications made through this interface are staged
17 * in the parent modification.
20 public interface DataTreeModificationCursor extends DataTreeSnapshotCursor {
22 * Delete the specified child.
24 * @param child Child identifier
25 * @throws BackendFailedException when implementation-specific errors occurs while servicing the request.
27 void delete(PathArgument child);
30 * Merge the specified data with the currently-present data
33 * @param child Child identifier
34 * @param data Data to be merged
35 * @throws BackendFailedException when implementation-specific errors occurs while servicing the request.
37 void merge(PathArgument child, NormalizedNode data);
40 * Replace the data at specified path with supplied data.
42 * @param child Child identifier
43 * @param data New node data
44 * @throws BackendFailedException when implementation-specific errors occurs while servicing the request.
46 void write(PathArgument child, NormalizedNode data);