public abstract class BaseNotificationType extends java.lang.Object implements NotificationType
Modifier and Type | Field and Description |
---|---|
protected NotificationQueueEntryLocalService |
notificationQueueEntryLocalService |
protected NotificationRecipientLocalService |
notificationRecipientLocalService |
protected NotificationRecipientSettingLocalService |
notificationRecipientSettingLocalService |
protected NotificationTermEvaluatorTracker |
notificationTermEvaluatorTracker |
protected com.liferay.portal.kernel.util.Portal |
portal |
protected java.util.Locale |
siteDefaultLocale |
protected java.util.Locale |
userLocale |
protected com.liferay.portal.kernel.service.UserLocalService |
userLocalService |
Constructor and Description |
---|
BaseNotificationType() |
Modifier and Type | Method and Description |
---|---|
protected NotificationQueueEntry |
createNotificationQueueEntry(com.liferay.portal.kernel.model.User user,
java.lang.String body,
NotificationContext notificationContext,
java.lang.String subject) |
protected NotificationRecipient |
createNotificationRecipient(com.liferay.portal.kernel.model.User user,
long notificationQueueEntryId) |
java.util.List<NotificationRecipientSetting> |
createNotificationRecipientSettings(long notificationRecipientId,
java.lang.Object[] recipients,
com.liferay.portal.kernel.model.User user) |
protected java.util.List<NotificationRecipientSetting> |
createNotificationRecipientSettings(com.liferay.portal.kernel.model.User user,
long notificationRecipientId,
java.util.Map<java.lang.String,java.lang.String> notificationRecipientSettingsMap) |
protected java.lang.String |
formatContent(java.lang.String settingName,
NotificationContext notificationContext,
long notificationTemplateRecipientId) |
protected java.lang.String |
formatLocalizedContent(java.util.Map<java.util.Locale,java.lang.String> contentMap,
NotificationContext notificationContext) |
protected java.lang.String |
formatLocalizedContent(java.lang.String content,
NotificationContext notificationContext) |
java.lang.String |
getType() |
java.lang.String |
getTypeLanguageKey() |
protected void |
prepareNotificationContext(com.liferay.portal.kernel.model.User user,
java.lang.String body,
NotificationContext notificationContext,
java.lang.Object evaluatedNotificationRecipientSettings,
java.lang.String subject) |
void |
sendNotification(NotificationContext notificationContext) |
java.lang.Object[] |
toRecipients(java.util.List<NotificationRecipientSetting> notificationRecipientSettings) |
void |
validateNotificationTemplate(NotificationContext notificationContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFromName, getRecipientSummary, resendNotification, resendNotifications
protected NotificationQueueEntryLocalService notificationQueueEntryLocalService
protected NotificationRecipientLocalService notificationRecipientLocalService
protected NotificationRecipientSettingLocalService notificationRecipientSettingLocalService
protected NotificationTermEvaluatorTracker notificationTermEvaluatorTracker
protected com.liferay.portal.kernel.util.Portal portal
protected java.util.Locale siteDefaultLocale
protected java.util.Locale userLocale
protected com.liferay.portal.kernel.service.UserLocalService userLocalService
public java.util.List<NotificationRecipientSetting> createNotificationRecipientSettings(long notificationRecipientId, java.lang.Object[] recipients, com.liferay.portal.kernel.model.User user)
createNotificationRecipientSettings
in interface NotificationType
public java.lang.String getType()
getType
in interface NotificationType
public java.lang.String getTypeLanguageKey()
getTypeLanguageKey
in interface NotificationType
public void sendNotification(NotificationContext notificationContext) throws com.liferay.portal.kernel.exception.PortalException
sendNotification
in interface NotificationType
com.liferay.portal.kernel.exception.PortalException
public java.lang.Object[] toRecipients(java.util.List<NotificationRecipientSetting> notificationRecipientSettings)
toRecipients
in interface NotificationType
public void validateNotificationTemplate(NotificationContext notificationContext) throws com.liferay.portal.kernel.exception.PortalException
validateNotificationTemplate
in interface NotificationType
com.liferay.portal.kernel.exception.PortalException
protected NotificationQueueEntry createNotificationQueueEntry(com.liferay.portal.kernel.model.User user, java.lang.String body, NotificationContext notificationContext, java.lang.String subject)
protected NotificationRecipient createNotificationRecipient(com.liferay.portal.kernel.model.User user, long notificationQueueEntryId)
protected java.util.List<NotificationRecipientSetting> createNotificationRecipientSettings(com.liferay.portal.kernel.model.User user, long notificationRecipientId, java.util.Map<java.lang.String,java.lang.String> notificationRecipientSettingsMap)
protected java.lang.String formatContent(java.lang.String settingName, NotificationContext notificationContext, long notificationTemplateRecipientId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected java.lang.String formatLocalizedContent(java.util.Map<java.util.Locale,java.lang.String> contentMap, NotificationContext notificationContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected java.lang.String formatLocalizedContent(java.lang.String content, NotificationContext notificationContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void prepareNotificationContext(com.liferay.portal.kernel.model.User user, java.lang.String body, NotificationContext notificationContext, java.lang.Object evaluatedNotificationRecipientSettings, java.lang.String subject)