Move netconf-api to protocol/
[netconf.git] / plugins / netconf-dom-api / src / main / java / org / opendaylight / netconf / dom / api / tx / NetconfDOMFieldsReadOperations.java
1 /*
2  * Copyright © 2020 FRINX s.r.o. 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.netconf.dom.api.tx;
9
10 import com.google.common.util.concurrent.FluentFuture;
11 import java.util.List;
12 import java.util.Optional;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
15 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
16 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
17
18 /**
19  * Grouped NETCONF DOM read operations that are using fields parameter for selective reading of data.
20  */
21 public interface NetconfDOMFieldsReadOperations {
22     /**
23      * Reads only selected data field from provided logical data store located at the provided path.
24      *
25      * @param store  Logical data store from which read should occur.
26      * @param path   Path which uniquely identifies subtree from which client wants to read selected fields.
27      * @param fields List of relative paths under parent path which client wants to read.
28      * @return FluentFuture containing the result of the read. Except the selected fields, the result may contain
29      *         also next fields that are required to successfully build output {@link NormalizedNode}.
30      * @throws NullPointerException if any argument is null
31      */
32     @NonNull FluentFuture<Optional<NormalizedNode>> read(LogicalDatastoreType store, YangInstanceIdentifier path,
33                                                          List<YangInstanceIdentifier> fields);
34 }