Initial opendaylight infrastructure commit!!
[controller.git] / opendaylight / sal / yang-prototype / sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / DataProviderService.java
diff --git a/opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/DataProviderService.java b/opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/DataProviderService.java
new file mode 100644 (file)
index 0000000..e4e7be5
--- /dev/null
@@ -0,0 +1,85 @@
+/*\r
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
+package org.opendaylight.controller.sal.binding.api;\r
+\r
+import org.opendaylight.controller.sal.common.DataStoreIdentifier;\r
+\r
+public interface DataProviderService extends DataBrokerService {\r
+\r
+    /**\r
+     * Adds {@link DataValidator} for specified Data Store\r
+     * \r
+     * @param store\r
+     *            Data Store\r
+     * @param validator\r
+     *            Validator\r
+     */\r
+    public void addValidator(DataStoreIdentifier store, DataValidator validator);\r
+\r
+    /**\r
+     * Removes {@link DataValidator} from specified Data Store\r
+     * \r
+     * @param store\r
+     * @param validator\r
+     *            Validator\r
+     */\r
+    public void removeValidator(DataStoreIdentifier store,\r
+            DataValidator validator);\r
+\r
+    /**\r
+     * Adds {@link DataCommitHandler} for specified data store\r
+     * \r
+     * @param store\r
+     * @param provider\r
+     */\r
+    void addCommitHandler(DataStoreIdentifier store, DataCommitHandler provider);\r
+\r
+    /**\r
+     * Removes {@link DataCommitHandler} from specified data store\r
+     * \r
+     * @param store\r
+     * @param provider\r
+     */\r
+    void removeCommitHandler(DataStoreIdentifier store,\r
+            DataCommitHandler provider);\r
+\r
+    /**\r
+     * Adds {@link DataRefresher} for specified data store\r
+     * \r
+     * @param store\r
+     * @param refresher\r
+     */\r
+    void addRefresher(DataStoreIdentifier store, DataRefresher refresher);\r
+\r
+    /**\r
+     * Removes {@link DataRefresher} from specified data store\r
+     * \r
+     * @param store\r
+     * @param refresher\r
+     */\r
+    void removeRefresher(DataStoreIdentifier store, DataRefresher refresher);\r
+\r
+    /**\r
+     * Trigger for refreshing of the data exposed by the {@link Provider}\r
+     * \r
+\r
+     * \r
+     */\r
+    public interface DataRefresher extends\r
+            BindingAwareProvider.ProviderFunctionality {\r
+\r
+        /**\r
+         * Fired when some component explicitly requested the data refresh.\r
+         * \r
+         * The provider which exposed the {@link DataRefresher} should republish\r
+         * its provided data by editing the data in all affected data stores.\r
+         */\r
+        void refreshData();\r
+    }\r
+\r
+}\r