com.silverpeas.webpages.notification
Class WebPagesUserNotifier

java.lang.Object
  extended by com.silverpeas.notification.builder.AbstractUserNotificationBuilder
      extended by com.silverpeas.notification.builder.AbstractResourceUserNotificationBuilder<T>
          extended by com.silverpeas.notification.builder.AbstractTemplateUserNotificationBuilder<com.stratelia.webactiv.util.node.model.NodePK>
              extended by com.silverpeas.webpages.notification.WebPagesUserNotifier
All Implemented Interfaces:
com.silverpeas.notification.builder.UserNotificationBuilder, com.silverpeas.notification.builder.UserSubscriptionNotificationBehavior

public class WebPagesUserNotifier
extends com.silverpeas.notification.builder.AbstractTemplateUserNotificationBuilder<com.stratelia.webactiv.util.node.model.NodePK>
implements com.silverpeas.notification.builder.UserSubscriptionNotificationBehavior

Author:
Yohann Chastagnier

Field Summary
 
Fields inherited from interface com.silverpeas.notification.builder.UserSubscriptionNotificationBehavior
SKIP_SUBSCRIPTION_NOTIFICATION_SENDING_HTTP_PARAM
 
Constructor Summary
WebPagesUserNotifier(com.stratelia.webactiv.util.node.model.NodePK resource, String userId)
          Default constructor
 
Method Summary
protected  com.stratelia.silverpeas.notificationManager.constant.NotifAction getAction()
           
protected  String getBundleSubjectKey()
           
protected  String getComponentInstanceId()
           
protected  String getContributionAccessLinkLabelBundleKey()
           
protected  Collection<String> getGroupIdsToNotify()
           
protected  String getMultilangPropertyFile()
           
protected  String getResourceURL(com.stratelia.webactiv.util.node.model.NodePK resource)
           
protected  String getSender()
           
protected  String getTemplatePath()
           
protected  Collection<String> getUserIdsToNotify()
           
protected  void initialize()
           
static void notify(com.stratelia.webactiv.util.node.model.NodePK resource, String userId)
          Builds and sends a webpages notification.
protected  void performNotificationResource(String language, com.stratelia.webactiv.util.node.model.NodePK resource, com.silverpeas.notification.model.NotificationResourceData notificationResourceData)
           
protected  void performTemplateData(String language, com.stratelia.webactiv.util.node.model.NodePK resource, com.silverpeas.util.template.SilverpeasTemplate template)
           
 
Methods inherited from class com.silverpeas.notification.builder.AbstractTemplateUserNotificationBuilder
createNotification, createTemplate, getFileName, getTitle, perform, performBuild, performNotificationResource, performNotificationResource
 
Methods inherited from class com.silverpeas.notification.builder.AbstractResourceUserNotificationBuilder
getResource, initializeNotificationResourceData, isSendImmediatly, performBuild, setResource
 
Methods inherited from class com.silverpeas.notification.builder.AbstractUserNotificationBuilder
build, getBundle, getBundle, getContent, getExternalAddressesToNotify, getMessageType, getNotificationMetaData, getUserIdsToExcludeFromNotifying, performUsersToBeNotified, stop, stopWhenNoUserToNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebPagesUserNotifier

public WebPagesUserNotifier(com.stratelia.webactiv.util.node.model.NodePK resource,
                            String userId)
Default constructor

Parameters:
resource -
Method Detail

notify

public static void notify(com.stratelia.webactiv.util.node.model.NodePK resource,
                          String userId)
Builds and sends a webpages notification. A warning message is logged when an exception is catched.

Parameters:
resource -
userId -

initialize

protected void initialize()
Overrides:
initialize in class com.silverpeas.notification.builder.AbstractResourceUserNotificationBuilder<com.stratelia.webactiv.util.node.model.NodePK>

performTemplateData

protected void performTemplateData(String language,
                                   com.stratelia.webactiv.util.node.model.NodePK resource,
                                   com.silverpeas.util.template.SilverpeasTemplate template)
Specified by:
performTemplateData in class com.silverpeas.notification.builder.AbstractTemplateUserNotificationBuilder<com.stratelia.webactiv.util.node.model.NodePK>

performNotificationResource

protected void performNotificationResource(String language,
                                           com.stratelia.webactiv.util.node.model.NodePK resource,
                                           com.silverpeas.notification.model.NotificationResourceData notificationResourceData)
Specified by:
performNotificationResource in class com.silverpeas.notification.builder.AbstractTemplateUserNotificationBuilder<com.stratelia.webactiv.util.node.model.NodePK>

getResourceURL

protected String getResourceURL(com.stratelia.webactiv.util.node.model.NodePK resource)
Overrides:
getResourceURL in class com.silverpeas.notification.builder.AbstractResourceUserNotificationBuilder<com.stratelia.webactiv.util.node.model.NodePK>

getAction

protected com.stratelia.silverpeas.notificationManager.constant.NotifAction getAction()
Specified by:
getAction in class com.silverpeas.notification.builder.AbstractUserNotificationBuilder

getMultilangPropertyFile

protected String getMultilangPropertyFile()
Overrides:
getMultilangPropertyFile in class com.silverpeas.notification.builder.AbstractUserNotificationBuilder

getBundleSubjectKey

protected String getBundleSubjectKey()
Specified by:
getBundleSubjectKey in class com.silverpeas.notification.builder.AbstractTemplateUserNotificationBuilder<com.stratelia.webactiv.util.node.model.NodePK>

getTemplatePath

protected String getTemplatePath()
Specified by:
getTemplatePath in class com.silverpeas.notification.builder.AbstractTemplateUserNotificationBuilder<com.stratelia.webactiv.util.node.model.NodePK>

getComponentInstanceId

protected String getComponentInstanceId()
Specified by:
getComponentInstanceId in class com.silverpeas.notification.builder.AbstractUserNotificationBuilder

getSender

protected String getSender()
Specified by:
getSender in class com.silverpeas.notification.builder.AbstractUserNotificationBuilder

getUserIdsToNotify

protected Collection<String> getUserIdsToNotify()
Specified by:
getUserIdsToNotify in class com.silverpeas.notification.builder.AbstractUserNotificationBuilder

getGroupIdsToNotify

protected Collection<String> getGroupIdsToNotify()
Overrides:
getGroupIdsToNotify in class com.silverpeas.notification.builder.AbstractUserNotificationBuilder

getContributionAccessLinkLabelBundleKey

protected String getContributionAccessLinkLabelBundleKey()
Overrides:
getContributionAccessLinkLabelBundleKey in class com.silverpeas.notification.builder.AbstractTemplateUserNotificationBuilder<com.stratelia.webactiv.util.node.model.NodePK>


Copyright © 2016 Silverpeas. All Rights Reserved.