Update to MD-SAL APIs
[controller.git] / opendaylight / md-sal / sal-dom-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.md.sal.common.api.data.DataProvisionService;
11 import org.opendaylight.controller.sal.common.DataStoreIdentifier;
12 import org.opendaylight.controller.sal.core.api.Provider;
13 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
14 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
15
16 public interface DataProviderService extends 
17     DataBrokerService, //
18     DataProvisionService<InstanceIdentifier, CompositeNode>
19     {
20
21     /**
22      * Adds {@link DataValidator} for specified Data Store
23      * 
24      * @param store
25      *            Data Store
26      * @param validator
27      *            Validator
28      */
29     public void addValidator(DataStoreIdentifier store, DataValidator validator);
30
31     /**
32      * Removes {@link DataValidator} from specified Data Store
33      * 
34      * @param store
35      * @param validator
36      *            Validator
37      */
38     public void removeValidator(DataStoreIdentifier store,
39             DataValidator validator);
40
41     /**
42      * Adds {@link DataRefresher} for specified data store
43      * 
44      * @param store
45      * @param refresher
46      */
47     void addRefresher(DataStoreIdentifier store, DataRefresher refresher);
48
49     /**
50      * Removes {@link DataRefresher} from specified data store
51      * 
52      * @param store
53      * @param refresher
54      */
55     void removeRefresher(DataStoreIdentifier store, DataRefresher refresher);
56
57     public interface DataRefresher extends Provider.ProviderFunctionality {
58
59         /**
60          * Fired when some component explicitly requested the data refresh.
61          * 
62          * The provider which exposed the {@link DataRefresher} should republish
63          * its provided data by editing the data in all affected data stores.
64          */
65         void refreshData();
66     }
67 }