org.silverpeas.sharing.notification
Class FileSharingUserNotification

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<Ticket>
              extended by org.silverpeas.sharing.notification.FileSharingUserNotification
All Implemented Interfaces:
UserNotificationBuilder

public class FileSharingUserNotification
extends AbstractTemplateUserNotificationBuilder<Ticket>


Constructor Summary
FileSharingUserNotification(Ticket resource, SharingNotificationVO fileSharingParam)
           
 
Method Summary
protected  NotifAction getAction()
          Gets the type of action on a resource
protected  String getBundleSubjectKey()
           
protected  String getComponentInstanceId()
          Gets the component instance id
protected  String getContributionAccessLinkLabelBundleKey()
          Gets the string bundle key for contribution access link
protected  Collection<String> getExternalAddressesToNotify()
           
protected  String getFileName()
          Gets the fileName of StringTemplate
protected  String getMultilangPropertyFile()
          Gets the resource locator path
protected  String getResourceURL(Ticket resource)
          Gets the URL of the resource
protected  String getSender()
          Gets the sender (the user id usually)
protected  String getTemplatePath()
          Gets the string template path
protected  Collection<String> getUserIdsToNotify()
           
protected  boolean isSendImmediatly()
          Forces the sending immediatly if true
static void notify(Ticket resource, SharingNotificationVO fileSharingParam)
          Builds and sends a file sharing notification.
protected  void performNotificationResource(String language, Ticket resource, NotificationResourceData notificationResourceData)
          Builds the notification resource data container from a given language.
protected  void performTemplateData(String language, Ticket resource, SilverpeasTemplate template)
          Performing notification data from a given language
 
Methods inherited from class com.silverpeas.notification.builder.AbstractTemplateUserNotificationBuilder
createNotification, createTemplate, getTitle, perform, performBuild, performNotificationResource, performNotificationResource
 
Methods inherited from class com.silverpeas.notification.builder.AbstractResourceUserNotificationBuilder
getResource, initialize, initializeNotificationResourceData, performBuild, setResource
 
Methods inherited from class com.silverpeas.notification.builder.AbstractUserNotificationBuilder
build, getBundle, getBundle, getContent, getGroupIdsToNotify, 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

FileSharingUserNotification

public FileSharingUserNotification(Ticket resource,
                                   SharingNotificationVO fileSharingParam)
Parameters:
resource -
fileSharingParam -
Method Detail

getBundleSubjectKey

protected String getBundleSubjectKey()
Specified by:
getBundleSubjectKey in class AbstractTemplateUserNotificationBuilder<Ticket>

performTemplateData

protected void performTemplateData(String language,
                                   Ticket resource,
                                   SilverpeasTemplate template)
Description copied from class: AbstractTemplateUserNotificationBuilder
Performing notification data from a given language

Specified by:
performTemplateData in class AbstractTemplateUserNotificationBuilder<Ticket>

performNotificationResource

protected void performNotificationResource(String language,
                                           Ticket resource,
                                           NotificationResourceData notificationResourceData)
Description copied from class: AbstractTemplateUserNotificationBuilder
Builds the notification resource data container from a given language. Don't forget to fill resourceId, resourceType, resourceName, resourceDescription (optional), resourceLocation (optional). If ResourceLocation is empty , it will be filled by the NotificationManager with the given componentInstanceId of NotificationMetaData

Specified by:
performNotificationResource in class AbstractTemplateUserNotificationBuilder<Ticket>

getTemplatePath

protected String getTemplatePath()
Description copied from class: AbstractTemplateUserNotificationBuilder
Gets the string template path

Specified by:
getTemplatePath in class AbstractTemplateUserNotificationBuilder<Ticket>
Returns:

getMultilangPropertyFile

protected String getMultilangPropertyFile()
Description copied from class: AbstractUserNotificationBuilder
Gets the resource locator path

Overrides:
getMultilangPropertyFile in class AbstractUserNotificationBuilder
Returns:

getFileName

protected String getFileName()
Description copied from class: AbstractTemplateUserNotificationBuilder
Gets the fileName of StringTemplate

Overrides:
getFileName in class AbstractTemplateUserNotificationBuilder<Ticket>
Returns:

getAction

protected NotifAction getAction()
Description copied from class: AbstractUserNotificationBuilder
Gets the type of action on a resource

Specified by:
getAction in class AbstractUserNotificationBuilder
Returns:

getComponentInstanceId

protected String getComponentInstanceId()
Description copied from class: AbstractUserNotificationBuilder
Gets the component instance id

Specified by:
getComponentInstanceId in class AbstractUserNotificationBuilder
Returns:

getSender

protected String getSender()
Description copied from class: AbstractUserNotificationBuilder
Gets the sender (the user id usually)

Specified by:
getSender in class AbstractUserNotificationBuilder
Returns:

getUserIdsToNotify

protected Collection<String> getUserIdsToNotify()
Specified by:
getUserIdsToNotify in class AbstractUserNotificationBuilder

getExternalAddressesToNotify

protected Collection<String> getExternalAddressesToNotify()
Overrides:
getExternalAddressesToNotify in class AbstractUserNotificationBuilder

notify

public static void notify(Ticket resource,
                          SharingNotificationVO fileSharingParam)
Builds and sends a file sharing notification. A warning message is logged when an exception is catched.

Parameters:
resource - the ticket file sharing resource

isSendImmediatly

protected boolean isSendImmediatly()
Description copied from class: AbstractUserNotificationBuilder
Forces the sending immediatly if true

Overrides:
isSendImmediatly in class AbstractResourceUserNotificationBuilder<Ticket>
Returns:

getResourceURL

protected String getResourceURL(Ticket resource)
Description copied from class: AbstractResourceUserNotificationBuilder
Gets the URL of the resource

Overrides:
getResourceURL in class AbstractResourceUserNotificationBuilder<Ticket>
Returns:

getContributionAccessLinkLabelBundleKey

protected String getContributionAccessLinkLabelBundleKey()
Description copied from class: AbstractTemplateUserNotificationBuilder
Gets the string bundle key for contribution access link

Overrides:
getContributionAccessLinkLabelBundleKey in class AbstractTemplateUserNotificationBuilder<Ticket>
Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.