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.dataprovider.model;
20 import java.util.Date;
21 import java.util.List;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ConnectionlogEntity;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.EventlogEntity;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultcurrentEntity;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultlogEntity;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Inventory;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.NetworkElementConnectionEntity;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.PmdataEntity;
30 public interface DataProvider extends ArchiveCleanProvider {
33 void writeConnectionLog(ConnectionlogEntity event);
36 void writeEventLog(EventlogEntity event);
38 void writeFaultLog(FaultlogEntity fault);
40 void updateFaultCurrent(FaultcurrentEntity fault);
43 * Remove all entries for one node
45 * @param nodeName contains the mountpointname
46 * @return number of deleted entries
48 int clearFaultsCurrentOfNode(String nodeName);
51 * Remove all entries for one node
53 * @param nodeName contains the mountpointname
54 * @param objectId of element to be deleted
55 * @return number of deleted entries
57 int clearFaultsCurrentOfNodeWithObjectId(String nodeName, String objectId);
60 * Deliver list with all mountpoint/node-names in the database.
62 * @return List of all mountpoint/node-names the had active alarms.
64 List<String> getAllNodesWithCurrentAlarms();
67 * write internal equipment to database
68 * @param internalEquipment with mandatory fields.
70 void writeInventory(Inventory internalEquipment);
74 * @param networkElementConnectionEntitiy to wirte to DB
75 * @param nodeId Id for this DB element
77 void updateNetworkConnectionDeviceType(NetworkElementConnectionEntity networkElementConnectionEntitiy,
81 * Update after new mountpoint registration
82 * @param networkElementConnectionEntitiy data
83 * @param nodeId of device (mountpoint name)
85 void updateNetworkConnection22(NetworkElementConnectionEntity networkElementConnectionEntitiy, String nodeId);
87 void removeNetworkConnection(String nodeId);
90 int doIndexClean(Date olderAreOutdated);
93 int getNumberOfOldObjects(Date olderAreOutdated);
95 List<NetworkElementConnectionEntity> getNetworkElementConnections();
100 void doWritePerformanceData(List<PmdataEntity> list);