Initial opendaylight infrastructure commit!!
[controller.git] / opendaylight / sal / yang-prototype / sal / sal-core-api / src / main / java / org / opendaylight / controller / sal / core / api / data / DataProviderService.java
1 /*\r
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.controller.sal.core.api.data;\r
9 \r
10 import org.opendaylight.controller.sal.common.DataStoreIdentifier;\r
11 import org.opendaylight.controller.sal.core.api.Provider;\r
12 \r
13 public interface DataProviderService extends DataBrokerService {\r
14 \r
15     /**\r
16      * Adds {@link DataValidator} for specified Data Store\r
17      * \r
18      * @param store\r
19      *            Data Store\r
20      * @param validator\r
21      *            Validator\r
22      */\r
23     public void addValidator(DataStoreIdentifier store, DataValidator validator);\r
24 \r
25     /**\r
26      * Removes {@link DataValidator} from specified Data Store\r
27      * \r
28      * @param store\r
29      * @param validator\r
30      *            Validator\r
31      */\r
32     public void removeValidator(DataStoreIdentifier store,\r
33             DataValidator validator);\r
34 \r
35     /**\r
36      * Adds {@link DataCommitHandler} for specified data store\r
37      * \r
38      * @param store\r
39      * @param provider\r
40      */\r
41     void addCommitHandler(DataStoreIdentifier store, DataCommitHandler provider);\r
42 \r
43     /**\r
44      * Removes {@link DataCommitHandler} from specified data store\r
45      * \r
46      * @param store\r
47      * @param provider\r
48      */\r
49     void removeCommitHandler(DataStoreIdentifier store,\r
50             DataCommitHandler provider);\r
51 \r
52     /**\r
53      * Adds {@link DataRefresher} for specified data store\r
54      * \r
55      * @param store\r
56      * @param refresher\r
57      */\r
58     void addRefresher(DataStoreIdentifier store, DataRefresher refresher);\r
59 \r
60     /**\r
61      * Removes {@link DataRefresher} from specified data store\r
62      * \r
63      * @param store\r
64      * @param refresher\r
65      */\r
66     void removeRefresher(DataStoreIdentifier store, DataRefresher refresher);\r
67 \r
68     public interface DataRefresher extends Provider.ProviderFunctionality {\r
69 \r
70         /**\r
71          * Fired when some component explicitly requested the data refresh.\r
72          * \r
73          * The provider which exposed the {@link DataRefresher} should republish\r
74          * its provided data by editing the data in all affected data stores.\r
75          */\r
76         void refreshData();\r
77     }\r
78 }\r