Switch to MD-SAL APIs
[openflowplugin.git] / applications / notification-supplier / src / main / java / org / opendaylight / openflowplugin / applications / notification / supplier / impl / item / MeterNotificationSupplierImpl.java
index 95d0333a8535a648bb1a1c42e3b5254aede893ec..ecd1fd51f2aaf3a915d8cf26be7a714ef777f0e2 100644 (file)
@@ -5,15 +5,13 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item;
 
 import com.google.common.base.Preconditions;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.NotificationPublishService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.MeterKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterAdded;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterAddedBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterRemoved;
@@ -36,10 +34,10 @@ public class MeterNotificationSupplierImpl extends
     /**
      * Constructor register supplier as DataTreeChangeListener and create wildCarded InstanceIdentifier.
      *
-     * @param notifProviderService - {@link NotificationProviderService}
+     * @param notifProviderService - {@link NotificationPublishService}
      * @param db - {@link DataBroker}
      */
-    public MeterNotificationSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) {
+    public MeterNotificationSupplierImpl(final NotificationPublishService notifProviderService, final DataBroker db) {
         super(notifProviderService, db, Meter.class);
     }
 
@@ -72,7 +70,7 @@ public class MeterNotificationSupplierImpl extends
     public MeterRemoved deleteNotification(final InstanceIdentifier<Meter> path) {
         Preconditions.checkArgument(path != null);
         final MeterRemovedBuilder builder = new MeterRemovedBuilder();
-        builder.setMeterId(path.firstKeyOf(Meter.class, MeterKey.class).getMeterId());
+        builder.setMeterId(path.firstKeyOf(Meter.class).getMeterId());
         builder.setMeterRef(new MeterRef(path));
         builder.setNode(createNodeRef(path));
         return builder.build();