public class SubscriptionSender
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
body |
protected boolean |
bulk |
protected long |
companyId |
protected long |
creatorUserId |
protected long |
currentUserId |
protected java.util.List<FileAttachment> |
fileAttachments |
protected java.lang.String |
fromAddress |
protected java.lang.String |
fromName |
protected long |
groupId |
protected boolean |
htmlFormat |
protected java.lang.String |
inReplyTo |
protected java.util.Map<java.util.Locale,java.lang.String> |
localizedBodyMap |
protected java.util.Map<java.util.Locale,java.lang.String> |
localizedSubjectMap |
protected java.lang.String |
mailId |
protected java.lang.String |
portletId |
protected java.lang.String |
replyToAddress |
protected long |
scopeGroupId |
protected ServiceContext |
serviceContext |
protected SMTPAccount |
smtpAccount |
protected java.lang.String |
subject |
protected boolean |
uniqueMailId |
| Constructor and Description |
|---|
SubscriptionSender() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFileAttachment(java.io.File file) |
void |
addFileAttachment(java.io.File file,
java.lang.String fileName) |
void |
addPersistedSubscribers(java.lang.String className,
long classPK) |
void |
addRuntimeSubscribers(java.lang.String toAddress,
java.lang.String toName) |
protected void |
deleteSubscription(Subscription subscription) |
void |
flushNotifications() |
void |
flushNotificationsAsync() |
java.lang.Object |
getContextAttribute(java.lang.String key) |
long |
getCurrentUserId() |
java.lang.String |
getMailId() |
long |
getUserId()
Deprecated.
As of 7.0.0, replaced by
getCurrentUserId() |
protected boolean |
hasPermission(Subscription subscription,
java.lang.String className,
long classPK,
User user) |
protected boolean |
hasPermission(Subscription subscription,
User user) |
protected java.lang.Boolean |
hasSubscribePermission(PermissionChecker permissionChecker,
Subscription subscription) |
void |
initialize() |
protected void |
notifyPersistedSubscriber(Subscription subscription) |
protected void |
notifyPersistedSubscriber(Subscription subscription,
java.lang.String className,
long classPK) |
protected void |
notifyRuntimeSubscriber(javax.mail.internet.InternetAddress to,
java.util.Locale locale) |
protected void |
notifySubscriber(Subscription subscription)
Deprecated.
As of 6.2.0, replaced by
notifyPersistedSubscriber(Subscription) |
protected void |
notifySubscriber(Subscription subscription,
java.lang.String inferredClassName,
long inferredClassPK)
Deprecated.
As of 7.0.0, replaced by
notifyPersistedSubscriber(Subscription) |
protected void |
processMailMessage(MailMessage mailMessage,
java.util.Locale locale) |
protected java.lang.String |
replaceContent(java.lang.String content,
java.util.Locale locale) |
protected java.lang.String |
replaceContent(java.lang.String content,
java.util.Locale locale,
boolean escape) |
protected void |
sendEmail(javax.mail.internet.InternetAddress to,
java.util.Locale locale) |
protected void |
sendEmailNotification(User user) |
protected void |
sendNotification(User user) |
protected void |
sendUserNotification(User user) |
void |
setBody(java.lang.String body) |
void |
setBulk(boolean bulk) |
void |
setClassName(java.lang.String className) |
void |
setClassPK(long classPK) |
void |
setCompanyId(long companyId) |
void |
setContextAttribute(java.lang.String key,
EscapableObject<java.lang.String> value) |
void |
setContextAttribute(java.lang.String key,
java.lang.Object value) |
void |
setContextAttribute(java.lang.String key,
java.lang.Object value,
boolean escape) |
void |
setContextAttributes(java.lang.Object... values) |
void |
setContextCreatorUserPrefix(java.lang.String contextCreatorUserPrefix) |
void |
setCreatorUserId(long creatorUserId) |
void |
setCurrentUserId(long currentUserId) |
void |
setEntryTitle(java.lang.String entryTitle) |
void |
setEntryURL(java.lang.String entryURL) |
void |
setFrom(java.lang.String fromAddress,
java.lang.String fromName) |
void |
setGroupId(long groupId) |
void |
setHtmlFormat(boolean htmlFormat) |
void |
setInReplyTo(java.lang.String inReplyTo) |
void |
setLocalizedBodyMap(java.util.Map<java.util.Locale,java.lang.String> localizedBodyMap) |
void |
setLocalizedSubjectMap(java.util.Map<java.util.Locale,java.lang.String> localizedSubjectMap) |
void |
setMailId(java.lang.String popPortletPrefix,
java.lang.Object... ids) |
void |
setNotificationClassNameId(long notificationClassNameId) |
void |
setNotificationType(int notificationType) |
void |
setPortletId(java.lang.String portletId) |
void |
setReplyToAddress(java.lang.String replyToAddress) |
void |
setScopeGroupId(long scopeGroupId) |
void |
setServiceContext(ServiceContext serviceContext) |
void |
setSMTPAccount(SMTPAccount smtpAccount) |
void |
setSubject(java.lang.String subject) |
void |
setUniqueMailId(boolean uniqueMailId) |
void |
setUserId(long userId)
Deprecated.
As of 7.0.0, replaced by
setCurrentUserId(long) |
protected java.lang.String body
protected boolean bulk
protected long companyId
protected long creatorUserId
protected long currentUserId
protected java.util.List<FileAttachment> fileAttachments
protected java.lang.String fromAddress
protected java.lang.String fromName
protected long groupId
protected boolean htmlFormat
protected java.lang.String inReplyTo
protected java.util.Map<java.util.Locale,java.lang.String> localizedBodyMap
protected java.util.Map<java.util.Locale,java.lang.String> localizedSubjectMap
protected java.lang.String mailId
protected java.lang.String portletId
protected java.lang.String replyToAddress
protected long scopeGroupId
protected ServiceContext serviceContext
protected SMTPAccount smtpAccount
protected java.lang.String subject
protected boolean uniqueMailId
public void addFileAttachment(java.io.File file)
public void addFileAttachment(java.io.File file,
java.lang.String fileName)
public void addPersistedSubscribers(java.lang.String className,
long classPK)
public void addRuntimeSubscribers(java.lang.String toAddress,
java.lang.String toName)
public void flushNotifications()
throws java.lang.Exception
java.lang.Exceptionpublic void flushNotificationsAsync()
public java.lang.Object getContextAttribute(java.lang.String key)
public long getCurrentUserId()
public java.lang.String getMailId()
@Deprecated public long getUserId()
getCurrentUserId()public void initialize()
throws java.lang.Exception
java.lang.Exceptionpublic void setBody(java.lang.String body)
public void setBulk(boolean bulk)
public void setClassName(java.lang.String className)
public void setClassPK(long classPK)
public void setCompanyId(long companyId)
public void setContextAttribute(java.lang.String key,
EscapableObject<java.lang.String> value)
public void setContextAttribute(java.lang.String key,
java.lang.Object value)
public void setContextAttribute(java.lang.String key,
java.lang.Object value,
boolean escape)
public void setContextAttributes(java.lang.Object... values)
public void setContextCreatorUserPrefix(java.lang.String contextCreatorUserPrefix)
public void setCreatorUserId(long creatorUserId)
public void setCurrentUserId(long currentUserId)
public void setEntryTitle(java.lang.String entryTitle)
public void setEntryURL(java.lang.String entryURL)
public void setFrom(java.lang.String fromAddress,
java.lang.String fromName)
public void setGroupId(long groupId)
public void setHtmlFormat(boolean htmlFormat)
public void setInReplyTo(java.lang.String inReplyTo)
public void setLocalizedBodyMap(java.util.Map<java.util.Locale,java.lang.String> localizedBodyMap)
public void setLocalizedSubjectMap(java.util.Map<java.util.Locale,java.lang.String> localizedSubjectMap)
public void setMailId(java.lang.String popPortletPrefix,
java.lang.Object... ids)
public void setNotificationClassNameId(long notificationClassNameId)
public void setNotificationType(int notificationType)
UserNotificationDefinitionpublic void setPortletId(java.lang.String portletId)
public void setReplyToAddress(java.lang.String replyToAddress)
public void setScopeGroupId(long scopeGroupId)
BaseIndexer.getSiteGroupId(long)public void setServiceContext(ServiceContext serviceContext)
public void setSMTPAccount(SMTPAccount smtpAccount)
public void setSubject(java.lang.String subject)
public void setUniqueMailId(boolean uniqueMailId)
@Deprecated public void setUserId(long userId)
setCurrentUserId(long)protected void deleteSubscription(Subscription subscription) throws java.lang.Exception
java.lang.Exceptionprotected boolean hasPermission(Subscription subscription, java.lang.String className, long classPK, User user) throws java.lang.Exception
java.lang.Exceptionprotected boolean hasPermission(Subscription subscription, User user) throws java.lang.Exception
java.lang.Exceptionprotected java.lang.Boolean hasSubscribePermission(PermissionChecker permissionChecker, Subscription subscription) throws PortalException
PortalExceptionprotected void notifyPersistedSubscriber(Subscription subscription) throws java.lang.Exception
java.lang.Exceptionprotected void notifyPersistedSubscriber(Subscription subscription, java.lang.String className, long classPK) throws java.lang.Exception
java.lang.Exceptionprotected void notifyRuntimeSubscriber(javax.mail.internet.InternetAddress to,
java.util.Locale locale)
throws java.lang.Exception
java.lang.Exception@Deprecated protected void notifySubscriber(Subscription subscription) throws java.lang.Exception
notifyPersistedSubscriber(Subscription)java.lang.Exception@Deprecated protected void notifySubscriber(Subscription subscription, java.lang.String inferredClassName, long inferredClassPK) throws java.lang.Exception
notifyPersistedSubscriber(Subscription)java.lang.Exceptionprotected void processMailMessage(MailMessage mailMessage, java.util.Locale locale) throws java.lang.Exception
java.lang.Exceptionprotected java.lang.String replaceContent(java.lang.String content,
java.util.Locale locale)
throws java.lang.Exception
java.lang.Exceptionprotected java.lang.String replaceContent(java.lang.String content,
java.util.Locale locale,
boolean escape)
throws java.lang.Exception
java.lang.Exceptionprotected void sendEmail(javax.mail.internet.InternetAddress to,
java.util.Locale locale)
throws java.lang.Exception
java.lang.Exceptionprotected void sendEmailNotification(User user) throws java.lang.Exception
java.lang.Exceptionprotected void sendNotification(User user) throws java.lang.Exception
java.lang.Exceptionprotected void sendUserNotification(User user) throws java.lang.Exception
java.lang.Exception