Liferay 6.1.2-ce-ga3

com.liferay.portal.util
Class SubscriptionSender

java.lang.Object
  extended by com.liferay.portal.util.SubscriptionSender
All Implemented Interfaces:
Serializable

public class SubscriptionSender
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
protected  String body
           
protected  boolean bulk
           
protected  long companyId
           
protected  List<FileAttachment> fileAttachments
           
protected  String fromAddress
           
protected  String fromName
           
protected  long groupId
           
protected  boolean htmlFormat
           
protected  String inReplyTo
           
protected  Map<Locale,String> localizedBodyMap
           
protected  Map<Locale,String> localizedSubjectMap
           
protected  String mailId
           
protected  String portletId
           
protected  String replyToAddress
           
protected  long scopeGroupId
           
protected  ServiceContext serviceContext
           
protected  SMTPAccount smtpAccount
           
protected  String subject
           
protected  long userId
           
 
Constructor Summary
SubscriptionSender()
           
 
Method Summary
 void addFileAttachment(File file)
           
 void addFileAttachment(File file, String fileName)
           
 void addPersistedSubscribers(String className, long classPK)
           
 void addRuntimeSubscribers(String toAddress, String toName)
           
protected  void deleteSubscription(Subscription subscription)
           
 void flushNotifications()
           
 void flushNotificationsAsync()
           
 Object getContextAttribute(String key)
           
 String getMailId()
           
protected  boolean hasPermission(Subscription subscription, User user)
           
 void initialize()
           
protected  void notifySubscriber(Subscription subscription)
           
protected  void processMailMessage(MailMessage mailMessage, Locale locale)
           
protected  String replaceContent(String content, Locale locale)
           
protected  String replaceContent(String content, Locale locale, boolean escape)
           
protected  void sendEmail(javax.mail.internet.InternetAddress to, Locale locale)
           
 void setBody(String body)
           
 void setBulk(boolean bulk)
           
 void setCompanyId(long companyId)
           
 void setContextAttribute(String key, EscapableObject<String> value)
           
 void setContextAttribute(String key, Object value)
           
 void setContextAttribute(String key, Object value, boolean escape)
           
 void setContextAttributes(Object... values)
           
 void setContextUserPrefix(String contextUserPrefix)
           
 void setFrom(String fromAddress, String fromName)
           
 void setGroupId(long groupId)
           
 void setHtmlFormat(boolean htmlFormat)
           
 void setInReplyTo(String inReplyTo)
           
 void setLocalizedBodyMap(Map<Locale,String> localizedBodyMap)
           
 void setLocalizedSubjectMap(Map<Locale,String> localizedSubjectMap)
           
 void setMailId(String popPortletPrefix, Object... ids)
           
 void setPortletId(String portletId)
           
 void setReplyToAddress(String replyToAddress)
           
 void setScopeGroupId(long scopeGroupId)
           
 void setServiceContext(ServiceContext serviceContext)
           
 void setSMTPAccount(SMTPAccount smtpAccount)
           
 void setSubject(String subject)
           
 void setUserId(long userId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

body

protected String body

bulk

protected boolean bulk

companyId

protected long companyId

fileAttachments

protected List<FileAttachment> fileAttachments

fromAddress

protected String fromAddress

fromName

protected String fromName

groupId

protected long groupId

htmlFormat

protected boolean htmlFormat

inReplyTo

protected String inReplyTo

localizedBodyMap

protected Map<Locale,String> localizedBodyMap

localizedSubjectMap

protected Map<Locale,String> localizedSubjectMap

mailId

protected String mailId

portletId

protected String portletId

replyToAddress

protected String replyToAddress

scopeGroupId

protected long scopeGroupId

serviceContext

protected ServiceContext serviceContext

smtpAccount

protected SMTPAccount smtpAccount

subject

protected String subject

userId

protected long userId
Constructor Detail

SubscriptionSender

public SubscriptionSender()
Method Detail

addFileAttachment

public void addFileAttachment(File file)

addFileAttachment

public void addFileAttachment(File file,
                              String fileName)

addPersistedSubscribers

public void addPersistedSubscribers(String className,
                                    long classPK)

addRuntimeSubscribers

public void addRuntimeSubscribers(String toAddress,
                                  String toName)

flushNotifications

public void flushNotifications()
                        throws Exception
Throws:
Exception

flushNotificationsAsync

public void flushNotificationsAsync()

getContextAttribute

public Object getContextAttribute(String key)

getMailId

public String getMailId()

initialize

public void initialize()
                throws Exception
Throws:
Exception

setBody

public void setBody(String body)

setBulk

public void setBulk(boolean bulk)

setCompanyId

public void setCompanyId(long companyId)

setContextAttribute

public void setContextAttribute(String key,
                                EscapableObject<String> value)

setContextAttribute

public void setContextAttribute(String key,
                                Object value)

setContextAttribute

public void setContextAttribute(String key,
                                Object value,
                                boolean escape)

setContextAttributes

public void setContextAttributes(Object... values)

setContextUserPrefix

public void setContextUserPrefix(String contextUserPrefix)

setFrom

public void setFrom(String fromAddress,
                    String fromName)

setGroupId

public void setGroupId(long groupId)

setHtmlFormat

public void setHtmlFormat(boolean htmlFormat)

setInReplyTo

public void setInReplyTo(String inReplyTo)

setLocalizedBodyMap

public void setLocalizedBodyMap(Map<Locale,String> localizedBodyMap)

setLocalizedSubjectMap

public void setLocalizedSubjectMap(Map<Locale,String> localizedSubjectMap)

setMailId

public void setMailId(String popPortletPrefix,
                      Object... ids)

setPortletId

public void setPortletId(String portletId)

setReplyToAddress

public void setReplyToAddress(String replyToAddress)

setScopeGroupId

public void setScopeGroupId(long scopeGroupId)
See Also:
com.liferay.portal.kernel.search.BaseIndexer#getParentGroupId(long)}

setServiceContext

public void setServiceContext(ServiceContext serviceContext)

setSMTPAccount

public void setSMTPAccount(SMTPAccount smtpAccount)

setSubject

public void setSubject(String subject)

setUserId

public void setUserId(long userId)

deleteSubscription

protected void deleteSubscription(Subscription subscription)
                           throws Exception
Throws:
Exception

hasPermission

protected boolean hasPermission(Subscription subscription,
                                User user)
                         throws Exception
Throws:
Exception

notifySubscriber

protected void notifySubscriber(Subscription subscription)
                         throws Exception
Throws:
Exception

processMailMessage

protected void processMailMessage(MailMessage mailMessage,
                                  Locale locale)
                           throws Exception
Throws:
Exception

replaceContent

protected String replaceContent(String content,
                                Locale locale)
                         throws Exception
Throws:
Exception

replaceContent

protected String replaceContent(String content,
                                Locale locale,
                                boolean escape)
                         throws Exception
Throws:
Exception

sendEmail

protected void sendEmail(javax.mail.internet.InternetAddress to,
                         Locale locale)
                  throws Exception
Throws:
Exception

Liferay 6.1.2-ce-ga3