diff options
Diffstat (limited to 'PolicyEngineAPI/src/main/java/org/onap/policy/std/ManualClientEndUEB.java')
-rw-r--r-- | PolicyEngineAPI/src/main/java/org/onap/policy/std/ManualClientEndUEB.java | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/std/ManualClientEndUEB.java b/PolicyEngineAPI/src/main/java/org/onap/policy/std/ManualClientEndUEB.java index 29c85a2ad..8590f6a5b 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/std/ManualClientEndUEB.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/std/ManualClientEndUEB.java @@ -51,35 +51,36 @@ public class ManualClientEndUEB { private static String url = null; private static String uniquID = null; private static String topic = null; - + + private ManualClientEndUEB() { + // Empty constructor + } public static PDPNotification result(NotificationScheme scheme) { if (resultJson == null || notification == null) { logger.debug("No Result" ); return null; - } else { - if(scheme.equals(NotificationScheme.MANUAL_ALL_NOTIFICATIONS)) { - boolean removed = false, updated = false; - if(notification.getRemovedPolicies()!=null && !notification.getRemovedPolicies().isEmpty()){ - removed = true; - } - if(notification.getLoadedPolicies()!=null && !notification.getLoadedPolicies().isEmpty()){ - updated = true; - } - if(removed && updated) { - notification.setNotificationType(NotificationType.BOTH); - }else if(removed){ - notification.setNotificationType(NotificationType.REMOVE); - }else if(updated){ - notification.setNotificationType(NotificationType.UPDATE); - } - return notification; - }else if(scheme.equals(NotificationScheme.MANUAL_NOTIFICATIONS)) { - return MatchStore.checkMatch(notification); - }else { - return null; + } + if(scheme.equals(NotificationScheme.MANUAL_ALL_NOTIFICATIONS)) { + boolean removed = false, updated = false; + if(notification.getRemovedPolicies()!=null && !notification.getRemovedPolicies().isEmpty()){ + removed = true; + } + if(notification.getLoadedPolicies()!=null && !notification.getLoadedPolicies().isEmpty()){ + updated = true; + } + if(removed && updated) { + notification.setNotificationType(NotificationType.BOTH); + }else if(removed){ + notification.setNotificationType(NotificationType.REMOVE); + }else if(updated){ + notification.setNotificationType(NotificationType.UPDATE); } + return notification; + }else if(scheme.equals(NotificationScheme.MANUAL_NOTIFICATIONS)) { + return MatchStore.checkMatch(notification); } + return null; } private static void publishMessage(String pubTopic, String uniqueID , List<String> uebURLList) { |