Package org.xwiki.notifications.filters
Interface NotificationFilterPreferenceProvider
-
@Role public interface NotificationFilterPreferenceProvider
ProvideNotificationFilterPreference
from multiple sources.- Since:
- 9.8RC1
- Version:
- $Id: f341ffd005d00d783ede53fc21863e8dcda737a2 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
deleteFilterPreference(DocumentReference user, String filterPreferenceId)
Delete a filter preference.default void
deleteFilterPreference(WikiReference wikiReference, String filterPreferenceId)
Delete a filter preference.Set<NotificationFilterPreference>
getFilterPreferences(DocumentReference user)
Get every registeredNotificationFilterPreference
for the given user.default Set<NotificationFilterPreference>
getFilterPreferences(WikiReference wikiReference)
Get every registeredNotificationFilterPreference
for the given user.void
saveFilterPreferences(DocumentReference user, Set<NotificationFilterPreference> filterPreferences)
Save a given set of filter preferences.void
setFilterPreferenceEnabled(DocumentReference user, String filterPreferenceId, boolean enabled)
Enable or disable a filter preference.default void
setFilterPreferenceEnabled(WikiReference wikiReference, String filterPreferenceId, boolean enabled)
Enable or disable a filter preference.void
setStartDateForUser(DocumentReference user, Date startDate)
Update the start date for every notification preference that the user has.
-
-
-
Method Detail
-
getFilterPreferences
Set<NotificationFilterPreference> getFilterPreferences(DocumentReference user) throws NotificationException
Get every registeredNotificationFilterPreference
for the given user.- Parameters:
user
- the user for which to retrieve the notification preferences- Returns:
- a list of notification filter preferences
- Throws:
NotificationException
- if an error happened
-
getFilterPreferences
default Set<NotificationFilterPreference> getFilterPreferences(WikiReference wikiReference) throws NotificationException
Get every registeredNotificationFilterPreference
for the given user.- Parameters:
wikiReference
- the wiki for which to retrieve the notification preferences- Returns:
- a list of notification filter preferences
- Throws:
NotificationException
- if an error happened- Since:
- 13.3RC1
-
saveFilterPreferences
void saveFilterPreferences(DocumentReference user, Set<NotificationFilterPreference> filterPreferences) throws NotificationException
Save a given set of filter preferences.- Parameters:
user
- the user for which to save the notification preferencesfilterPreferences
- theNotificationFilterPreference
to save- Throws:
NotificationException
- if an error occurred- Since:
- 10.11RC1, 10.8.3, 9.11.9
-
deleteFilterPreference
void deleteFilterPreference(DocumentReference user, String filterPreferenceId) throws NotificationException
Delete a filter preference.- Parameters:
user
- the user for which to delete the notification preferencesfilterPreferenceId
- id of the filter preference- Throws:
NotificationException
- if an error happens- Since:
- 10.11RC1, 10.8.3, 9.11.9
-
deleteFilterPreference
default void deleteFilterPreference(WikiReference wikiReference, String filterPreferenceId) throws NotificationException
Delete a filter preference.- Parameters:
wikiReference
- the wiki for which to delete the notification preferencesfilterPreferenceId
- id of the filter preference- Throws:
NotificationException
- if an error happens- Since:
- 13.3RC1
-
setFilterPreferenceEnabled
void setFilterPreferenceEnabled(DocumentReference user, String filterPreferenceId, boolean enabled) throws NotificationException
Enable or disable a filter preference.- Parameters:
user
- the user for which to save the notification preferencesfilterPreferenceId
- id of the filter preferenceenabled
- either or not the filter preference should be enabled- Throws:
NotificationException
- if an error happens- Since:
- 10.11RC1, 10.8.3, 9.11.9
-
setFilterPreferenceEnabled
default void setFilterPreferenceEnabled(WikiReference wikiReference, String filterPreferenceId, boolean enabled) throws NotificationException
Enable or disable a filter preference.- Parameters:
wikiReference
- the wiki for which to save the notification preferencesfilterPreferenceId
- id of the filter preferenceenabled
- either or not the filter preference should be enabled- Throws:
NotificationException
- if an error happens- Since:
- 13.3RC1
-
setStartDateForUser
void setStartDateForUser(DocumentReference user, Date startDate) throws NotificationException
Update the start date for every notification preference that the user has.- Parameters:
user
- the user to usestartDate
- the new start date- Throws:
NotificationException
- if an error occurs- Since:
- 10.5RC1, 10.4, 9.11.5
-
-