Package org.silverpeas.components.webpages.notification

## Class WebPagesUserNotifier

- java.lang.Object
- - org.silverpeas.core.notification.user.builder.AbstractUserNotificationBuilder
  - - org.silverpeas.core.notification.user.builder.AbstractResourceUserNotificationBuilder<T>
    - - org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder<org.silverpeas.core.node.model.NodePK>
      - - org.silverpeas.components.webpages.notification.WebPagesUserNotifier

- All Implemented Interfaces:
    `org.silverpeas.core.notification.user.builder.UserNotificationBuilder`, `org.silverpeas.core.notification.user.RemoveSenderRecipientBehavior`, `org.silverpeas.core.notification.user.UserSubscriptionNotificationBehavior`

      public class WebPagesUserNotifier
      extends org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder<org.silverpeas.core.node.model.NodePK>
      implements org.silverpeas.core.notification.user.UserSubscriptionNotificationBehavior

  Author:
    Yohann Chastagnier

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder

      `org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder.NotificationTemporal`

  - ### Field Summary

    - ### Fields inherited from class org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder

      `CUSTOM_NOTIFICATION_SUBJECT, DEFAULT_NOTIFICATION_SUBJECT`

    - ### Fields inherited from interface org.silverpeas.core.notification.user.UserSubscriptionNotificationBehavior

      `SUBSCRIPTION_NOTIFICATION_SENDING_CONFIRMATION_HTTP_PARAM`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `WebPagesUserNotifier​(org.silverpeas.core.node.model.NodePK resource, String userId)` | Default constructor

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected org.silverpeas.core.notification.user.client.constant.NotifAction` | `getAction()` |
    `protected String` | `getBundleSubjectKey()` |
    `protected String` | `getComponentInstanceId()` |
    `protected String` | `getContributionAccessLinkLabelBundleKey()` |
    `protected Collection<String>` | `getGroupIdsToNotify()` |
    `protected String` | `getLocalizationBundlePath()` |
    `protected String` | `getResourceURL​(org.silverpeas.core.node.model.NodePK resource)` |
    `protected String` | `getSender()` |
    `protected String` | `getTemplateFileName()` |
    `protected String` | `getTemplatePath()` |
    `protected Collection<String>` | `getUserIdsToNotify()` |
    `protected void` | `initialize()` |
    `static void` | `notify​(org.silverpeas.core.node.model.NodePK resource, String userId)` | Builds and sends a webpages notification.
    `protected void` | `performNotificationResource​(String language, org.silverpeas.core.node.model.NodePK resource, org.silverpeas.core.notification.user.model.NotificationResourceData notificationResourceData)` |
    `protected void` | `performTemplateData​(String language, org.silverpeas.core.node.model.NodePK resource, org.silverpeas.core.template.SilverpeasTemplate template)` |

    - ### Methods inherited from class org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder

      `createNotification, getTitle, getTitle, perform, performBuild, performNotificationResource, performNotificationResource`

    - ### Methods inherited from class org.silverpeas.core.notification.user.builder.AbstractResourceUserNotificationBuilder

      `getResource, initializeNotificationResourceData, isGroupCanBeNotified, isSendImmediately, isUserCanBeNotified, performBuild, setResource`

    - ### Methods inherited from class org.silverpeas.core.notification.user.builder.AbstractUserNotificationBuilder

      `build, getBundle, getBundle, getContent, getExternalAddressesToNotify, getMessageType, getNotificationMetaData, getUserIdsToExcludeFromNotifying, 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​(org.silverpeas.core.node.model.NodePK resource,
                                      String userId)

      Default constructor
      Parameters:
        `resource` -

  - ### Method Detail

    - #### notify

          public static void notify​(org.silverpeas.core.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 `org.silverpeas.core.notification.user.builder.AbstractResourceUserNotificationBuilder<org.silverpeas.core.node.model.NodePK>`

    - #### getAction

          protected org.silverpeas.core.notification.user.client.constant.NotifAction getAction()

      Specified by:
        `getAction` in class `org.silverpeas.core.notification.user.builder.AbstractUserNotificationBuilder`

    - #### getBundleSubjectKey

          protected String getBundleSubjectKey()

      Overrides:
        `getBundleSubjectKey` in class `org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder<org.silverpeas.core.node.model.NodePK>`

    - #### getTemplateFileName

          protected String getTemplateFileName()

      Specified by:
        `getTemplateFileName` in class `org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder<org.silverpeas.core.node.model.NodePK>`

    - #### getUserIdsToNotify

          protected Collection<String> getUserIdsToNotify()

      Specified by:
        `getUserIdsToNotify` in class `org.silverpeas.core.notification.user.builder.AbstractUserNotificationBuilder`

    - #### getGroupIdsToNotify

          protected Collection<String> getGroupIdsToNotify()

      Overrides:
        `getGroupIdsToNotify` in class `org.silverpeas.core.notification.user.builder.AbstractUserNotificationBuilder`

    - #### performTemplateData

          protected void performTemplateData​(String language,
                                             org.silverpeas.core.node.model.NodePK resource,
                                             org.silverpeas.core.template.SilverpeasTemplate template)

      Specified by:
        `performTemplateData` in class `org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder<org.silverpeas.core.node.model.NodePK>`

    - #### performNotificationResource

          protected void performNotificationResource​(String language,
                                                     org.silverpeas.core.node.model.NodePK resource,
                                                     org.silverpeas.core.notification.user.model.NotificationResourceData notificationResourceData)

      Specified by:
        `performNotificationResource` in class `org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder<org.silverpeas.core.node.model.NodePK>`

    - #### getResourceURL

          protected String getResourceURL​(org.silverpeas.core.node.model.NodePK resource)

      Overrides:
        `getResourceURL` in class `org.silverpeas.core.notification.user.builder.AbstractResourceUserNotificationBuilder<org.silverpeas.core.node.model.NodePK>`

    - #### getSender

          protected String getSender()

      Specified by:
        `getSender` in class `org.silverpeas.core.notification.user.builder.AbstractUserNotificationBuilder`

    - #### getLocalizationBundlePath

          protected String getLocalizationBundlePath()

      Overrides:
        `getLocalizationBundlePath` in class `org.silverpeas.core.notification.user.builder.AbstractUserNotificationBuilder`

    - #### getTemplatePath

          protected String getTemplatePath()

      Specified by:
        `getTemplatePath` in class `org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder<org.silverpeas.core.node.model.NodePK>`

    - #### getComponentInstanceId

          protected String getComponentInstanceId()

      Specified by:
        `getComponentInstanceId` in class `org.silverpeas.core.notification.user.builder.AbstractUserNotificationBuilder`

    - #### getContributionAccessLinkLabelBundleKey

          protected String getContributionAccessLinkLabelBundleKey()

      Overrides:
        `getContributionAccessLinkLabelBundleKey` in class `org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder<org.silverpeas.core.node.model.NodePK>`