[CST-7756] code refactoring

This commit is contained in:
corrado lombardi
2023-02-03 15:10:27 +01:00
parent ad6d514e0e
commit 2c2c037ce0
3 changed files with 8 additions and 4 deletions

View File

@@ -72,11 +72,15 @@ public class SubscriptionEmailNotificationServiceImpl implements SubscriptionEma
DSpaceObject dSpaceObject = subscription.getDSpaceObject();
if (dSpaceObject.getType() == COMMUNITY) {
communities.addAll(contentUpdates.get(Community.class.getSimpleName())
communities.addAll(contentUpdates.get(Community.class.getSimpleName().toLowerCase())
.findUpdates(context, dSpaceObject, frequency));
} else if (dSpaceObject.getType() == COLLECTION) {
collections.addAll(contentUpdates.get(Collection.class.getSimpleName())
collections.addAll(contentUpdates.get(Collection.class.getSimpleName().toLowerCase())
.findUpdates(context, dSpaceObject, frequency));
} else {
log.warn("found an invalid DSpace Object type ({}) among subscriptions to send",
dSpaceObject.getType());
continue;
}
var ePerson = subscription.getEPerson();