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==========================================================================
18 package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice;
20 import java.util.Collection;
21 import java.util.Optional;
22 import org.eclipse.jdt.annotation.NonNull;
23 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
24 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
25 import org.opendaylight.mdsal.dom.api.DOMMountPoint;
26 import org.opendaylight.mdsal.dom.api.DOMNotificationListener;
27 import org.opendaylight.yangtools.concepts.ListenerRegistration;
28 import org.opendaylight.yangtools.yang.binding.DataObject;
29 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
30 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
31 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
34 * Interface handling netconf connection.
36 public interface NetconfDomAccessor extends NetconfAccessor {
39 * @return the dataBroker
41 DOMDataBroker getDataBroker();
44 * @return the MDSAL Mountpoint service
46 DOMMountPoint getMountpoint();
49 * Deliver the data into a class
50 * @param <T> DataObject type
51 * @param dataStoreType config or operational database
52 * @param path data path
53 * @return Optional<T> with object
55 <T extends DataObject> Optional<T> readData(LogicalDatastoreType dataStoreType, YangInstanceIdentifier path,
59 * Read data from device
60 * @param dataStoreType
62 * @return NormalizedNode<?, ?> with data
64 Optional<NormalizedNode<?, ?>> readDataNode(LogicalDatastoreType dataStoreType, YangInstanceIdentifier path);
67 * Register netconf notification listener for related mountpoint
69 * @param <T> specific child class of DOMNotificationListener
70 * @param listener listener to be called
72 * @return handler to manager registration
74 <T extends DOMNotificationListener> @NonNull ListenerRegistration<DOMNotificationListener> doRegisterNotificationListener(
75 @NonNull T listener, Collection<SchemaPath> types);
77 * Register netconf notification listener for related mountpoint
84 <T extends DOMNotificationListener> @NonNull ListenerRegistration<DOMNotificationListener> doRegisterNotificationListener(
85 @NonNull T listener, SchemaPath[] types);