com.silverpeas.notification.builder
Class UserSubscriptionNotificationSendingHandler

java.lang.Object
  extended by com.silverpeas.notification.builder.UserSubscriptionNotificationSendingHandler

public class UserSubscriptionNotificationSendingHandler
extends Object

This class handles the feature that permits to skip the user subscription notification sending.

Author:
Yohann Chastagnier

Constructor Summary
UserSubscriptionNotificationSendingHandler()
           
 
Method Summary
static boolean isEnabledForCurrentRequest()
          Indicates if the user subscription notification sending is enabled for the current request.
static void setupSilverpeasNotification(SilverpeasNotification silverpeasNotification)
          As treatments of asynchronous JMS notifications are executed in an other context of the user request, the indicator of the confirmation of subscription notification sending must be managed here (as this indicator is attached to the user request).
static void verifyRequest(javax.servlet.http.HttpServletRequest request)
          Verifies from a request if it is indicated that subscription notification sending must be skipped for the current request (from request parameters or request headers).
static void verifySilverpeasNotification(SilverpeasNotification silverpeasNotification)
          Verifies from a silverpeas notification if it is indicated that subscription notification sending must be skipped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserSubscriptionNotificationSendingHandler

public UserSubscriptionNotificationSendingHandler()
Method Detail

setupSilverpeasNotification

public static void setupSilverpeasNotification(SilverpeasNotification silverpeasNotification)
As treatments of asynchronous JMS notifications are executed in an other context of the user request, the indicator of the confirmation of subscription notification sending must be managed here (as this indicator is attached to the user request).

Parameters:
silverpeasNotification - the notification that will be send on JMS.

verifySilverpeasNotification

public static void verifySilverpeasNotification(SilverpeasNotification silverpeasNotification)
Verifies from a silverpeas notification if it is indicated that subscription notification sending must be skipped.

Parameters:
silverpeasNotification - the notification sent on JMS.

verifyRequest

public static void verifyRequest(javax.servlet.http.HttpServletRequest request)
Verifies from a request if it is indicated that subscription notification sending must be skipped for the current request (from request parameters or request headers).

Parameters:
request - the current HTTP request.

isEnabledForCurrentRequest

public static boolean isEnabledForCurrentRequest()
Indicates if the user subscription notification sending is enabled for the current request.

Returns:
true if enabled, false otherwise.


Copyright © 2016 Silverpeas. All Rights Reserved.