Class DelayedNotificationDelegate
- java.lang.Object
-
- org.silverpeas.core.notification.user.delayed.delegate.DelayedNotificationDelegate
-
- All Implemented Interfaces:
NotificationURLProvider
public class DelayedNotificationDelegate extends Object implements NotificationURLProvider
- Author:
- Yohann Chastagnier
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DelayedNotificationDelegate()
Default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
executeDelayedNotificationsSending(Date date)
Easy call of delayed notifications processstatic void
executeForceDelayedNotificationsSending()
Easy call of delayed notifications process.static void
executeForceDelayedNotificationsSending(int userId, Set<NotifChannel> channels)
Easy call of delayed notifications process.static void
executeForceDelayedNotificationsSending(List<Integer> userIds, Set<NotifChannel> channels)
Easy call of delayed notifications process.static void
executeNewNotification(DelayedNotificationData delayedNotificationData)
Easy call of new notification processstatic void
executeUserDeleting(int userId)
Deleting all delayed notification data of a userstatic DelayedNotificationUserSetting
executeUserSettingsUpdating(int userId, NotifChannel channel, DelayedNotificationFrequency frequency)
When user settings change, if the new frequency is NONE then the delayed notifications saved have to be sentprotected void
forceDelayedNotificationsSending()
Forces the sending of all the delayed notifications saved for all usersprotected UserDetail
getUserDetail(Integer userId)
Centralizes the searches of user details with cache featureprotected void
performNewNotificationSending(DelayedNotificationData delayedNotificationData)
Handling a new notificationprotected void
sendNotification(NotificationData notificationData)
Centralizes notification sending-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.notification.user.client.NotificationURLProvider
computeURL, computeURL, getApplicationURL, getUserAutoRedirectServerURL, getUserAutoRedirectSilverpeasServerURL, getUserAutoRedirectURL, getUserAutoRedirectURL
-
-
-
-
Method Detail
-
executeUserDeleting
public static void executeUserDeleting(int userId) throws NotificationServerException
Deleting all delayed notification data of a user- Parameters:
userId
- the identifier of a user in Silverpeas.- Throws:
NotificationServerException
- if an error occurs
-
executeUserSettingsUpdating
public static DelayedNotificationUserSetting executeUserSettingsUpdating(int userId, NotifChannel channel, DelayedNotificationFrequency frequency) throws NotificationServerException
When user settings change, if the new frequency is NONE then the delayed notifications saved have to be sent- Parameters:
userId
- the unique identifier of a userchannel
- the channel through which the notifications will be sent.frequency
- the frequency of the notification sending.- Throws:
NotificationServerException
- if an error occurs
-
executeNewNotification
public static void executeNewNotification(DelayedNotificationData delayedNotificationData) throws NotificationServerException
Easy call of new notification process- Parameters:
delayedNotificationData
- the data about the notification to send.- Throws:
NotificationServerException
- if an error occurs.
-
performNewNotificationSending
protected void performNewNotificationSending(DelayedNotificationData delayedNotificationData) throws NotificationServerException
Handling a new notification- Parameters:
delayedNotificationData
- the data about the notification to send.- Throws:
NotificationServerException
- if an error occurs.
-
executeDelayedNotificationsSending
public static void executeDelayedNotificationsSending(Date date) throws NotificationServerException
Easy call of delayed notifications process- Parameters:
date
- the date at which the sending of the notification will be delayed.- Throws:
NotificationServerException
- if an error occurs
-
executeForceDelayedNotificationsSending
public static void executeForceDelayedNotificationsSending() throws NotificationServerException
Easy call of delayed notifications process. Forces the sending of all the delayed notifications saved for all users- Throws:
NotificationServerException
- if an error occurs
-
executeForceDelayedNotificationsSending
public static void executeForceDelayedNotificationsSending(int userId, Set<NotifChannel> channels) throws NotificationServerException
Easy call of delayed notifications process. Forces the sending of all the delayed notifications saved for a given user- Parameters:
userId
- the unique identifier of a user targeted by the notification.channels
- the channels through which the notifications will be sent.- Throws:
NotificationServerException
- if an error occurs
-
executeForceDelayedNotificationsSending
public static void executeForceDelayedNotificationsSending(List<Integer> userIds, Set<NotifChannel> channels) throws NotificationServerException
Easy call of delayed notifications process. Forces the sending of all the delayed notifications saved for given users and channels- Parameters:
userIds
- the identifiers of the users targeted by the notifications.channels
- the channels through which the notifications will be sent.- Throws:
NotificationServerException
- if an error occurs
-
forceDelayedNotificationsSending
protected void forceDelayedNotificationsSending() throws NotificationServerException
Forces the sending of all the delayed notifications saved for all users- Throws:
NotificationServerException
- if an error occurs
-
getUserDetail
protected UserDetail getUserDetail(Integer userId)
Centralizes the searches of user details with cache feature- Parameters:
userId
- the unique identifier of a user in Silverpeas- Returns:
- the user with the specified identifier.
-
sendNotification
protected void sendNotification(NotificationData notificationData) throws NotificationServerException
Centralizes notification sending- Parameters:
notificationData
- data about the notification to send.- Throws:
NotificationServerException
- if an error occurs.
-
-