5e5b25bdc85fa5129a5187f1fbfb712005751efd
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / osgi / DataProviderServiceProxy.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.md.sal.common.api.RegistrationListener;
11 import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler;
12 import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandlerRegistration;
13 import org.opendaylight.controller.md.sal.common.api.data.DataReader;
14 import org.opendaylight.controller.sal.common.DataStoreIdentifier;
15 import org.opendaylight.controller.sal.core.api.data.DataChangeListener;
16 import org.opendaylight.controller.sal.core.api.data.DataModificationTransaction;
17 import org.opendaylight.controller.sal.core.api.data.DataProviderService;
18 import org.opendaylight.controller.sal.core.api.data.DataValidator;
19 import org.opendaylight.yangtools.concepts.ListenerRegistration;
20 import org.opendaylight.yangtools.concepts.Registration;
21 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
22 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
23 import org.osgi.framework.ServiceReference;
24
25 public class DataProviderServiceProxy extends AbstractBrokerServiceProxy<DataProviderService> implements
26         DataProviderService {
27
28     public DataProviderServiceProxy(ServiceReference<DataProviderService> ref, DataProviderService delegate) {
29         super(ref, delegate);
30     }
31
32     public ListenerRegistration<DataChangeListener> registerDataChangeListener(InstanceIdentifier path,
33             DataChangeListener listener) {
34         return addRegistration(getDelegate().registerDataChangeListener(path, listener));
35     }
36
37     public CompositeNode readConfigurationData(InstanceIdentifier path) {
38         return getDelegate().readConfigurationData(path);
39     }
40
41     public CompositeNode readOperationalData(InstanceIdentifier path) {
42         return getDelegate().readOperationalData(path);
43     }
44
45     public DataModificationTransaction beginTransaction() {
46         return getDelegate().beginTransaction();
47     }
48
49     @Override
50     public void addRefresher(DataStoreIdentifier store, DataRefresher refresher) {
51         getDelegate().addRefresher(store, refresher);
52     }
53
54     @Override
55     public void addValidator(DataStoreIdentifier store, DataValidator validator) {
56         getDelegate().addValidator(store, validator);
57     }
58
59     @Override
60     public Registration registerCommitHandler(
61             InstanceIdentifier path, DataCommitHandler<InstanceIdentifier, CompositeNode> commitHandler) {
62         return addRegistration(getDelegate().registerCommitHandler(path, commitHandler));
63     }
64
65     @Override
66     public Registration registerConfigurationReader(
67             InstanceIdentifier path, DataReader<InstanceIdentifier, CompositeNode> reader) {
68         return addRegistration(getDelegate().registerConfigurationReader(path, reader));
69     }
70
71     @Override
72     public Registration registerOperationalReader(
73             InstanceIdentifier path, DataReader<InstanceIdentifier, CompositeNode> reader) {
74         return addRegistration(getDelegate().registerOperationalReader(path, reader));
75     }
76
77     @Override
78     public void removeRefresher(DataStoreIdentifier store, DataRefresher refresher) {
79         getDelegate().removeRefresher(store, refresher);
80     }
81
82     @Override
83     public void removeValidator(DataStoreIdentifier store, DataValidator validator) {
84         getDelegate().removeValidator(store, validator);
85     }
86
87     @Override
88     public ListenerRegistration<RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier, CompositeNode>>> registerCommitHandlerListener(
89             RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier, CompositeNode>> commitHandlerListener) {
90         return addRegistration(getDelegate().registerCommitHandlerListener(commitHandlerListener));
91     }
92 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.