f8f0396f26e4cbdac46f17b6a79c8f6958d06e49
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / dom / api / DOMDataTreeCursorProvider.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.mdsal.dom.api;
9
10 import javax.annotation.Nonnull;
11 import javax.annotation.Nullable;
12 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModificationCursor;
13
14 public interface DOMDataTreeCursorProvider {
15
16     /**
17      * Create a new {@link DataTreeModificationCursor} at specified path. May fail if specified path
18      * does not exist.
19      *
20      * @param path Path at which the cursor is to be anchored
21      * @return A new cursor, or null if the path does not exist.
22      * @throws IllegalStateException if there is another cursor currently open, or the transaction
23      *         is already closed (closed or submitted).
24      */
25     @Nullable
26     DOMDataTreeCursor createCursor(@Nonnull DOMDataTreeIdentifier path);
27
28 }