1 package org.commscope.tr069adapter.netconf.restapi;
\r
3 import org.commscope.tr069adapter.mapper.model.NetConfNotificationDTO;
\r
4 import org.commscope.tr069adapter.netconf.notification.NotificationHandler;
\r
5 import org.slf4j.Logger;
\r
6 import org.slf4j.LoggerFactory;
\r
7 import org.springframework.beans.factory.annotation.Autowired;
\r
8 import org.springframework.web.bind.annotation.PostMapping;
\r
9 import org.springframework.web.bind.annotation.RequestBody;
\r
10 import org.springframework.web.bind.annotation.RequestMapping;
\r
11 import org.springframework.web.bind.annotation.RestController;
\r
14 @RequestMapping("/netConfNotificationService")
\r
15 public class NotificationReceiverService {
\r
17 private static final Logger LOG = LoggerFactory.getLogger(NotificationReceiverService.class);
\r
20 NotificationHandler handler;
\r
22 @PostMapping("/notification")
\r
23 public void processNotification(@RequestBody NetConfNotificationDTO netConNotifDTO) {
\r
24 System.out.println("Received NetConf Notification :" + netConNotifDTO);
\r
25 LOG.debug("Received NetConf Notification :" + netConNotifDTO);
\r
26 handler.handleNetConfNotification(netConNotifDTO);
\r
27 LOG.debug("Processed NetConf Notification for :" + netConNotifDTO);
\r
28 System.out.println("Processed NetConf Notification for :" + netConNotifDTO);
\r