com.silverpeas.notification.builder
Class AbstractUserNotificationBuilder

java.lang.Object
  extended by com.silverpeas.notification.builder.AbstractUserNotificationBuilder
All Implemented Interfaces:
UserNotificationBuilder
Direct Known Subclasses:
AbstractResourceUserNotificationBuilder

public abstract class AbstractUserNotificationBuilder
extends Object
implements UserNotificationBuilder

Author:
Yohann Chastagnier

Constructor Summary
protected AbstractUserNotificationBuilder()
          Default constructor
protected AbstractUserNotificationBuilder(String title, String content)
          Default constructor
 
Method Summary
 UserNotification build()
          Builds the notification data container
protected  UserNotification createNotification()
          Create the user notification container
protected abstract  NotifAction getAction()
          Gets the type of action on a resource
protected  ResourceLocator getBundle()
          Gets the bundle
protected  ResourceLocator getBundle(String language)
          Gets the bundle
protected abstract  String getComponentInstanceId()
          Gets the component instance id
protected  String getContent()
           
protected  Collection<String> getExternalAddressesToNotify()
           
protected  Collection<String> getGroupIdsToNotify()
           
protected  NotifMessageType getMessageType()
          Gets the type of notification message
protected  String getMultilangPropertyFile()
          Gets the resource locator path
protected  NotificationMetaData getNotificationMetaData()
          Gets the notification meta data container
protected abstract  String getSender()
          Gets the sender (the user id usually)
protected  String getTitle()
           
protected  Collection<String> getUserIdsToExcludeFromNotifying()
          Collection of identifiers of users that don't have to be notified ...
protected abstract  Collection<String> getUserIdsToNotify()
           
protected  void initialize()
          Performs common initializations
protected  boolean isSendImmediatly()
          Forces the sending immediatly if true
protected abstract  void performBuild()
          Builds the notification data container
protected  void performUsersToBeNotified()
           
protected  void stop()
          Stopping the treatment
protected  boolean stopWhenNoUserToNotify()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUserNotificationBuilder

protected AbstractUserNotificationBuilder()
Default constructor


AbstractUserNotificationBuilder

protected AbstractUserNotificationBuilder(String title,
                                          String content)
Default constructor

Parameters:
title -
content -
Method Detail

initialize

protected void initialize()
Performs common initializations


createNotification

protected UserNotification createNotification()
Create the user notification container

Returns:

getAction

protected abstract NotifAction getAction()
Gets the type of action on a resource

Returns:

getComponentInstanceId

protected abstract String getComponentInstanceId()
Gets the component instance id

Returns:

getSender

protected abstract String getSender()
Gets the sender (the user id usually)

Returns:

getNotificationMetaData

protected final NotificationMetaData getNotificationMetaData()
Gets the notification meta data container

Returns:

getMessageType

protected NotifMessageType getMessageType()
Gets the type of notification message

Returns:

isSendImmediatly

protected boolean isSendImmediatly()
Forces the sending immediatly if true

Returns:

build

public final UserNotification build()
Builds the notification data container

Specified by:
build in interface UserNotificationBuilder

getUserIdsToNotify

protected abstract Collection<String> getUserIdsToNotify()

getUserIdsToExcludeFromNotifying

protected Collection<String> getUserIdsToExcludeFromNotifying()
Collection of identifiers of users that don't have to be notified ...

Returns:

getGroupIdsToNotify

protected Collection<String> getGroupIdsToNotify()

getExternalAddressesToNotify

protected Collection<String> getExternalAddressesToNotify()

performUsersToBeNotified

protected final void performUsersToBeNotified()

stopWhenNoUserToNotify

protected boolean stopWhenNoUserToNotify()

performBuild

protected abstract void performBuild()
Builds the notification data container


getMultilangPropertyFile

protected String getMultilangPropertyFile()
Gets the resource locator path

Returns:

getBundle

protected final ResourceLocator getBundle()
Gets the bundle

Returns:

getBundle

protected final ResourceLocator getBundle(String language)
Gets the bundle

Returns:

getTitle

protected String getTitle()

getContent

protected String getContent()

stop

protected void stop()
Stopping the treatment



Copyright © 2016 Silverpeas. All Rights Reserved.