Merge "use separated get methods for every cmHandle instead of one "get all" query"
[cps.git] / cps-service / src / main / java / org / onap / cps / spi / CpsModulePersistenceService.java
index 0e90e84..db2cb60 100755 (executable)
@@ -23,6 +23,7 @@ package org.onap.cps.spi;
 
 import java.util.Collection;
 import java.util.Map;
+import org.onap.cps.spi.model.ModuleDefinition;
 import org.onap.cps.spi.model.ModuleReference;
 
 /**
@@ -89,10 +90,19 @@ public interface CpsModulePersistenceService {
      *
      * @param dataspaceName dataspace name
      * @param anchorName    anchor name
-     * @return a collection of module names and revisions
+     * @return a collection of module reference (moduleName and revision)
      */
     Collection<ModuleReference> getYangResourceModuleReferences(String dataspaceName, String anchorName);
 
+    /**
+     * Get YANG resource definitions for the given anchor name and dataspace name.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @return a collection of module definitions (moduleName, revision and yang resource content)
+     */
+    Collection<ModuleDefinition> getYangResourceDefinitions(String dataspaceName, String anchorName);
+
     /**
      * Remove unused Yang Resource Modules.
      */