2 * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.javav2.api;
11 import com.google.common.annotations.Beta;
12 import org.opendaylight.mdsal.binding.javav2.spec.base.TreeArgument;
13 import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
14 import org.opendaylight.yangtools.yang.data.api.schema.tree.BackendFailedException;
20 * In addition this cursor also provides write operations(delete, merge, write).
23 public interface DataTreeWriteCursor extends DataTreeCursor {
26 * Delete the specified child.
28 * @param child Child identifier
29 * @throws BackendFailedException when implementation-specific errors occurs while servicing the
32 void delete(TreeArgument<?> child);
35 * Merge the specified data with the currently-present data at specified path.
37 * @param child Child identifier
38 * @param data Data to be merged
39 * @throws BackendFailedException when implementation-specific errors occurs while servicing the
42 <T extends TreeNode> void merge(TreeArgument<T> child, T data);
45 * Replace the data at specified path with supplied data.
47 * @param child Child identifier
48 * @param data New node data
49 * @throws BackendFailedException when implementation-specific errors occurs while servicing the
52 <T extends TreeNode> void write(TreeArgument<T> child, T data);