Remove sal.core.api.model 69/73869/5
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 10 Jul 2018 07:48:19 +0000 (09:48 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 10 Jul 2018 17:05:26 +0000 (19:05 +0200)
This removes deprecated and unused sal.core.api.model package
along with its only implementation, migrating final stragglers
to DOMSchemaService.

Change-Id: Id355ffd96a5aaa0ffa48e018bfadea596ec58ac8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 files changed:
features/mdsal/odl-mdsal-broker-local/pom.xml
features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml
opendaylight/md-sal/mdsal-artifacts/pom.xml
opendaylight/md-sal/mdsal-trace/binding-impl/pom.xml
opendaylight/md-sal/pom.xml
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/AbstractDataBrokerTestCustomizer.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/DataBrokerTestModule.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/util/MockSchemaService.java
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/model/SchemaService.java [deleted file]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/model/YangTextSourceProvider.java [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/LegacyShardedDOMDataBrokerAdapter.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/SchemaContextProviders.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/ProxyFactory.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/SchemaServiceProxy.java [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/resources/org/opendaylight/blueprint/dom-broker.xml
opendaylight/md-sal/sal-schema-service/pom.xml [deleted file]
opendaylight/md-sal/sal-schema-service/src/main/java/org/opendaylight/controller/sal/schema/service/impl/GlobalBundleScanningSchemaServiceImpl.java [deleted file]
opendaylight/md-sal/sal-schema-service/src/main/resources/org/opendaylight/blueprint/sal-schema-service.xml [deleted file]
opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/MdsalLowLevelTestProvider.java
opendaylight/md-sal/samples/clustering-test-app/provider/src/main/resources/org/opendaylight/blueprint/cluster-test-app.xml

index 8f06a67f2728e586ed4e7f81a0deb1cef3ff6ec6..9b21e23074abbb228ad1670d66751203dad255d3 100644 (file)
             <groupId>${project.groupId}</groupId>
             <artifactId>sal-core-spi</artifactId>
         </dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>sal-core-spi</artifactId>
         </dependency>
-        <dependency>
-            <!-- TODO start-level="70" -->
-            <groupId>${project.groupId}</groupId>
-            <artifactId>sal-schema-service</artifactId>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>sal-broker-impl</artifactId>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>sal-broker-impl</artifactId>
index b62ed47adda39cb1a5addb9eb792632c75c19e56..93066baa94d3556565be077e6a22eeca568e4ef6 100644 (file)
@@ -10,7 +10,6 @@
     <feature name="odl-mdsal-broker-local" version="${project.version}">
         <feature version="[3.1.0,4)">odl-lmax-3</feature>
         <feature version="[2.0.3,3)">odl-yangtools-codec</feature>
     <feature name="odl-mdsal-broker-local" version="${project.version}">
         <feature version="[3.1.0,4)">odl-lmax-3</feature>
         <feature version="[2.0.3,3)">odl-yangtools-codec</feature>
-        <bundle start-level="70">mvn:org.opendaylight.controller/sal-schema-service/${project.version}</bundle>
         <bundle start-level="40">mvn:org.opendaylight.controller/blueprint/${blueprint.version}</bundle>
     </feature>
 </features>
         <bundle start-level="40">mvn:org.opendaylight.controller/blueprint/${blueprint.version}</bundle>
     </feature>
 </features>
index 3ac86873cbdb0494bf0b1f5365f664c5d57809c5..08495bb0e4a9559fe0d2f5239b2c3269fa751b7d 100644 (file)
                 <artifactId>sal-inmemory-datastore</artifactId>
                 <version>${project.version}</version>
             </dependency>
                 <artifactId>sal-inmemory-datastore</artifactId>
                 <version>${project.version}</version>
             </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>sal-schema-service</artifactId>
-                <version>${project.version}</version>
-            </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>mdsal-trace-api</artifactId>
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>mdsal-trace-api</artifactId>
index 11da07fde8d611a8f65ca5eb3b22a94185a20487..38b2d2ee7a0af81c92838ebfd9b8b609c36a6680 100644 (file)
@@ -39,7 +39,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <scope>test</scope>
     </dependency>
   </dependencies>
       <scope>test</scope>
     </dependency>
   </dependencies>
-    <build>
+
+  <build>
     <plugins>
         <plugin>
             <groupId>org.apache.felix</groupId>
     <plugins>
         <plugin>
             <groupId>org.apache.felix</groupId>
@@ -52,12 +53,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
                       org.opendaylight.controller.md.sal.dom.api,
                       org.opendaylight.controller.md.sal.binding.api,
                       org.opendaylight.controller.md.sal.binding.spi,
                       org.opendaylight.controller.md.sal.dom.api,
                       org.opendaylight.controller.md.sal.binding.api,
                       org.opendaylight.controller.md.sal.binding.spi,
-                      org.opendaylight.controller.sal.core.api.model,
                       *
                     </Import-Package>
                 </instructions>
             </configuration>
         </plugin>
     </plugins>
                       *
                     </Import-Package>
                 </instructions>
             </configuration>
         </plugin>
     </plugins>
-    </build>
+  </build>
 </project>
 </project>
index 183bc25de2d6a5be650a08cd5bdf687270789187..776fdf6589da9e6bd0e56eb3bec800856669aafe 100644 (file)
@@ -28,7 +28,6 @@
     <module>sal-dom-broker</module>
     <module>sal-dom-spi</module>
     <module>sal-dom-compat</module>
     <module>sal-dom-broker</module>
     <module>sal-dom-spi</module>
     <module>sal-dom-compat</module>
-    <module>sal-schema-service</module>
 
     <!-- Binding Aware -->
     <module>sal-binding-api</module>
 
     <!-- Binding Aware -->
     <module>sal-binding-api</module>
index f36b685435d0090d0e0dcb2172ecb60e3afec70b..722bbd28d04533c4a3cbaed5c240fb8504d577bd 100644 (file)
@@ -24,13 +24,13 @@ import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter;
 import org.opendaylight.controller.md.sal.dom.broker.impl.SerializedDOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore;
 import org.opendaylight.controller.sal.binding.test.util.MockSchemaService;
 import org.opendaylight.controller.md.sal.dom.broker.impl.SerializedDOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore;
 import org.opendaylight.controller.sal.binding.test.util.MockSchemaService;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.controller.sal.core.spi.data.DOMStore;
 import org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator;
 import org.opendaylight.mdsal.binding.dom.codec.gen.impl.StreamWriterGenerator;
 import org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecRegistry;
 import org.opendaylight.mdsal.binding.generator.impl.GeneratedClassLoadingStrategy;
 import org.opendaylight.mdsal.binding.generator.util.JavassistUtils;
 import org.opendaylight.controller.sal.core.spi.data.DOMStore;
 import org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator;
 import org.opendaylight.mdsal.binding.dom.codec.gen.impl.StreamWriterGenerator;
 import org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecRegistry;
 import org.opendaylight.mdsal.binding.generator.impl.GeneratedClassLoadingStrategy;
 import org.opendaylight.mdsal.binding.generator.util.JavassistUtils;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 public abstract class AbstractDataBrokerTestCustomizer {
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 public abstract class AbstractDataBrokerTestCustomizer {
@@ -98,7 +98,7 @@ public abstract class AbstractDataBrokerTestCustomizer {
         return this.bindingToNormalized;
     }
 
         return this.bindingToNormalized;
     }
 
-    public SchemaService getSchemaService() {
+    public DOMSchemaService getSchemaService() {
         return this.schemaService;
     }
 
         return this.schemaService;
     }
 
index fd95a50145dbf91f92b863d6c6dc2f344c279913..f98f1a1845f3af9d9dcee044d05244bf73914266 100644 (file)
@@ -11,7 +11,7 @@ import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter;
 import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
 
 public class DataBrokerTestModule {
 import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
 
 public class DataBrokerTestModule {
@@ -56,7 +56,7 @@ public class DataBrokerTestModule {
         return dataBrokerTest.getDataBrokerTestCustomizer().getDomNotificationRouter();
     }
 
         return dataBrokerTest.getDataBrokerTestCustomizer().getDomNotificationRouter();
     }
 
-    public SchemaService getSchemaService() {
+    public DOMSchemaService getSchemaService() {
         return dataBrokerTest.getDataBrokerTestCustomizer().getSchemaService();
     }
 
         return dataBrokerTest.getDataBrokerTestCustomizer().getSchemaService();
     }
 
index 8fc60e4bbbeb3271f7c559040485abed88f23e00..cd89c4ed6cffbd15d67188cda63ef1f634bbcb29 100644 (file)
@@ -7,25 +7,19 @@
  */
 package org.opendaylight.controller.sal.binding.test.util;
 
  */
 package org.opendaylight.controller.sal.binding.test.util;
 
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.util.ListenerRegistry;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.util.ListenerRegistry;
-import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
 
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
 
-public final class MockSchemaService implements SchemaService, SchemaContextProvider {
+public final class MockSchemaService implements DOMSchemaService, SchemaContextProvider {
 
     private SchemaContext schemaContext;
 
     ListenerRegistry<SchemaContextListener> listeners = ListenerRegistry.create();
 
 
     private SchemaContext schemaContext;
 
     ListenerRegistry<SchemaContextListener> listeners = ListenerRegistry.create();
 
-    @Override
-    public void addModule(final Module module) {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
     public synchronized SchemaContext getGlobalContext() {
         return schemaContext;
     @Override
     public synchronized SchemaContext getGlobalContext() {
         return schemaContext;
@@ -42,11 +36,6 @@ public final class MockSchemaService implements SchemaService, SchemaContextProv
         return listeners.register(listener);
     }
 
         return listeners.register(listener);
     }
 
-    @Override
-    public void removeModule(final Module module) {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
     public synchronized SchemaContext getSchemaContext() {
         return schemaContext;
     @Override
     public synchronized SchemaContext getSchemaContext() {
         return schemaContext;
diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/model/SchemaService.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/model/SchemaService.java
deleted file mode 100644 (file)
index 673849d..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * 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.controller.sal.core.api.model;
-
-import org.opendaylight.controller.sal.core.api.BrokerService;
-import org.opendaylight.mdsal.dom.api.DOMSchemaService;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.model.api.Module;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
-
-/**
- * Deprecated.
- *
- * @deprecated Use {@link DOMSchemaService} instead.
- */
-@Deprecated
-public interface SchemaService extends BrokerService, DOMSchemaService {
-
-    /**
-     * Registers a YANG module to session and global context.
-     */
-    void addModule(Module module);
-
-    /**
-     * Unregisters a YANG module from session context.
-     */
-    void removeModule(Module module);
-
-    /**
-     * Returns session specific YANG schema context.
-     */
-    @Override
-    SchemaContext getSessionContext();
-
-    /**
-     * Returns global schema context.
-     */
-    @Override
-    SchemaContext getGlobalContext();
-
-    /**
-     * Register a listener for changes in schema context.
-     *
-     * @param listener Listener which should be registered
-     * @return Listener registration handle
-     */
-    @Override
-    ListenerRegistration<SchemaContextListener> registerSchemaContextListener(SchemaContextListener listener);
-}
diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/model/YangTextSourceProvider.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/model/YangTextSourceProvider.java
deleted file mode 100644 (file)
index a17cd70..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * 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.controller.sal.core.api.model;
-
-import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
-import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceProvider;
-
-/**
- * Concrete source provider for text based yang sources. Suitable when trying to avoid
- * generics e.g. when exposing a source provider into config subsystem.
- */
-public interface YangTextSourceProvider extends SchemaSourceProvider<YangTextSchemaSource> {
-}
index 402d9753d813f5e4bc730830984170f4643b3e7d..8839b96a2c106a24ce7f82dfb81f0331864b433d 100644 (file)
@@ -21,7 +21,7 @@ import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadWriteTransaction;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
 import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadWriteTransaction;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
 import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.mdsal.dom.broker.ShardedDOMDataBrokerAdapter;
 
 /**
 import org.opendaylight.mdsal.dom.broker.ShardedDOMDataBrokerAdapter;
 
 /**
@@ -40,12 +40,12 @@ import org.opendaylight.mdsal.dom.broker.ShardedDOMDataBrokerAdapter;
 public class LegacyShardedDOMDataBrokerAdapter implements DOMDataBroker {
 
     private final org.opendaylight.mdsal.dom.api.DOMDataBroker delegateDataBroker;
 public class LegacyShardedDOMDataBrokerAdapter implements DOMDataBroker {
 
     private final org.opendaylight.mdsal.dom.api.DOMDataBroker delegateDataBroker;
-    private final SchemaService schemaService;
+    private final DOMSchemaService schemaService;
     private final AtomicLong txNum = new AtomicLong();
     private final AtomicLong chainNum = new AtomicLong();
 
     public LegacyShardedDOMDataBrokerAdapter(final ShardedDOMDataBrokerAdapter delegateDataBroker,
     private final AtomicLong txNum = new AtomicLong();
     private final AtomicLong chainNum = new AtomicLong();
 
     public LegacyShardedDOMDataBrokerAdapter(final ShardedDOMDataBrokerAdapter delegateDataBroker,
-                                             final SchemaService schemaService) {
+                                             final DOMSchemaService schemaService) {
         this.delegateDataBroker = checkNotNull(delegateDataBroker);
         this.schemaService = checkNotNull(schemaService);
     }
         this.delegateDataBroker = checkNotNull(delegateDataBroker);
         this.schemaService = checkNotNull(schemaService);
     }
index 7fc33d15c586577508007877047fd909e2173ba6..6a7ab9c3c56a91a89f3b0a02dc82ef49664de2df 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.controller.sal.dom.broker.impl;
 
  */
 package org.opendaylight.controller.sal.dom.broker.impl;
 
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.yangtools.concepts.Delegator;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
 import org.opendaylight.yangtools.concepts.Delegator;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
@@ -18,18 +18,18 @@ public final class SchemaContextProviders {
         throw new UnsupportedOperationException("Utility class.");
     }
 
         throw new UnsupportedOperationException("Utility class.");
     }
 
-    public static SchemaContextProvider fromSchemaService(final SchemaService schemaService) {
+    public static SchemaContextProvider fromSchemaService(final DOMSchemaService schemaService) {
         if (schemaService instanceof SchemaContextProvider) {
             return (SchemaContextProvider) schemaService;
         }
         return new SchemaServiceAdapter(schemaService);
     }
 
         if (schemaService instanceof SchemaContextProvider) {
             return (SchemaContextProvider) schemaService;
         }
         return new SchemaServiceAdapter(schemaService);
     }
 
-    private static final class SchemaServiceAdapter implements SchemaContextProvider, Delegator<SchemaService> {
+    private static final class SchemaServiceAdapter implements SchemaContextProvider, Delegator<DOMSchemaService> {
 
 
-        private final SchemaService service;
+        private final DOMSchemaService service;
 
 
-        SchemaServiceAdapter(final SchemaService service) {
+        SchemaServiceAdapter(final DOMSchemaService service) {
             this.service = service;
         }
 
             this.service = service;
         }
 
@@ -39,7 +39,7 @@ public final class SchemaContextProviders {
         }
 
         @Override
         }
 
         @Override
-        public SchemaService getDelegate() {
+        public DOMSchemaService getDelegate() {
             return service;
         }
 
             return service;
         }
 
index 1ca9f5da96ce7276ce17eb7a477b32d1f78d123e..250ef7d463951cf7061e4d56b8ab502009db7e17 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.sal.dom.broker.osgi;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
 import org.opendaylight.controller.sal.core.api.BrokerService;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
 import org.opendaylight.controller.sal.core.api.BrokerService;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.osgi.framework.ServiceReference;
 
 @SuppressWarnings("unchecked")
 import org.osgi.framework.ServiceReference;
 
 @SuppressWarnings("unchecked")
@@ -30,11 +29,6 @@ public final class ProxyFactory {
         return new DOMMountPointServiceProxy((ServiceReference<DOMMountPointService>) ref, service);
     }
 
         return new DOMMountPointServiceProxy((ServiceReference<DOMMountPointService>) ref, service);
     }
 
-    private static Object createProxyImpl(final ServiceReference<?> ref, final SchemaService service) {
-
-        return new SchemaServiceProxy((ServiceReference<SchemaService>) ref, service);
-    }
-
     private static DOMDataBrokerProxy createProxyImpl(final ServiceReference<?> ref, final DOMDataBroker service) {
 
         return new DOMDataBrokerProxy((ServiceReference<DOMDataBroker>) ref, service);
     private static DOMDataBrokerProxy createProxyImpl(final ServiceReference<?> ref, final DOMDataBroker service) {
 
         return new DOMDataBrokerProxy((ServiceReference<DOMDataBroker>) ref, service);
@@ -47,8 +41,6 @@ public final class ProxyFactory {
 
         if (service instanceof DOMDataBroker) {
             return createProxyImpl(ref, (DOMDataBroker) service);
 
         if (service instanceof DOMDataBroker) {
             return createProxyImpl(ref, (DOMDataBroker) service);
-        } else if (service instanceof SchemaService) {
-            return createProxyImpl(ref, (SchemaService) service);
         } else if (service instanceof DOMMountPointService) {
             return createProxyImpl(ref, (DOMMountPointService) service);
         }
         } else if (service instanceof DOMMountPointService) {
             return createProxyImpl(ref, (DOMMountPointService) service);
         }
diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/SchemaServiceProxy.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/SchemaServiceProxy.java
deleted file mode 100644 (file)
index 330caa9..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * 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.controller.sal.dom.broker.osgi;
-
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.model.api.Module;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
-import org.osgi.framework.ServiceReference;
-
-public class SchemaServiceProxy extends AbstractBrokerServiceProxy<SchemaService> implements SchemaService {
-
-    public SchemaServiceProxy(ServiceReference<SchemaService> ref, SchemaService delegate) {
-        super(ref, delegate);
-    }
-
-    @Override
-    public void addModule(Module module) {
-        getDelegate().addModule(module);
-    }
-
-    @Override
-    public void removeModule(Module module) {
-        getDelegate().removeModule(module);
-    }
-
-    @Override
-    public SchemaContext getSessionContext() {
-        return null;
-    }
-
-    @Override
-    public SchemaContext getGlobalContext() {
-        return getDelegate().getGlobalContext();
-    }
-
-    @Override
-    public ListenerRegistration<SchemaContextListener> registerSchemaContextListener(SchemaContextListener listener) {
-        ListenerRegistration<SchemaContextListener> registration = getDelegate()
-                .registerSchemaContextListener(listener);
-        addRegistration(registration);
-        return registration;
-    }
-}
index bff959c0edd8eaccf56cf2cd779c8c01c0ae2a0b..f77b7935e5c6981f856b551039b298a52a633d46 100644 (file)
@@ -14,7 +14,7 @@
 
   <!-- Schema Service -->
 
 
   <!-- Schema Service -->
 
-  <odl:static-reference id="schemaService" interface="org.opendaylight.controller.sal.core.api.model.SchemaService"/>
+  <odl:static-reference id="schemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService"/>
 
   <!-- DOM Notification Service -->
 
 
   <!-- DOM Notification Service -->
 
diff --git a/opendaylight/md-sal/sal-schema-service/pom.xml b/opendaylight/md-sal/sal-schema-service/pom.xml
deleted file mode 100644 (file)
index 7bbd336..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.opendaylight.controller</groupId>
-    <artifactId>mdsal-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
-    <relativePath>../parent</relativePath>
-  </parent>
-
-  <groupId>org.opendaylight.controller</groupId>
-  <artifactId>sal-schema-service</artifactId>
-  <version>1.8.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>sal-core-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.yangtools</groupId>
-      <artifactId>yang-parser-impl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-  </dependencies>
-
-  <scm>
-    <connection>scm:git:http://git.opendaylight.org/gerrit/controller.git</connection>
-    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
-    <tag>HEAD</tag>
-    <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
-  </scm>
-
-</project>
diff --git a/opendaylight/md-sal/sal-schema-service/src/main/java/org/opendaylight/controller/sal/schema/service/impl/GlobalBundleScanningSchemaServiceImpl.java b/opendaylight/md-sal/sal-schema-service/src/main/java/org/opendaylight/controller/sal/schema/service/impl/GlobalBundleScanningSchemaServiceImpl.java
deleted file mode 100644 (file)
index 7a91cdf..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * 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.controller.sal.schema.service.impl;
-
-import com.google.common.base.Preconditions;
-import com.google.common.util.concurrent.CheckedFuture;
-import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.ListenableFuture;
-import java.util.HashSet;
-import java.util.Set;
-import javax.annotation.concurrent.GuardedBy;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
-import org.opendaylight.controller.sal.core.api.model.YangTextSourceProvider;
-import org.opendaylight.mdsal.dom.api.DOMSchemaService;
-import org.opendaylight.mdsal.dom.api.DOMYangTextSourceProvider;
-import org.opendaylight.yangtools.concepts.AbstractListenerRegistration;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.model.api.Module;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
-import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
-import org.opendaylight.yangtools.yang.model.repo.api.MissingSchemaSourceException;
-import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException;
-import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
-import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
-
-@Deprecated
-public final class GlobalBundleScanningSchemaServiceImpl implements SchemaContextProvider, SchemaService,
-        YangTextSourceProvider, AutoCloseable {
-
-    @GuardedBy("lock")
-    private final Set<ListenerRegistration<?>> listeners = new HashSet<>();
-    private final Object lock = new Object();
-    private final DOMSchemaService schemaService;
-    private final DOMYangTextSourceProvider yangProvider;
-
-    private GlobalBundleScanningSchemaServiceImpl(final DOMSchemaService schemaService) {
-        this.schemaService = Preconditions.checkNotNull(schemaService);
-        this.yangProvider = (DOMYangTextSourceProvider) schemaService.getSupportedExtensions()
-                .get(DOMYangTextSourceProvider.class);
-    }
-
-    public static GlobalBundleScanningSchemaServiceImpl createInstance(final DOMSchemaService schemaService) {
-        return new GlobalBundleScanningSchemaServiceImpl(schemaService);
-    }
-
-    @Override
-    public SchemaContext getSchemaContext() {
-        return schemaService.getGlobalContext();
-    }
-
-    @Override
-    public SchemaContext getGlobalContext() {
-        return schemaService.getGlobalContext();
-    }
-
-    @Override
-    public void addModule(final Module module) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public SchemaContext getSessionContext() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void removeModule(final Module module) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public ListenerRegistration<SchemaContextListener> registerSchemaContextListener(
-            final SchemaContextListener listener) {
-        synchronized (lock) {
-            final ListenerRegistration<SchemaContextListener> reg = schemaService.registerSchemaContextListener(
-                listener);
-
-            final ListenerRegistration<SchemaContextListener> ret =
-                    new AbstractListenerRegistration<SchemaContextListener>(listener) {
-                @Override
-                protected void removeRegistration() {
-                    synchronized (lock) {
-                        listeners.remove(this);
-                    }
-                    reg.close();
-                }
-            };
-
-            listeners.add(ret);
-            return ret;
-        }
-    }
-
-    @Override
-    public void close() {
-        synchronized (lock) {
-            for (ListenerRegistration<?> l : listeners) {
-                l.close();
-            }
-            listeners.clear();
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public CheckedFuture<YangTextSchemaSource, SchemaSourceException> getSource(
-            final SourceIdentifier sourceIdentifier) {
-        if (yangProvider == null) {
-            return Futures.immediateFailedCheckedFuture(new MissingSchemaSourceException(
-                "Source provider is not available", sourceIdentifier));
-        }
-
-        return Futures.makeChecked((ListenableFuture<YangTextSchemaSource>) yangProvider.getSource(sourceIdentifier),
-            e -> new SchemaSourceException("Error retrieving source", e));
-    }
-}
diff --git a/opendaylight/md-sal/sal-schema-service/src/main/resources/org/opendaylight/blueprint/sal-schema-service.xml b/opendaylight/md-sal/sal-schema-service/src/main/resources/org/opendaylight/blueprint/sal-schema-service.xml
deleted file mode 100644 (file)
index a9a1bdb..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">
-    <!-- MD-SAL's DOMSchemaService -->
-    <odl:static-reference id="domSchemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService"/>
-
-    <!-- Schema Service -->
-    <bean id="schemaService" class="org.opendaylight.controller.sal.schema.service.impl.GlobalBundleScanningSchemaServiceImpl"
-        factory-method="createInstance">
-        <argument ref="domSchemaService"/>
-    </bean>
-
-    <service ref="schemaService" odl:type="default">
-        <interfaces>
-            <value>org.opendaylight.controller.sal.core.api.model.SchemaService</value>
-            <value>org.opendaylight.controller.sal.core.api.model.YangTextSourceProvider</value>
-        </interfaces>
-    </service>
-</blueprint>
index da6df6b85584f88faea634346f8eed3b18f35fff..9075a56c5e5f41719331ce884702d7b71181677d 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
  * 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.controller.clustering.it.provider;
 
 import static akka.actor.ActorRef.noSender;
 package org.opendaylight.controller.clustering.it.provider;
 
 import static akka.actor.ActorRef.noSender;
@@ -59,12 +58,12 @@ import org.opendaylight.controller.md.sal.dom.api.DOMRpcImplementationRegistrati
 import org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeLoopException;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeService;
 import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeLoopException;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration;
 import org.opendaylight.yang.gen.v1.tag.opendaylight.org._2017.controller.yang.lowlevel.control.rev170215.AddShardReplicaInput;
 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration;
 import org.opendaylight.yang.gen.v1.tag.opendaylight.org._2017.controller.yang.lowlevel.control.rev170215.AddShardReplicaInput;
@@ -170,7 +169,7 @@ public class MdsalLowLevelTestProvider implements OdlMdsalLowlevelControlService
     private final DOMDataBroker domDataBroker;
     private final NotificationPublishService notificationPublishService;
     private final NotificationService notificationService;
     private final DOMDataBroker domDataBroker;
     private final NotificationPublishService notificationPublishService;
     private final NotificationService notificationService;
-    private final SchemaService schemaService;
+    private final DOMSchemaService schemaService;
     private final ClusterSingletonServiceProvider singletonService;
     private final DOMRpcProviderService domRpcService;
     private final PrefixLeaderHandler prefixLeaderHandler;
     private final ClusterSingletonServiceProvider singletonService;
     private final DOMRpcProviderService domRpcService;
     private final PrefixLeaderHandler prefixLeaderHandler;
@@ -197,7 +196,7 @@ public class MdsalLowLevelTestProvider implements OdlMdsalLowlevelControlService
     public MdsalLowLevelTestProvider(final RpcProviderRegistry rpcRegistry,
                                      final DOMRpcProviderService domRpcService,
                                      final ClusterSingletonServiceProvider singletonService,
     public MdsalLowLevelTestProvider(final RpcProviderRegistry rpcRegistry,
                                      final DOMRpcProviderService domRpcService,
                                      final ClusterSingletonServiceProvider singletonService,
-                                     final SchemaService schemaService,
+                                     final DOMSchemaService schemaService,
                                      final BindingNormalizedNodeSerializer bindingNormalizedNodeSerializer,
                                      final NotificationPublishService notificationPublishService,
                                      final NotificationService notificationService,
                                      final BindingNormalizedNodeSerializer bindingNormalizedNodeSerializer,
                                      final NotificationPublishService notificationPublishService,
                                      final NotificationService notificationService,
index 2a914ffae7056ca3b3ea55f2ead61c50f3f86c30..ba2e312c82ae891cf80a1c8de247b21b54d38360 100644 (file)
@@ -11,7 +11,7 @@
   <reference id="domRpcProviderService" interface="org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService"/>
   <reference id="clusterSingletonService" interface="org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider"/>
   <reference id="domDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"/>
   <reference id="domRpcProviderService" interface="org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService"/>
   <reference id="clusterSingletonService" interface="org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider"/>
   <reference id="domDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"/>
-  <reference id="schemaService" interface="org.opendaylight.controller.sal.core.api.model.SchemaService"/>
+  <reference id="schemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService"/>
   <reference id="normalizedNodeSerializer" interface="org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer"/>
   <reference id="notificationPublishService" interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService" />
   <reference id="notificationListenerService" interface="org.opendaylight.controller.md.sal.binding.api.NotificationService" />
   <reference id="normalizedNodeSerializer" interface="org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer"/>
   <reference id="notificationPublishService" interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService" />
   <reference id="notificationListenerService" interface="org.opendaylight.controller.md.sal.binding.api.NotificationService" />