Prefer InstanceIdentifier imports 66/10766/2
authorRobert Varga <rovarga@cisco.com>
Thu, 4 Sep 2014 10:26:44 +0000 (12:26 +0200)
committerRobert Varga <rovarga@cisco.com>
Thu, 4 Sep 2014 20:30:12 +0000 (20:30 +0000)
InstanceIdentifier/YangInstanceIdentifier are now separate, so we can
import them at the same time. Do precisely that.

Change-Id: I54a5cd49ef7b8584a5b09a12ab97e132fb92cb57
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModule.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/AbstractForwardedTransaction.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/MountPointManagerImpl.java

index a15b1d7..754d14f 100644 (file)
@@ -22,6 +22,7 @@ import org.opendaylight.yangtools.sal.binding.generator.impl.GeneratedClassLoadi
 import org.opendaylight.yangtools.sal.binding.generator.impl.RuntimeGeneratedMappingServiceImpl;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
@@ -38,8 +39,7 @@ import org.slf4j.LoggerFactory;
 /**
 *
 */
-public final class RuntimeMappingModule extends
-        org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractRuntimeMappingModule {
+public final class RuntimeMappingModule extends AbstractRuntimeMappingModule {
 
     private static final Logger LOG = LoggerFactory.getLogger(RuntimeMappingModule.class);
 
@@ -138,25 +138,24 @@ public final class RuntimeMappingModule extends
 
         @Override
         public Entry<YangInstanceIdentifier, CompositeNode> toDataDom(
-                final Entry<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<? extends DataObject>, DataObject> entry) {
+                final Entry<InstanceIdentifier<? extends DataObject>, DataObject> entry) {
             return delegate.toDataDom(entry);
         }
 
         @Override
-        public YangInstanceIdentifier toDataDom(
-                final org.opendaylight.yangtools.yang.binding.InstanceIdentifier<? extends DataObject> path) {
+        public YangInstanceIdentifier toDataDom(final InstanceIdentifier<? extends DataObject> path) {
             return delegate.toDataDom(path);
         }
 
         @Override
         public DataObject dataObjectFromDataDom(
-                final org.opendaylight.yangtools.yang.binding.InstanceIdentifier<? extends DataObject> path,
+                final InstanceIdentifier<? extends DataObject> path,
                 final CompositeNode result) throws DeserializationException {
             return delegate.dataObjectFromDataDom(path, result);
         }
 
         @Override
-        public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> fromDataDom(final YangInstanceIdentifier entry)
+        public InstanceIdentifier<?> fromDataDom(final YangInstanceIdentifier entry)
                 throws DeserializationException {
             return delegate.fromDataDom(entry);
         }
index 96a3f1c..088e228 100644 (file)
@@ -7,6 +7,10 @@
  */
 package org.opendaylight.controller.md.sal.binding.impl;
 
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
+import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.Futures;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
@@ -15,15 +19,10 @@ import org.opendaylight.yangtools.concepts.Delegator;
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.util.concurrent.MappingCheckedFuture;
 import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.util.concurrent.CheckedFuture;
-import com.google.common.util.concurrent.Futures;
-
-
 abstract class AbstractForwardedTransaction<T extends AsyncTransaction<YangInstanceIdentifier, NormalizedNode<?, ?>>>
         implements Delegator<T>, Identifiable<Object> {
 
@@ -56,9 +55,9 @@ abstract class AbstractForwardedTransaction<T extends AsyncTransaction<YangInsta
         return codec;
     }
 
-    protected final <T extends DataObject> CheckedFuture<Optional<T>,ReadFailedException> doRead(
+    protected final <D extends DataObject> CheckedFuture<Optional<D>,ReadFailedException> doRead(
             final DOMDataReadTransaction readTx, final LogicalDatastoreType store,
-            final org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path) {
+            final InstanceIdentifier<D> path) {
 
         return MappingCheckedFuture.create(
                     Futures.transform(readTx.read(store, codec.toNormalized(path)),
index c390fe7..c3f46b2 100644 (file)
@@ -7,10 +7,11 @@
  */
 package org.opendaylight.controller.sal.binding.impl;
 
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.Executors;
-
 import org.opendaylight.controller.md.sal.binding.util.AbstractBindingSalProviderInstance;
 import org.opendaylight.controller.sal.binding.api.mount.MountProviderInstance;
 import org.opendaylight.controller.sal.binding.api.mount.MountProviderService;
@@ -20,9 +21,6 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.common.util.concurrent.MoreExecutors;
-
 public class MountPointManagerImpl implements MountProviderService {
 
     public final Logger LOG = LoggerFactory.getLogger(MountPointManagerImpl.class);
@@ -113,7 +111,7 @@ public class MountPointManagerImpl implements MountProviderService {
 
         private final InstanceIdentifier<?> identifier;
 
-        public BindingMountPointImpl(final org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> identifier,
+        public BindingMountPointImpl(final InstanceIdentifier<?> identifier,
                 final RpcProviderRegistryImpl rpcRegistry, final NotificationBrokerImpl notificationBroker,
                 final DataBrokerImpl dataBroker) {
             super(rpcRegistry, notificationBroker, dataBroker);