Remove sal.core.api.model
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / test / java / org / opendaylight / controller / sal / binding / test / util / MockSchemaService.java
index c8acbcd994352d80c85d51c15035fb706af9251d..cd89c4ed6cffbd15d67188cda63ef1f634bbcb29 100644 (file)
@@ -7,25 +7,18 @@
  */
 package org.opendaylight.controller.sal.binding.test.util;
 
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
-import org.opendaylight.controller.sal.dom.broker.impl.SchemaContextProvider;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.concepts.util.ListenerRegistry;
-import org.opendaylight.yangtools.yang.model.api.Module;
+import org.opendaylight.yangtools.util.ListenerRegistry;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.model.api.SchemaServiceListener;
+import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
+import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
 
-@SuppressWarnings("deprecation")
-public final class MockSchemaService implements SchemaService, SchemaContextProvider {
+public final class MockSchemaService implements DOMSchemaService, SchemaContextProvider {
 
     private SchemaContext schemaContext;
 
-    ListenerRegistry<SchemaServiceListener> listeners = ListenerRegistry.create();
-
-    @Override
-    public void addModule(final Module module) {
-        throw new UnsupportedOperationException();
-    }
+    ListenerRegistry<SchemaContextListener> listeners = ListenerRegistry.create();
 
     @Override
     public synchronized SchemaContext getGlobalContext() {
@@ -38,16 +31,11 @@ public final class MockSchemaService implements SchemaService, SchemaContextProv
     }
 
     @Override
-    public ListenerRegistration<SchemaServiceListener> registerSchemaServiceListener(
-            final SchemaServiceListener listener) {
+    public ListenerRegistration<SchemaContextListener> registerSchemaContextListener(
+            final SchemaContextListener listener) {
         return listeners.register(listener);
     }
 
-    @Override
-    public void removeModule(final Module module) {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
     public synchronized SchemaContext getSchemaContext() {
         return schemaContext;
@@ -55,8 +43,8 @@ public final class MockSchemaService implements SchemaService, SchemaContextProv
 
     public synchronized void changeSchema(final SchemaContext newContext) {
         schemaContext = newContext;
-        for (ListenerRegistration<SchemaServiceListener> listener : listeners) {
+        for (ListenerRegistration<SchemaContextListener> listener : listeners) {
             listener.getInstance().onGlobalContextUpdated(schemaContext);
         }
     }
-}
\ No newline at end of file
+}