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 javax.annotation.Nonnull;
12 import javax.annotation.Nullable;
13 import org.opendaylight.yangtools.yang.binding.DataObject;
16 * Provides access to {#link DataTreeCursor}'s anchored at the specified path.
18 public interface DataTreeCursorProvider {
21 * Create a new {@link DataTreeCursor} at specified path. May fail if specified path
24 * @param path Path at which the cursor is to be anchored
25 * @return A new cursor, or null if the path does not exist.
26 * @throws IllegalStateException if there is another cursor currently open, or the transaction
27 * is already closed (closed or submitted).
30 <T extends DataObject> DataTreeCursor createCursor(@Nonnull DataTreeIdentifier<T> path);