@Role
public interface NotificationPreferenceManager
Modifier and Type | Method and Description |
---|---|
List<NotificationPreference> |
getAllPreferences(org.xwiki.model.reference.DocumentReference user)
Get a list of registered
NotificationPreference for the given user. |
List<NotificationPreference> |
getAllPreferences(org.xwiki.model.reference.WikiReference wiki)
Get a list of registered and/or inherited
NotificationPreference for the given wiki. |
List<NotificationPreference> |
getPreferences(org.xwiki.model.reference.DocumentReference user,
boolean isEnabled,
NotificationFormat format)
Get a list of registered
NotificationPreference for the given user. |
void |
savePreferences(List<NotificationPreference> preferences)
Save the given
NotificationPreference . |
void |
setStartDateForUser(org.xwiki.model.reference.DocumentReference user,
Date startDate)
Update the start date for every notification preference that the user has.
|
List<NotificationPreference> getAllPreferences(org.xwiki.model.reference.DocumentReference user) throws NotificationException
NotificationPreference
for the given user.user
- the user to useNotificationPreference
linked to this userNotificationException
- if an error occursList<NotificationPreference> getAllPreferences(org.xwiki.model.reference.WikiReference wiki) throws NotificationException
NotificationPreference
for the given wiki.wiki
- the wiki to useNotificationPreference
linked to this wikiNotificationException
- if an error occursList<NotificationPreference> getPreferences(org.xwiki.model.reference.DocumentReference user, boolean isEnabled, NotificationFormat format) throws NotificationException
NotificationPreference
for the given user.user
- the user to useisEnabled
- should the preference be enabled ?format
- the format of notification described in the preferenceNotificationPreference
NotificationException
- if an error occursvoid setStartDateForUser(org.xwiki.model.reference.DocumentReference user, Date startDate) throws NotificationException
user
- the user to usestartDate
- the new start dateNotificationException
- if an error occursvoid savePreferences(List<NotificationPreference> preferences) throws NotificationException
NotificationPreference
. If such notification already exists, it will
be updated.preferences
- the list of notification preference to saveNotificationException
- if error happensCopyright © 2004–2021 XWiki. All rights reserved.