Bug 8568: Remove deprecated MountProviderService from RootBindingAwareBroker
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / md / sal / binding / compat / HydrogenMountInstanceAdapter.java
index e7aea8d..3a4d785 100644 (file)
@@ -12,12 +12,7 @@ import com.google.common.base.Preconditions;
 import com.google.common.collect.ClassToInstanceMap;
 import com.google.common.collect.ImmutableClassToInstanceMap;
 import java.util.concurrent.ExecutorService;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.MountPoint;
-import org.opendaylight.controller.md.sal.common.api.RegistrationListener;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandlerRegistration;
-import org.opendaylight.controller.md.sal.common.api.data.DataReader;
 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
@@ -27,15 +22,9 @@ import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
 import org.opendaylight.controller.sal.binding.api.NotificationService;
 import org.opendaylight.controller.sal.binding.api.RpcConsumerRegistry;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
-import org.opendaylight.controller.sal.binding.api.data.DataBrokerService;
-import org.opendaylight.controller.sal.binding.api.data.DataChangeListener;
-import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
-import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
 import org.opendaylight.controller.sal.binding.api.mount.MountProviderInstance;
 import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.concepts.Registration;
-import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.Notification;
 import org.opendaylight.yangtools.yang.binding.RpcService;
@@ -51,10 +40,6 @@ public class HydrogenMountInstanceAdapter implements MountProviderInstance {
         this.identifier = key.getIdentifier();
         final ImmutableClassToInstanceMap.Builder<BindingAwareService> builder = ImmutableClassToInstanceMap.builder();
 
-        final Optional<DataBroker> dataBroker = key.getService(DataBroker.class);
-        if(dataBroker.isPresent()) {
-            builder.put(DataBrokerService.class, new HydrogenDataBrokerAdapter(dataBroker.get()));
-        }
         final Optional<org.opendaylight.controller.md.sal.binding.api.NotificationService> notificationService = key.getService(org.opendaylight.controller.md.sal.binding.api.NotificationService.class);
         if(notificationService.isPresent()) {
             builder.put(NotificationService.class, new HeliumNotificationServiceAdapter(notificationService.get()));
@@ -95,27 +80,6 @@ public class HydrogenMountInstanceAdapter implements MountProviderInstance {
         return service(NotificationService.class).registerNotificationListener(listener);
     }
 
-    @Override
-    public DataModificationTransaction beginTransaction() {
-        return service(DataBrokerService.class).beginTransaction();
-    }
-
-    @Override
-    public DataObject readConfigurationData(final InstanceIdentifier<? extends DataObject> path) {
-        return service(DataBrokerService.class).readConfigurationData(path);
-    }
-
-    @Override
-    public DataObject readOperationalData(final InstanceIdentifier<? extends DataObject> path) {
-        return service(DataBrokerService.class).readOperationalData(path);
-    }
-
-    @Override
-    public ListenerRegistration<DataChangeListener> registerDataChangeListener(
-            final InstanceIdentifier<? extends DataObject> path, final DataChangeListener listener) {
-        return service(DataBrokerService.class).registerDataChangeListener(path,listener);
-    }
-
     @Override
     public <T extends RpcService> RoutedRpcRegistration<T> addRoutedRpcImplementation(final Class<T> serviceInterface,
             final T implementation) throws IllegalStateException {
@@ -138,24 +102,6 @@ public class HydrogenMountInstanceAdapter implements MountProviderInstance {
         service(NotificationProviderService.class).publish(notification);
     }
 
-    @Override
-    public Registration registerCommitHandler(final InstanceIdentifier<? extends DataObject> arg0,
-            final DataCommitHandler<InstanceIdentifier<? extends DataObject>, DataObject> arg1) {
-        return service(DataProviderService.class).registerCommitHandler(arg0, arg1);
-    }
-
-    @Override
-    public ListenerRegistration<RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier<? extends DataObject>, DataObject>>> registerCommitHandlerListener(
-            final RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier<? extends DataObject>, DataObject>> arg0) {
-        return service(DataProviderService.class).registerCommitHandlerListener(arg0);
-    }
-
-    @Override
-    public Registration registerDataReader(final InstanceIdentifier<? extends DataObject> path,
-            final DataReader<InstanceIdentifier<? extends DataObject>, DataObject> reader) {
-        return service(DataProviderService.class).registerDataReader(path, reader);
-    }
-
     @Override
     public ListenerRegistration<NotificationInterestListener> registerInterestListener(
             final NotificationInterestListener interestListener) {

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.