@Role
public interface NotificationFilterPreferenceManager
Modifier and Type | Method and Description |
---|---|
void |
deleteFilterPreference(DocumentReference user,
String filterPreferenceId)
Delete a filter preference.
|
Stream<NotificationFilterPreference> |
getFilterPreferences(Collection<NotificationFilterPreference> filterPreferences,
NotificationFilter filter)
Get from the given filter preferences the ones that match the given filter.
|
Stream<NotificationFilterPreference> |
getFilterPreferences(Collection<NotificationFilterPreference> filterPreferences,
NotificationFilter filter,
NotificationFilterType filterType)
Get from the given filter preferences the ones that match the given filter and the given filter type.
|
Stream<NotificationFilterPreference> |
getFilterPreferences(Collection<NotificationFilterPreference> filterPreferences,
NotificationFilter filter,
NotificationFilterType filterType,
NotificationFormat format)
Get from the given filter preferences the ones that match the given filter, filter type and format.
|
Collection<NotificationFilterPreference> |
getFilterPreferences(DocumentReference user)
Get the notification filter preferences of the given user.
|
void |
saveFilterPreferences(DocumentReference user,
Set<NotificationFilterPreference> notificationFilterPreferences)
Save the given set of
NotificationFilterPreference against their respective
NotificationFilterPreferenceProvider . |
void |
setFilterPreferenceEnabled(DocumentReference user,
String filterPreferenceId,
boolean enabled)
Enable or disable a filter preference.
|
void |
setStartDateForUser(DocumentReference user,
Date startDate)
Update the start date for every filter preference that the user has.
|
Collection<NotificationFilterPreference> getFilterPreferences(DocumentReference user) throws NotificationException
user
- a reference of the userNotificationException
- if an error occursStream<NotificationFilterPreference> getFilterPreferences(Collection<NotificationFilterPreference> filterPreferences, NotificationFilter filter)
filterPreferences
- a list of filter preferencesfilter
- a notification filterStream<NotificationFilterPreference> getFilterPreferences(Collection<NotificationFilterPreference> filterPreferences, NotificationFilter filter, NotificationFilterType filterType)
filterPreferences
- a list of filter preferencesfilter
- a notification filterfilterType
- a filter typeStream<NotificationFilterPreference> getFilterPreferences(Collection<NotificationFilterPreference> filterPreferences, NotificationFilter filter, NotificationFilterType filterType, NotificationFormat format)
filterPreferences
- a list of filter preferencesfilter
- a notification filterfilterType
- a filter typeformat
- a notification formatvoid saveFilterPreferences(DocumentReference user, Set<NotificationFilterPreference> notificationFilterPreferences)
NotificationFilterPreference
against their respective
NotificationFilterPreferenceProvider
.user
- the user to usenotificationFilterPreferences
- a set of NotificationFilterPreference
to savevoid deleteFilterPreference(DocumentReference user, String filterPreferenceId) throws NotificationException
user
- the user to usefilterPreferenceId
- id of the filter preferenceNotificationException
- if an error happensvoid setFilterPreferenceEnabled(DocumentReference user, String filterPreferenceId, boolean enabled) throws NotificationException
user
- the user to usefilterPreferenceId
- id of the filter preferenceenabled
- either or not the filter preference should be enabledNotificationException
- if an error happensvoid setStartDateForUser(DocumentReference user, Date startDate) throws NotificationException
user
- the user to usestartDate
- the new start dateNotificationException
- if an error occursCopyright © 2004–2021 XWiki. All rights reserved.