Clean up of binding broker implementation
[controller.git] / opendaylight / sal / yang-prototype / sal / sal-core-api / src / main / java / org / opendaylight / controller / sal / core / api / data / DataProviderService.java
1 /*
2  * Copyright (c) 2013 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.core.api.data;
9
10 import org.opendaylight.controller.sal.common.DataStoreIdentifier;
11 import org.opendaylight.controller.sal.core.api.Provider;
12
13 public interface DataProviderService extends DataBrokerService {
14
15     /**
16      * Adds {@link DataValidator} for specified Data Store
17      * 
18      * @param store
19      *            Data Store
20      * @param validator
21      *            Validator
22      */
23     public void addValidator(DataStoreIdentifier store, DataValidator validator);
24
25     /**
26      * Removes {@link DataValidator} from specified Data Store
27      * 
28      * @param store
29      * @param validator
30      *            Validator
31      */
32     public void removeValidator(DataStoreIdentifier store,
33             DataValidator validator);
34
35     /**
36      * Adds {@link DataCommitHandler} for specified data store
37      * 
38      * @param store
39      * @param provider
40      */
41     void addCommitHandler(DataStoreIdentifier store, DataCommitHandler provider);
42
43     /**
44      * Removes {@link DataCommitHandler} from specified data store
45      * 
46      * @param store
47      * @param provider
48      */
49     void removeCommitHandler(DataStoreIdentifier store,
50             DataCommitHandler provider);
51
52     /**
53      * Adds {@link DataRefresher} for specified data store
54      * 
55      * @param store
56      * @param refresher
57      */
58     void addRefresher(DataStoreIdentifier store, DataRefresher refresher);
59
60     /**
61      * Removes {@link DataRefresher} from specified data store
62      * 
63      * @param store
64      * @param refresher
65      */
66     void removeRefresher(DataStoreIdentifier store, DataRefresher refresher);
67
68     public interface DataRefresher extends Provider.ProviderFunctionality {
69
70         /**
71          * Fired when some component explicitly requested the data refresh.
72          * 
73          * The provider which exposed the {@link DataRefresher} should republish
74          * its provided data by editing the data in all affected data stores.
75          */
76         void refreshData();
77     }
78 }