Merge "Bug 1333: Regression Test suite."
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / osgi / SchemaServiceProxy.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.sal.dom.broker.osgi;
9
10 import org.opendaylight.controller.sal.core.api.model.SchemaService;
11 import org.opendaylight.yangtools.concepts.ListenerRegistration;
12 import org.opendaylight.yangtools.yang.model.api.Module;
13 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
14 import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
15 import org.osgi.framework.ServiceReference;
16
17 public class SchemaServiceProxy extends AbstractBrokerServiceProxy<SchemaService> implements SchemaService {
18
19     public SchemaServiceProxy(ServiceReference<SchemaService> ref, SchemaService delegate) {
20         super(ref, delegate);
21     }
22
23     @Override
24     public void addModule(Module module) {
25         getDelegate().addModule(module);
26     }
27
28     @Override
29     public void removeModule(Module module) {
30         getDelegate().removeModule(module);
31     }
32
33     @Override
34     public SchemaContext getSessionContext() {
35         return null;
36     }
37
38     @Override
39     public SchemaContext getGlobalContext() {
40         return getDelegate().getGlobalContext();
41     }
42
43     @Override
44     public ListenerRegistration<SchemaContextListener> registerSchemaContextListener(SchemaContextListener listener) {
45         ListenerRegistration<SchemaContextListener> registration = getDelegate().registerSchemaContextListener(listener);
46         addRegistration(registration);
47         return registration;
48     }
49 }