@Override public Collection<NotificationFilterPreference> getFilterPreferences(DocumentReference user) throws NotificationException { Set<NotificationFilterPreference> filterPreferences = new HashSet<>(); try { List<NotificationFilterPreferenceProvider> providers = componentManager.getInstanceList(NotificationFilterPreferenceProvider.class); for (NotificationFilterPreferenceProvider provider : providers) { filterPreferences.addAll(provider.getFilterPreferences(user)); } return filterPreferences; } catch (ComponentLookupException e) { throw new NotificationException(String.format("Unable to fetch a list of notification preference " + "providers with user [%s].", user)); } }