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
9 package org.opendaylight.mdsal.binding.api;
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 {
24 * Delete the specified child.
26 * @param child Child identifier
27 * @throws BackendFailedException when implementation-specific errors occurs while servicing the
30 void delete(PathArgument child);
33 * Merge the specified data with the currently-present data at specified path.
35 * @param child Child identifier
36 * @param data Data to be merged
37 * @throws BackendFailedException when implementation-specific errors occurs while servicing the
40 <T extends DataObject> void merge(PathArgument child, T data);
43 * Replace the data at specified path with supplied data.
45 * @param child Child identifier
46 * @param data New node data
47 * @throws BackendFailedException when implementation-specific errors occurs while servicing the
50 <T extends DataObject> void write(PathArgument child, T data);