Merge "Add memory usage to integration tests [UPDATED]"
[cps.git] / cps-service / src / main / java / org / onap / cps / api / CpsModuleService.java
index b1f90d6..e8c3e77 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2020-2022 Nordix Foundation
+ *  Copyright (C) 2020-2023 Nordix Foundation
  *  Modifications Copyright (C) 2020-2021 Pantheon.tech
  *  Modifications Copyright (C) 2022 TechMahindra Ltd.
  *  ================================================================================
@@ -47,13 +47,13 @@ public interface CpsModuleService {
                          Map<String, String> yangResourcesNameToContentMap);
 
     /**
-     * Create a schema set from new modules and existing modules.
+     * Create or upgrade a schema set from new modules and existing modules or only existing modules.
      * @param dataspaceName             Dataspace name
      * @param schemaSetName             schema set name
      * @param newModuleNameToContentMap YANG resources map where key is a module name and value is content
      * @param allModuleReferences       All YANG resource module references
      */
-    void createSchemaSetFromModules(String dataspaceName, String schemaSetName,
+    void createOrUpgradeSchemaSetFromModules(String dataspaceName, String schemaSetName,
                                     Map<String, String> newModuleNameToContentMap,
                                     Collection<ModuleReference> allModuleReferences);
 
@@ -80,12 +80,20 @@ public interface CpsModuleService {
      * @param dataspaceName        dataspace name
      * @param schemaSetName        schema set name
      * @param cascadeDeleteAllowed indicates the allowance to remove associated anchors and data if exist
-     * @throws DataInUseException if cascadeDeleteAllowed is set to CASCADE_DELETE_PROHIBITED and there
-     *                           is associated anchor record exists in database
+     * @throws DataInUseException  if cascadeDeleteAllowed is set to CASCADE_DELETE_PROHIBITED and there
+     *                             is associated anchor record exists in database
      */
     void deleteSchemaSet(String dataspaceName, String schemaSetName,
                          CascadeDeleteAllowed cascadeDeleteAllowed);
 
+    /**
+     * Deletes Schema Sets with cascade.
+     *
+     * @param dataspaceName        dataspace name
+     * @param schemaSetNames       schema set names
+     */
+    void deleteSchemaSetsWithCascade(String dataspaceName, Collection<String> schemaSetNames);
+
     /**
      * Retrieve module references for the given dataspace name.
      *