@@ -395,9 +395,9 @@ private void addExtensionAttributesToCache(String identifiableId, String extensi
395
395
}
396
396
397
397
/**
398
- * Get the extensions attributes with specified extension name for all the identifiables of the collection in the cache.
398
+ * Load all the extensions attributes with specified extension name for all the identifiables of the collection in the cache.
399
399
*/
400
- public Map < String , ExtensionAttributes > getAllExtensionsAttributesByResourceTypeAndExtensionName (UUID networkUuid , int variantNum , ResourceType type , String extensionName ) {
400
+ public void loadAllExtensionsAttributesByResourceTypeAndExtensionName (UUID networkUuid , int variantNum , ResourceType type , String extensionName ) {
401
401
if (!isFullyLoadedExtension (extensionName )) {
402
402
// if collection has not yet been fully loaded we load it from the server
403
403
Map <String , ExtensionAttributes > extensionAttributesMap = delegate .getAllExtensionsAttributesByResourceTypeAndExtensionName (networkUuid , variantNum , type , extensionName );
@@ -406,13 +406,6 @@ public Map<String, ExtensionAttributes> getAllExtensionsAttributesByResourceType
406
406
extensionAttributesMap .forEach ((identifiableId , extensionAttributes ) -> addExtensionAttributesToCache (identifiableId , extensionName , extensionAttributes ));
407
407
fullyLoadedExtensionsByExtensionName .add (extensionName );
408
408
}
409
- //TODO This method is only used to load extension attributes in the collection cache when using preloading collection.
410
- // The return is never used by the client as the call to getAllExtensionsAttributesByResourceTypeAndExtensionName() is always followed
411
- // by a call to getExtensionAttributes(). The latter returns something meaningful for the client
412
- // and it's used in the identifiable.getExtension() method. The map extensionAttributesMap can't be stored in the cache to be returned
413
- // as we can't ensure synchronization with the resources map (if extensions or identifiables are updated/removed).
414
- // We should refactor this method to return void.
415
- return null ;
416
409
}
417
410
418
411
/**
@@ -454,9 +447,9 @@ private void addAllExtensionAttributesToCache(String id, Map<String, ExtensionAt
454
447
}
455
448
456
449
/**
457
- * Get all the extensions attributes for all the identifiables with specified resource type in the cache
450
+ * Load all the extensions attributes for all the identifiables with specified resource type in the cache
458
451
*/
459
- public Map < String , Map < String , ExtensionAttributes >> getAllExtensionsAttributesByResourceType (UUID networkUuid , int variantNum , ResourceType type ) {
452
+ public void loadAllExtensionsAttributesByResourceType (UUID networkUuid , int variantNum , ResourceType type ) {
460
453
if (!fullyLoadedExtensions ) {
461
454
// if collection has not yet been fully loaded we load it from the server
462
455
Map <String , Map <String , ExtensionAttributes >> extensionAttributesMap = delegate .getAllExtensionsAttributesByResourceType (networkUuid , variantNum , type );
@@ -465,13 +458,6 @@ public Map<String, Map<String, ExtensionAttributes>> getAllExtensionsAttributesB
465
458
extensionAttributesMap .forEach (this ::addAllExtensionAttributesToCache );
466
459
fullyLoadedExtensions = true ;
467
460
}
468
- //TODO This method is only used to load extension attributes in the collection cache when using preloading collection.
469
- // The return is never used by the client as the call to getAllExtensionsAttributesByResourceType() is always followed
470
- // by a call to getAllExtensionsAttributesByIdentifiableId(). The latter returns something meaningful for the client
471
- // and it's used in the identifiable.getExtensions() method. The map extensionAttributesMap can't be stored in the cache to be returned
472
- // as we can't ensure synchronization with the resources map (if extensions or identifiables are updated/removed).
473
- // We should refactor this method to return void.
474
- return null ;
475
461
}
476
462
477
463
public void removeExtensionAttributesByExtensionName (String identifiableId , String extensionName ) {
0 commit comments