X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=applications%2Fnotification-supplier%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fapplications%2Fnotification%2Fsupplier%2Fimpl%2Fitem%2FAbstractNotificationSupplierForItem.java;h=da8aaed3db27dc962364af2c45def56aa463eb63;hb=f61c62231e8d4fe88a3e0180a7e53f92c5e8652c;hp=706a9c4b811c9c40d07666b92109c451dd696653;hpb=dd027398ce47fee33f953917178d21037b4cb5b8;p=openflowplugin.git diff --git a/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/AbstractNotificationSupplierForItem.java b/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/AbstractNotificationSupplierForItem.java index 706a9c4b81..da8aaed3db 100644 --- a/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/AbstractNotificationSupplierForItem.java +++ b/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/AbstractNotificationSupplierForItem.java @@ -22,31 +22,28 @@ import org.opendaylight.yangtools.yang.binding.Notification; /** * Class is package protected abstract implementation for all Old Root Items - * Notification Suppliers + * Notification Suppliers. * * @param - data tree item Object * @param - Create notification * @param - Update notification * @param - Delete notification */ -abstract class AbstractNotificationSupplierForItem - extends AbstractNotificationSupplierBase - implements NotificationSupplierForItem { +public abstract class AbstractNotificationSupplierForItem extends AbstractNotificationSupplierBase implements + NotificationSupplierForItem { private final NotificationProviderService notificationProviderService; /** - * Default constructor for all item Notification Supplier implementation + * Default constructor for all item Notification Supplier implementation. * * @param notifProviderService - notification publisher - * @param db - DataBroker for DataTreeChangeListener registration - * @param clazz - Statistics Notification Class + * @param db - DataBroker for DataTreeChangeListener registration + * @param clazz - Statistics Notification Class */ - public AbstractNotificationSupplierForItem(final NotificationProviderService notifProviderService, final DataBroker db, - final Class clazz) { + public AbstractNotificationSupplierForItem(final NotificationProviderService notifProviderService, + final DataBroker db, final Class clazz) { super(db, clazz); this.notificationProviderService = Preconditions.checkNotNull(notifProviderService); } @@ -79,29 +76,25 @@ abstract class AbstractNotificationSupplierForItem identifier , O add ){ + public void add(InstanceIdentifier identifier, O add) { final C notif = createNotification(add, identifier); if (notif != null) { notificationProviderService.publish(notif); } } - - public void remove(InstanceIdentifier identifier , O del){ + public void remove(InstanceIdentifier identifier, O del) { final D notif = deleteNotification(identifier.firstIdentifierOf(clazz)); if (notif != null) { notificationProviderService.publish(notif); } } - - public void update(InstanceIdentifier identifier , O before, O after){ + public void update(InstanceIdentifier identifier, O before, O after) { final U notif = updateNotification(after, identifier); if (notif != null) { notificationProviderService.publish(notif); } } - }