com.stratelia.webactiv.agenda.notification
Class AgendaUserNotification

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<JournalHeader>
              extended by com.stratelia.webactiv.agenda.notification.AgendaUserNotification
All Implemented Interfaces:
UserNotificationBuilder

public class AgendaUserNotification
extends AbstractTemplateUserNotificationBuilder<JournalHeader>

User notification from "My Diary" application.

Author:
Yohann Chastagnier

Constructor Summary
AgendaUserNotification(NotifAction action, UserDetail sender, JournalHeader resource)
          Notification from delegator
AgendaUserNotification(UserDetail sender, JournalHeader resource, String attend)
          Notification from attendee
 
Method Summary
protected  NotifAction getAction()
          Gets the type of action on a resource
protected  String getBundleSubjectKey()
           
protected  SilverpeasCalendar getCalendarBm()
           
protected  String getComponentInstanceId()
          Gets the component instance id
protected  String getContributionAccessLinkLabelBundleKey()
          Gets the string bundle key for contribution access link
protected  String getFileName()
          Gets the fileName of StringTemplate
protected  String getMultilangPropertyFile()
          Gets the resource locator path
protected  String getResourceURL(JournalHeader 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  void initialize()
          Performs common initializations from a given resource
protected  boolean isSendImmediatly()
          Forces the sending immediatly if true
protected  void performNotificationResource(String language, JournalHeader resource, NotificationResourceData notificationResourceData)
          Builds the notification resource data container from a given language.
protected  void performTemplateData(String language, JournalHeader 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, initializeNotificationResourceData, performBuild, setResource
 
Methods inherited from class com.silverpeas.notification.builder.AbstractUserNotificationBuilder
build, getBundle, getBundle, getContent, getExternalAddressesToNotify, 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

AgendaUserNotification

public AgendaUserNotification(NotifAction action,
                              UserDetail sender,
                              JournalHeader resource)
Notification from delegator

Parameters:
action -
sender -
resource -

AgendaUserNotification

public AgendaUserNotification(UserDetail sender,
                              JournalHeader resource,
                              String attend)
Notification from attendee

Parameters:
sender -
resource -
attend -
Method Detail

initialize

protected void initialize()
Description copied from class: AbstractResourceUserNotificationBuilder
Performs common initializations from a given resource

Overrides:
initialize in class AbstractResourceUserNotificationBuilder<JournalHeader>

getBundleSubjectKey

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

getFileName

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

Overrides:
getFileName in class AbstractTemplateUserNotificationBuilder<JournalHeader>
Returns:

getUserIdsToNotify

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

performTemplateData

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

Specified by:
performTemplateData in class AbstractTemplateUserNotificationBuilder<JournalHeader>

performNotificationResource

protected void performNotificationResource(String language,
                                           JournalHeader 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<JournalHeader>

getResourceURL

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

Overrides:
getResourceURL in class AbstractResourceUserNotificationBuilder<JournalHeader>
Returns:

getTemplatePath

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

Specified by:
getTemplatePath in class AbstractTemplateUserNotificationBuilder<JournalHeader>
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:

getMultilangPropertyFile

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

Overrides:
getMultilangPropertyFile in class AbstractUserNotificationBuilder
Returns:

isSendImmediatly

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

Overrides:
isSendImmediatly in class AbstractResourceUserNotificationBuilder<JournalHeader>
Returns:

getCalendarBm

protected SilverpeasCalendar getCalendarBm()
Returns:
the calendarBm

getContributionAccessLinkLabelBundleKey

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

Overrides:
getContributionAccessLinkLabelBundleKey in class AbstractTemplateUserNotificationBuilder<JournalHeader>
Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.