diff options
author | ToineSiebelink <toine.siebelink@est.tech> | 2022-09-05 12:08:09 +0100 |
---|---|---|
committer | ToineSiebelink <toine.siebelink@est.tech> | 2022-09-05 12:51:01 +0100 |
commit | 6a1bbf295501650a6a7b8308da4d88835f122fa2 (patch) | |
tree | 9f4675a78d12d58e20f698dd53ee01c1823c73a3 /cps-service | |
parent | 4976424bb3007f14e95e42fa485a4346e88fa899 (diff) |
Performance Improvement: Fix Insert Yang Resource IDs (Schemset)
- Add robustness to handle insertion/get of empty collection
- Fix business logic to pass down ALL module references during module Sync
- Update Java doc etc to clarify ALL module references are needed (not just new)
Issue-ID: CPS-1246
Issue-ID: CPS-1126
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ic8ff4bdfef646e98ef61a6732c6d5ecb4b762e29
Diffstat (limited to 'cps-service')
3 files changed, 8 insertions, 8 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java b/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java index 5e8eb9f6cf..6b17e820c4 100644 --- a/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java +++ b/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java @@ -50,11 +50,11 @@ public interface CpsModuleService { * @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 moduleReferences List of YANG resources module references of the modules + * @param allModuleReferences All YANG resource module references */ void createSchemaSetFromModules(String dataspaceName, String schemaSetName, Map<String, String> newModuleNameToContentMap, - Collection<ModuleReference> moduleReferences); + Collection<ModuleReference> allModuleReferences); /** * Read schema set in the given dataspace. diff --git a/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java b/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java index ff725a617f..20b4a23a9b 100644 --- a/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java +++ b/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java @@ -60,10 +60,10 @@ public class CpsModuleServiceImpl implements CpsModuleService { @Override public void createSchemaSetFromModules(final String dataspaceName, final String schemaSetName, final Map<String, String> newModuleNameToContentMap, - final Collection<ModuleReference> moduleReferences) { + final Collection<ModuleReference> allModuleReferences) { CpsValidator.validateNameCharacters(dataspaceName, schemaSetName); cpsModulePersistenceService.storeSchemaSetFromModules(dataspaceName, schemaSetName, - newModuleNameToContentMap, moduleReferences); + newModuleNameToContentMap, allModuleReferences); } diff --git a/cps-service/src/main/java/org/onap/cps/spi/CpsModulePersistenceService.java b/cps-service/src/main/java/org/onap/cps/spi/CpsModulePersistenceService.java index db2cb60f34..aaf6b38af4 100755 --- a/cps-service/src/main/java/org/onap/cps/spi/CpsModulePersistenceService.java +++ b/cps-service/src/main/java/org/onap/cps/spi/CpsModulePersistenceService.java @@ -43,13 +43,13 @@ public interface CpsModulePersistenceService { /** * Stores a schema set from new modules and existing modules. * - * @param dataspaceName Dataspace name - * @param schemaSetName Schema set name + * @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 moduleReferences List of YANG resources module references + * @param allModuleReferences All YANG resources module references */ void storeSchemaSetFromModules(String dataspaceName, String schemaSetName, - Map<String, String> newModuleNameToContentMap, Collection<ModuleReference> moduleReferences); + Map<String, String> newModuleNameToContentMap, Collection<ModuleReference> allModuleReferences); /** * Deletes Schema Set. |