1 /*******************************************************************************
2 * ============LICENSE_START========================================================================
3 * ONAP : ccsdk feature sdnr wt
4 * =================================================================================================
5 * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
6 * =================================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8 * in compliance with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software distributed under the License
13 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14 * or implied. See the License for the specific language governing permissions and limitations under
16 * ============LICENSE_END==========================================================================
17 ******************************************************************************/
18 package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice;
20 import java.util.concurrent.atomic.AtomicBoolean;
21 import java.util.concurrent.atomic.AtomicReference;
22 import org.eclipse.jdt.annotation.Nullable;
23 import org.opendaylight.mdsal.binding.api.DataBroker;
24 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
25 import org.opendaylight.yangtools.yang.binding.DataObject;
26 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
32 public interface TransactionUtils {
35 * Deliver the data back or null. Warning
37 * @param <T> SubType of the DataObject to be handled
38 * @param dataBroker for accessing data
39 * @param dataStoreType to address datastore
40 * @param iid id to access data
41 * @return null or object
44 <T extends DataObject> T readData(DataBroker dataBroker, LogicalDatastoreType dataStoreType,
45 InstanceIdentifier<T> iid);
48 * Deliver the data back or null
50 * @param <T> SubType of the DataObject to be handled
51 * @param dataBroker for accessing data
52 * @param dataStoreType to address datastore
53 * @param iid id to access data
54 * @param noErrorIndication (Output) true if data could be read and are available and is not null
55 * @param statusIndicator (Output) String with status indications during the read.
56 * @return null or object
59 <T extends DataObject> T readDataOptionalWithStatus(DataBroker dataBroker, LogicalDatastoreType dataStoreType,
60 InstanceIdentifier<T> iid, AtomicBoolean noErrorIndication, AtomicReference<String> statusIndicator);