2 * ============LICENSE_START=======================================================
3 * ONAP : ccsdk features
4 * ================================================================================
5 * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.ccsdk.features.sdnr.wt.devicemanager.service;
24 import com.fasterxml.jackson.core.JsonProcessingException;
25 import org.eclipse.jdt.annotation.NonNull;
26 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESCommonEventHeaderPOJO;
27 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESFaultFieldsPOJO;
28 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESMessage;
29 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESNotificationFieldsPOJO;
30 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESPNFRegistrationFieldsPOJO;
31 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESStndDefinedFieldsPOJO;
34 * Interface used for publishing VES messages to the VES Collector
39 public interface VESCollectorService extends DeviceManagerService {
42 * Gets the VES Collector configuration from etc/devicemanager.properties configuration file
44 VESCollectorCfgService getConfig();
47 * publishes a VES message to the VES Collector by sending a REST request
51 boolean publishVESMessage(VESMessage vesMsg);
54 * clients interested in VES Collector configuration changes can call the registerForChanges method so as to be notified when configuration changes are made
56 void registerForChanges(VESCollectorConfigChangeListener o);
59 * de-registering clients as part of cleanup
62 void deregister(VESCollectorConfigChangeListener o);
65 * Get a parser to parse {@link #org.opendaylight.yangtools.yang.binding.Notification } messages
66 * @return NotificationProxyParser object
69 NotificationProxyParser getNotificationProxyParser();
72 * Generates VES Event JSON containing commonEventHeader and notificationFields fields
74 * @param commonEventHeader
76 * @return VESMessage - representing the VESEvent JSON
77 * @throws JsonProcessingException
79 VESMessage generateVESEvent(VESCommonEventHeaderPOJO commonEventHeader, VESNotificationFieldsPOJO notifFields) throws JsonProcessingException;
82 * Generates VES Event JSON containing commonEventHeader and faultFields fields
84 * @param commonEventHeader
86 * @return VESMessage - representing the VES Event JSON
87 * @throws JsonProcessingException
89 VESMessage generateVESEvent(VESCommonEventHeaderPOJO commonEventHeader, VESFaultFieldsPOJO faultFields) throws JsonProcessingException;
92 * Generates VES Event JSON containing commonEventHeader and pnfRegistration fields
94 * @param commonEventHeader
96 * @return VESMessage - representing the VES Event JSON
97 * @throws JsonProcessingException
99 VESMessage generateVESEvent(VESCommonEventHeaderPOJO commonEventHeader, VESPNFRegistrationFieldsPOJO faultFields) throws JsonProcessingException;
102 * Generates VES Event JSON containing commonEventHeader and stndDefined fields
104 * @param commonEventHeader
105 * @param stndDefinedFields
106 * @return VESMessage - representing the VES Event JSON
107 * @throws JsonProcessingException
109 VESMessage generateVESEvent(VESCommonEventHeaderPOJO commonEventHeader, VESStndDefinedFieldsPOJO stndDefinedFields) throws JsonProcessingException;