X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fdom%2Fbroker%2FMountPointImpl.java;h=054c8ea851cf2e8f56e6891a40c0dd790b72e34e;hp=dd47cb41f763275c0441ffcacecb8f53670730df;hb=de3e413b633b7555ae8f3fe2ec163dbb7dda5da8;hpb=b35aa25e0c3a91fc71e778d9c9393e91036246e3 diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/MountPointImpl.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/MountPointImpl.java index dd47cb41f7..054c8ea851 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/MountPointImpl.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/MountPointImpl.java @@ -36,8 +36,8 @@ import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.data.api.CompositeNode; -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import com.google.common.util.concurrent.ListenableFuture; @@ -48,14 +48,14 @@ public class MountPointImpl implements MountProvisionInstance, SchemaContextProv private final SchemaAwareRpcBroker rpcs; private final DataBrokerImpl dataReader; private final NotificationRouter notificationRouter; - private final DataReader readWrapper; + private final DataReader readWrapper; - private final InstanceIdentifier mountPath; + private final YangInstanceIdentifier mountPath; private SchemaContext schemaContext; - public MountPointImpl(final InstanceIdentifier path) { + public MountPointImpl(final YangInstanceIdentifier path) { this.mountPath = path; rpcs = new SchemaAwareRpcBroker(path.toString(),this); dataReader = new DataBrokerImpl(); @@ -63,11 +63,11 @@ public class MountPointImpl implements MountProvisionInstance, SchemaContextProv readWrapper = new ReadWrapper(); } - public InstanceIdentifier getMountPath() { + public YangInstanceIdentifier getMountPath() { return mountPath; } - public DataReader getReadWrapper() { + public DataReader getReadWrapper() { return readWrapper; } @@ -82,24 +82,24 @@ public class MountPointImpl implements MountProvisionInstance, SchemaContextProv } @Override - public CompositeNode readConfigurationData(final InstanceIdentifier path) { + public CompositeNode readConfigurationData(final YangInstanceIdentifier path) { return dataReader.readConfigurationData(path); } @Override - public CompositeNode readOperationalData(final InstanceIdentifier path) { + public CompositeNode readOperationalData(final YangInstanceIdentifier path) { return dataReader.readOperationalData(path); } @Override public Registration registerOperationalReader( - final InstanceIdentifier path, final DataReader reader) { + final YangInstanceIdentifier path, final DataReader reader) { return dataReader.registerOperationalReader(path, reader); } @Override public Registration registerConfigurationReader( - final InstanceIdentifier path, final DataReader reader) { + final YangInstanceIdentifier path, final DataReader reader) { return dataReader.registerConfigurationReader(path, reader); } @@ -145,14 +145,14 @@ public class MountPointImpl implements MountProvisionInstance, SchemaContextProv } @Override - public ListenerRegistration registerDataChangeListener(final InstanceIdentifier path, + public ListenerRegistration registerDataChangeListener(final YangInstanceIdentifier path, final DataChangeListener listener) { return dataReader.registerDataChangeListener(path, listener); } @Override public Registration registerCommitHandler( - final InstanceIdentifier path, final DataCommitHandler commitHandler) { + final YangInstanceIdentifier path, final DataCommitHandler commitHandler) { return dataReader.registerCommitHandler(path, commitHandler); } @@ -185,19 +185,19 @@ public class MountPointImpl implements MountProvisionInstance, SchemaContextProv this.schemaContext = schemaContext; } - class ReadWrapper implements DataReader { - private InstanceIdentifier shortenPath(final InstanceIdentifier path) { - InstanceIdentifier ret = null; + class ReadWrapper implements DataReader { + private YangInstanceIdentifier shortenPath(final YangInstanceIdentifier path) { + YangInstanceIdentifier ret = null; if(mountPath.contains(path)) { List newArgs = path.getPath().subList(mountPath.getPath().size(), path.getPath().size()); - ret = InstanceIdentifier.create(newArgs); + ret = YangInstanceIdentifier.create(newArgs); } return ret; } @Override - public CompositeNode readConfigurationData(final InstanceIdentifier path) { - InstanceIdentifier newPath = shortenPath(path); + public CompositeNode readConfigurationData(final YangInstanceIdentifier path) { + YangInstanceIdentifier newPath = shortenPath(path); if(newPath == null) { return null; } @@ -205,8 +205,8 @@ public class MountPointImpl implements MountProvisionInstance, SchemaContextProv } @Override - public CompositeNode readOperationalData(final InstanceIdentifier path) { - InstanceIdentifier newPath = shortenPath(path); + public CompositeNode readOperationalData(final YangInstanceIdentifier path) { + YangInstanceIdentifier newPath = shortenPath(path); if(newPath == null) { return null; } @@ -215,13 +215,13 @@ public class MountPointImpl implements MountProvisionInstance, SchemaContextProv } @Override - public ListenerRegistration>> registerCommitHandlerListener( - final RegistrationListener> commitHandlerListener) { + public ListenerRegistration>> registerCommitHandlerListener( + final RegistrationListener> commitHandlerListener) { return dataReader.registerCommitHandlerListener(commitHandlerListener); } @Override - public > ListenerRegistration registerRouteChangeListener( + public > ListenerRegistration registerRouteChangeListener( final L listener) { return rpcs.registerRouteChangeListener(listener); }