Merge "Add javadoc generation for yang modules in netconf subsystem"
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / data / DataBrokerService.java
index dd055aa3820d64c6ffaa084066ed0bf22c25a5d5..aa846ff78db2dd4a71ea77087978c559879ec654 100644 (file)
@@ -9,9 +9,15 @@ package org.opendaylight.controller.sal.binding.api.data;
 
 import java.util.concurrent.Future;
 
+import org.opendaylight.controller.md.sal.common.api.data.DataChangePublisher;
+import org.opendaylight.controller.md.sal.common.api.data.DataModificationTransactionFactory;
+import org.opendaylight.controller.md.sal.common.api.data.DataReader;
 import org.opendaylight.controller.sal.binding.api.BindingAwareService;
 import org.opendaylight.controller.sal.common.DataStoreIdentifier;
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.DataRoot;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
 /**
@@ -21,7 +27,11 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
  * 
  * @see DataProviderService
  */
-public interface DataBrokerService extends BindingAwareService {
+public interface DataBrokerService extends //
+        BindingAwareService, //
+        DataModificationTransactionFactory<InstanceIdentifier<? extends DataObject>, DataObject>, //
+        DataReader<InstanceIdentifier<? extends DataObject>, DataObject>, //
+        DataChangePublisher<InstanceIdentifier<? extends DataObject>, DataObject, DataChangeListener> {
 
     /**
      * Returns a data from specified Data Store.
@@ -34,6 +44,7 @@ public interface DataBrokerService extends BindingAwareService {
      *            Identifier of the store, from which will be data retrieved
      * @return data visible to the consumer
      */
+    @Deprecated
     <T extends DataRoot> T getData(DataStoreIdentifier store, Class<T> rootType);
 
     /**
@@ -56,6 +67,7 @@ public interface DataBrokerService extends BindingAwareService {
      *            Data tree filter similar to the NETCONF filter
      * @return
      */
+    @Deprecated
     <T extends DataRoot> T getData(DataStoreIdentifier store, T filter);
 
     /**
@@ -68,6 +80,7 @@ public interface DataBrokerService extends BindingAwareService {
      *            Identifier of the store, from which will be data retrieved
      * @return
      */
+    @Deprecated
     <T extends DataRoot> T getCandidateData(DataStoreIdentifier store, Class<T> rootType);
 
     /**
@@ -90,6 +103,7 @@ public interface DataBrokerService extends BindingAwareService {
      *            A filter data root
      * @return
      */
+    @Deprecated
     <T extends DataRoot> T getCandidateData(DataStoreIdentifier store, T filter);
 
     /**
@@ -104,6 +118,7 @@ public interface DataBrokerService extends BindingAwareService {
      * @return Result object containing the modified data tree if the operation
      *         was successful, otherwise list of the encountered errors.
      */
+    @Deprecated
     RpcResult<DataRoot> editCandidateData(DataStoreIdentifier store, DataRoot changeSet);
 
     /**
@@ -130,5 +145,52 @@ public interface DataBrokerService extends BindingAwareService {
      * @return Result of the commit, containing success information or list of
      *         encountered errors, if commit was not successful.
      */
+    @Deprecated
     Future<RpcResult<Void>> commit(DataStoreIdentifier store);
+
+    @Deprecated
+    DataObject getData(InstanceIdentifier<? extends DataObject> data);
+
+    @Deprecated
+    DataObject getConfigurationData(InstanceIdentifier<?> data);
+    /**
+     * Creates a data modification transaction.
+     * 
+     * @return new blank data modification transaction.
+     */
+    DataModificationTransaction beginTransaction();
+
+    @Deprecated
+    public void registerChangeListener(InstanceIdentifier<? extends DataObject> path, DataChangeListener changeListener);
+
+    @Deprecated
+    public void unregisterChangeListener(InstanceIdentifier<? extends DataObject> path, DataChangeListener changeListener);
+
+    /**
+     * Reads data subtree from configurational store. 
+     * (Store which is populated by consumer, which is usually used to 
+     * inject state into providers. E.g. Flow configuration)-
+     * 
+     */
+    @Override
+    public DataObject readConfigurationData(InstanceIdentifier<? extends DataObject> path);
+    
+    /**
+     * Reads data subtree from operational store. 
+     * (Store which is populated by providers, which is usually used to 
+     * capture state of providers. E.g. Topology)
+     * 
+     */
+    @Override
+    public DataObject readOperationalData(InstanceIdentifier<? extends DataObject> path);
+    
+    /**
+     * Register a data change listener for particular subtree. 
+     * 
+     * Callback is invoked each time data in subtree changes.
+     * 
+     */
+    @Override
+    public ListenerRegistration<DataChangeListener> registerDataChangeListener(
+            InstanceIdentifier<? extends DataObject> path, DataChangeListener listener);
 }