Add method to get YANG module sources for CM handle
[cps.git] / cps-service / src / main / java / org / onap / cps / api / CpsModuleService.java
index 79d6e03..5e8eb9f 100644 (file)
@@ -25,6 +25,7 @@ import java.util.Collection;
 import java.util.Map;
 import org.onap.cps.spi.CascadeDeleteAllowed;
 import org.onap.cps.spi.exceptions.DataInUseException;
+import org.onap.cps.spi.model.ModuleDefinition;
 import org.onap.cps.spi.model.ModuleReference;
 import org.onap.cps.spi.model.SchemaSet;
 
@@ -93,6 +94,15 @@ public interface CpsModuleService {
      */
     Collection<ModuleReference> getYangResourcesModuleReferences(String dataspaceName, String anchorName);
 
+    /**
+     * Retrieve module definitions for the given dataspace name and anchor name.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @return a collection of module definitions (moduleName, revision, yang resource content)
+     */
+    Collection<ModuleDefinition> getModuleDefinitionsByAnchorName(String dataspaceName, String anchorName);
+
     /**
      * Identify previously unknown Yang Resource module references.
      * The system will ignore the namespace of all module references.