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.api.schema.tree;
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.
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.
20 public interface DataTreeModificationCursor extends DataTreeSnapshotCursor {
22 * Delete the specified child.
24 * @param child Child identifier
25 * @throws BackendFailedException when implementation-specific errors occurs
26 * while servicing the request.
28 void delete(PathArgument child);
31 * Merge the specified data with the currently-present data
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.
39 void merge(PathArgument child, NormalizedNode<?, ?> data);
42 * Replace the data at specified path with supplied data.
44 * @param child Child identifier
45 * @param data New node data
46 * @throws BackendFailedException when implementation-specific errors occurs
47 * while servicing the request.
49 void write(PathArgument child, NormalizedNode<?, ?> data);