Migrate bundles' configuration mgmt to ConfigurationService
[controller.git] / opendaylight / configuration / api / src / main / java / org / opendaylight / controller / configuration / IConfigurationServiceCommon.java
index 05eed6f23f78bc807becfac9bf98f7abc43bb719..bbc9ee1ee815f1e57660f7edc080987c116fa46d 100644 (file)
@@ -9,6 +9,9 @@
 
 package org.opendaylight.controller.configuration;
 
+import java.util.List;
+
+import org.opendaylight.controller.sal.utils.IObjectReader;
 import org.opendaylight.controller.sal.utils.Status;
 
 /**
@@ -27,4 +30,32 @@ public interface IConfigurationServiceCommon {
      * @return the Status object representing the result of the saving request
      */
     Status saveConfigurations();
+
+    /**
+     * Bundle will call this function to ask Configuration Manager to persist
+     * their configurations. It is up to the Configuration Manager to decide
+     * how the configuration will be persisted
+     *
+     * @param config
+     *            The bundle configuration as a collection of
+     *            ConfigurationObject
+     * @param storeName
+     *            The identifier for this configuration
+     * @return The Status of the operation
+     */
+    Status persistConfiguration(List<ConfigurationObject> config, String storeName);
+
+    /**
+     * Bundle will call this function to ask Configuration Manager to retrieve
+     * the configuration identified by the passed store name
+     *
+     * @param reader
+     *            The reader object for parsing the configuration provided by
+     *            the caller
+     * @param storeName
+     *            The identifier for the configuration
+     * @return The retrieved configuration as a collection of
+     *         ConfigurationObject
+     */
+    List<ConfigurationObject> retrieveConfiguration(IObjectReader reader, String storeName);
 }