2 * Copyright (c) 2016 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.mdsal.binding.api;
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.yangtools.yang.binding.DataObject;
12 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
13 import org.opendaylight.yangtools.yang.data.api.schema.tree.BackendFailedException;
19 * In addition this cursor also provides write operations(delete, merge, write).
21 public interface DataTreeWriteCursor extends DataTreeCursor {
23 * Delete the specified child.
25 * @param child Child identifier
26 * @throws BackendFailedException when implementation-specific errors occurs while servicing the
29 void delete(@NonNull PathArgument child);
32 * Merge the specified data with the currently-present data at specified path.
34 * @param child Child identifier
35 * @param data Data to be merged
36 * @throws BackendFailedException when implementation-specific errors occurs while servicing the
39 <T extends DataObject> void merge(@NonNull PathArgument child, @NonNull T 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 while servicing the
49 <T extends DataObject> void write(@NonNull PathArgument child, @NonNull T data);