Class UserNotificationBuilder
- 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<Task>
-
- org.silverpeas.core.workflow.engine.notification.UserNotificationBuilder
-
- All Implemented Interfaces:
UserNotificationBuilder
,FallbackToCoreTemplatePathBehavior
public class UserNotificationBuilder extends AbstractTemplateUserNotificationBuilder<Task> implements FallbackToCoreTemplatePathBehavior
- Author:
- Nicolas Eysseric
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder
AbstractTemplateUserNotificationBuilder.NotificationTemporal
-
-
Field Summary
-
Fields inherited from class org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder
CUSTOM_NOTIFICATION_SUBJECT, DEFAULT_NOTIFICATION_SUBJECT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NotifAction
getAction()
Gets the type of action on the resource concerned by the notification if any.protected String
getComponentInstanceId()
Gets the component instance identifier.protected String
getContributionAccessLinkLabelBundleKey()
Gets the string bundle key for contribution access linkprotected String
getLocalizationBundlePath()
Gets the path of the localization bundle to load.protected String
getSender()
Gets the sender (the user identifier usually)protected String
getTemplateFileName()
Gets the fileName of StringTemplateprotected String
getTemplatePath()
Gets the string template pathprotected Collection<String>
getUserIdsToNotify()
A collection of user identifiers.protected void
performNotificationResource(String language, Task task, NotificationResourceData notificationResourceData)
Builds the notification resource data container from a given language.protected void
performTemplateData(String language, Task task, SilverpeasTemplate template)
-
Methods inherited from class org.silverpeas.core.notification.user.builder.AbstractTemplateUserNotificationBuilder
createNotification, getBundleSubjectKey, getTitle, getTitle, perform, performBuild, performNotificationResource, performNotificationResource
-
Methods inherited from class org.silverpeas.core.notification.user.builder.AbstractResourceUserNotificationBuilder
getResource, getResourceURL, initialize, initializeNotificationResourceData, isGroupCanBeNotified, isSendImmediately, isUserCanBeNotified, performBuild, setResource
-
Methods inherited from class org.silverpeas.core.notification.user.builder.AbstractUserNotificationBuilder
build, getBundle, getBundle, getContent, getExternalAddressesToNotify, getGroupIdsToNotify, getMessageType, getNotificationMetaData, getUserIdsToExcludeFromNotifying, stop, stopWhenNoUserToNotify
-
-
-
-
Method Detail
-
performTemplateData
protected void performTemplateData(String language, Task task, SilverpeasTemplate template)
- Specified by:
performTemplateData
in classAbstractTemplateUserNotificationBuilder<Task>
-
performNotificationResource
protected void performNotificationResource(String language, Task task, 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 classAbstractTemplateUserNotificationBuilder<Task>
- Parameters:
language
- the language in ISO-639-2task
- the resource concerned by the notificationnotificationResourceData
- data about the notification
-
getTemplatePath
protected String getTemplatePath()
Description copied from class:AbstractTemplateUserNotificationBuilder
Gets the string template path- Specified by:
getTemplatePath
in classAbstractTemplateUserNotificationBuilder<Task>
- Returns:
- the StringTemplate file path
-
getTemplateFileName
protected String getTemplateFileName()
Description copied from class:AbstractTemplateUserNotificationBuilder
Gets the fileName of StringTemplate- Specified by:
getTemplateFileName
in classAbstractTemplateUserNotificationBuilder<Task>
- Returns:
- the StringTemplate filename
-
getComponentInstanceId
protected String getComponentInstanceId()
Description copied from class:AbstractUserNotificationBuilder
Gets the component instance identifier.- Specified by:
getComponentInstanceId
in classAbstractUserNotificationBuilder
- Returns:
- the unique identifier of the component instance concerned by the notification to build.
-
getSender
protected String getSender()
Description copied from class:AbstractUserNotificationBuilder
Gets the sender (the user identifier usually)- Specified by:
getSender
in classAbstractUserNotificationBuilder
- Returns:
- the unique identifier of the sender.
-
getUserIdsToNotify
protected Collection<String> getUserIdsToNotify()
Description copied from class:AbstractUserNotificationBuilder
A collection of user identifiers. All the users in this collection will be notified. This method requires to be implemented.- Specified by:
getUserIdsToNotify
in classAbstractUserNotificationBuilder
- Returns:
-
getLocalizationBundlePath
protected String getLocalizationBundlePath()
Description copied from class:AbstractUserNotificationBuilder
Gets the path of the localization bundle to load. By default, returns the general translations. For more specific localized text to use in the notification, override this method.- Overrides:
getLocalizationBundlePath
in classAbstractUserNotificationBuilder
- Returns:
- the path of the localization bundle.
-
getContributionAccessLinkLabelBundleKey
protected String getContributionAccessLinkLabelBundleKey()
Description copied from class:AbstractTemplateUserNotificationBuilder
Gets the string bundle key for contribution access link- Overrides:
getContributionAccessLinkLabelBundleKey
in classAbstractTemplateUserNotificationBuilder<Task>
- Returns:
- the string bundle key.
-
getAction
protected NotifAction getAction()
Description copied from class:AbstractUserNotificationBuilder
Gets the type of action on the resource concerned by the notification if any.- Specified by:
getAction
in classAbstractUserNotificationBuilder
- Returns:
- a value of the
NotifAction
enumeration.
-
-