8a5e91c63c9638d81bc530c1def18dec519a06b0
[ccsdk/features.git] /
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  * Update Copyright (C) 2021 Samsung Electronics Intellectual Property. All rights reserved.
8  * =================================================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
10  * in compliance with the License. You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software distributed under the License
15  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
16  * or implied. See the License for the specific language governing permissions and limitations under
17  * the License.
18  * ============LICENSE_END==========================================================================
19  */
20 package org.onap.ccsdk.features.sdnr.wt.dataprovider.model;
21
22 import java.util.List;
23 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.CmlogEntity;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ConnectionlogEntity;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.EventlogEntity;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.FaultcurrentEntity;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.FaultlogEntity;
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Guicutthrough;
30 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Inventory;
31 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementConnectionEntity;
32 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.PmdataEntity;
33
34 public interface DataProvider extends ArchiveCleanProvider {
35
36     // -- Connection log
37     void writeConnectionLog(ConnectionlogEntity event);
38
39     // -- Event log
40     void writeEventLog(EventlogEntity event);
41
42     void writeFaultLog(FaultlogEntity fault);
43
44     void writeCMLog(CmlogEntity cm);
45
46     void updateFaultCurrent(FaultcurrentEntity fault);
47
48     /**
49      * Remove all entries for one node
50      *
51      * @param nodeName contains the mountpointname
52      * @return number of deleted entries
53      */
54     int clearFaultsCurrentOfNode(String nodeName);
55
56     /**
57      * Remove all entries for one node
58      *
59      * @param nodeName contains the mountpointname
60      * @param objectId of element to be deleted
61      * @return number of deleted entries
62      */
63     int clearFaultsCurrentOfNodeWithObjectId(String nodeName, String objectId);
64
65     /**
66      * Deliver list with all mountpoint/node-names in the database.
67      *
68      * @return List of all mountpoint/node-names the had active alarms.
69      */
70     List<String> getAllNodesWithCurrentAlarms();
71
72     /**
73      * write internal equipment to database
74      * @param nodeId
75      * @param internalEquipment with mandatory fields.
76      */
77     void writeInventory(String nodeId, List<Inventory> list);
78
79     /**
80     * write GUI Cut through data to database
81     *
82     * @param gcData
83     */
84     void writeGuiCutThroughData(Guicutthrough gcData, String nodeId);
85
86     /**
87      *
88      * @param nodeName
89      * @return number of entries
90      */
91     public int clearGuiCutThroughEntriesOfNode(String nodeName);
92
93     /**
94      *
95      * @param networkElementConnectionEntitiy to wirte to DB
96      * @param nodeId Id for this DB element
97      * @return if succeeded
98      */
99     boolean updateNetworkConnectionDeviceType(NetworkElementConnectionEntity networkElementConnectionEntitiy,
100             String nodeId);
101
102     /**
103      * Update after new mountpoint registration
104      *
105      * @param networkElementConnectionEntitiy data
106      * @param nodeId of device (mountpoint name)
107      * @return if succeeded
108      */
109     boolean updateNetworkConnection22(NetworkElementConnectionEntity networkElementConnectionEntitiy, String nodeId);
110
111     void removeNetworkConnection(String nodeId);
112
113     List<NetworkElementConnectionEntity> getNetworkElementConnections();
114
115     /**
116      * @param list
117      */
118     void doWritePerformanceData(List<PmdataEntity> list);
119
120     /**
121      * @return raw database client
122      */
123     HtDatabaseClient getRawClient();
124
125 }