Package org.javlo.mailing
Class Mailing
- java.lang.Object
-
- org.javlo.mailing.Mailing
-
public class Mailing extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Mailing.MailingDateSorting
-
Field Summary
Fields Modifier and Type Field Description static String
DATA_TOKEN_UNSUBSCRIBE
static String
DATA_TOKEN_UNSUBSCRIBE_HOST
static String
DATA_TOKEN_UNSUBSCRIBE_MESSAGE
static String
DATA_TOKEN_UNSUBSCRIBE_POST
static String
DATA_TOKEN_UNSUBSCRIBE_URL
protected static Logger
logger
create a static logger.
-
Constructor Summary
Constructors Constructor Description Mailing()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addData(String key, String value)
boolean
addErrorReceive(javax.mail.internet.InternetAddress email)
void
addFeedBack(FeedBackMailingBean bean)
void
addReceivers(Collection<String> to)
void
close(MailingStaticConfig mailingStaticConfig)
void
delete(javax.servlet.ServletContext application)
String
getAdminEmail()
Collection<Map.Entry<String,String>>
getAllData()
String
getContent()
String
getContextKey()
Map<String,Integer>
getCountClicks()
int
getCountForward()
int
getCountReaders()
Map<Integer,Integer>
getCountReadersByHour()
int
getCountUnsubscribe()
String
getData(String key)
Date
getDate()
String
getDateString()
float
getDeliveryErrorRate()
String
getDkimDomain()
File
getDkimPrivateKeyFile()
String
getDkimSelector()
String
getEncoding()
String
getErrorMessage()
Collection<javax.mail.internet.InternetAddress>
getErrorReveicers()
List<FeedBackMailingBean>
getFeedBack()
javax.mail.internet.InternetAddress
getFrom()
String
getId()
String
getLanguage()
String
getManualUnsubscribeLink()
String
getMessage()
javax.mail.internet.InternetAddress
getNextReceiver()
javax.mail.internet.InternetAddress
getNotif()
String
getPageId()
float
getReadersRate()
Set<javax.mail.internet.InternetAddress>
getReceivers()
int
getReceiversSize()
List<String>
getRoles()
Date
getSendDate()
String
getSentKey(javax.mail.internet.InternetAddress key)
String
getSmtpHost()
String
getSmtpPassword()
String
getSmtpPort()
String
getSmtpUser()
String
getSubject()
String
getTemplateId()
String
getUnsubscribeURL()
Map<javax.mail.internet.InternetAddress,IUserInfo>
getUsers()
String
getWarningMessage()
boolean
isExist(javax.servlet.ServletContext application, String inID)
boolean
isExistInHistory(MailingStaticConfig mailingStaticConfig, String inID)
boolean
isHtml()
boolean
isSend()
boolean
isTest()
boolean
isValid()
void
load(MailingStaticConfig staticConfig, String inID)
void
onEndMailing()
void
onMailSent(javax.mail.internet.InternetAddress to, String error)
void
onStartMailing()
void
printInfo(PrintStream out)
void
setAdminEmail(String adminEmail)
void
setContent(String content)
void
setContextKey(String contextKey)
void
setDirectory(StaticConfig staticConfig)
void
setDkimDomain(String dkimDomain)
void
setDkimSelector(String dkimSelector)
void
setEncoding(String encoding)
void
setErrorMessage(String errorMessage)
void
setFrom(javax.mail.internet.InternetAddress from)
void
setHtml(boolean html)
void
setId(MailingStaticConfig staticConfig, String id)
void
setLanguage(String language)
void
setManualUnsubscribeLink(String manualUnsubcribeLink)
void
setNotif(javax.mail.internet.InternetAddress notif)
void
setPageId(String pageId)
void
setReceivers(Set<javax.mail.internet.InternetAddress> receivers)
void
setRoles(List<String> inRoles)
void
setSend(boolean send)
void
setSendDate(Date sendDate)
void
setSmtpHost(String smtpHost)
void
setSmtpPassword(String smtpPassword)
void
setSmtpPort(String smtpPort)
void
setSmtpUser(String smtpUser)
void
setSubject(String subject)
void
setTemplateId(String templateId)
void
setTest(boolean test)
void
setUnsubscribeURL(String unsubscribeURL)
void
setUsers(Map<javax.mail.internet.InternetAddress,IUserInfo> users)
void
setWarningMessage(String warningMessage)
void
store(javax.servlet.ServletContext application)
void
store(MailingStaticConfig mailingStaticConfig)
void
storePrivateKeyFile(File privateKey)
String
toString()
-
-
-
Field Detail
-
DATA_TOKEN_UNSUBSCRIBE
public static final String DATA_TOKEN_UNSUBSCRIBE
- See Also:
- Constant Field Values
-
DATA_TOKEN_UNSUBSCRIBE_URL
public static final String DATA_TOKEN_UNSUBSCRIBE_URL
- See Also:
- Constant Field Values
-
DATA_TOKEN_UNSUBSCRIBE_MESSAGE
public static final String DATA_TOKEN_UNSUBSCRIBE_MESSAGE
- See Also:
- Constant Field Values
-
DATA_TOKEN_UNSUBSCRIBE_HOST
public static final String DATA_TOKEN_UNSUBSCRIBE_HOST
- See Also:
- Constant Field Values
-
DATA_TOKEN_UNSUBSCRIBE_POST
public static final String DATA_TOKEN_UNSUBSCRIBE_POST
- See Also:
- Constant Field Values
-
logger
protected static Logger logger
create a static logger.
-
-
Method Detail
-
getContent
public String getContent()
-
setContent
public void setContent(String content)
-
getFrom
public javax.mail.internet.InternetAddress getFrom()
-
setFrom
public void setFrom(javax.mail.internet.InternetAddress from)
-
isHtml
public boolean isHtml()
-
setHtml
public void setHtml(boolean html)
-
getNotif
public javax.mail.internet.InternetAddress getNotif()
-
setNotif
public void setNotif(javax.mail.internet.InternetAddress notif)
-
getSubject
public String getSubject()
-
setSubject
public void setSubject(String subject)
-
setReceivers
public void setReceivers(Set<javax.mail.internet.InternetAddress> receivers)
-
addReceivers
public void addReceivers(Collection<String> to)
-
getReceiversSize
public int getReceiversSize()
-
isExist
public boolean isExist(javax.servlet.ServletContext application, String inID) throws IOException
- Throws:
IOException
-
isExistInHistory
public boolean isExistInHistory(MailingStaticConfig mailingStaticConfig, String inID) throws IOException
- Throws:
IOException
-
load
public void load(MailingStaticConfig staticConfig, String inID) throws IOException
- Throws:
IOException
-
addErrorReceive
public boolean addErrorReceive(javax.mail.internet.InternetAddress email)
-
getErrorReveicers
public Collection<javax.mail.internet.InternetAddress> getErrorReveicers()
-
store
public void store(javax.servlet.ServletContext application) throws IOException
- Throws:
IOException
-
store
public void store(MailingStaticConfig mailingStaticConfig) throws IOException
- Throws:
IOException
-
close
public void close(MailingStaticConfig mailingStaticConfig) throws IOException
- Throws:
IOException
-
delete
public void delete(javax.servlet.ServletContext application) throws IOException
- Throws:
IOException
-
onStartMailing
public void onStartMailing() throws IOException
- Throws:
IOException
-
getSentKey
public String getSentKey(javax.mail.internet.InternetAddress key)
-
onMailSent
public void onMailSent(javax.mail.internet.InternetAddress to, String error) throws IOException
- Throws:
IOException
-
getNextReceiver
public javax.mail.internet.InternetAddress getNextReceiver()
-
onEndMailing
public void onEndMailing()
-
isSend
public boolean isSend()
-
setSend
public void setSend(boolean send)
-
getReceivers
public Set<javax.mail.internet.InternetAddress> getReceivers()
-
getLanguage
public String getLanguage()
-
setLanguage
public void setLanguage(String language)
-
getUnsubscribeURL
public String getUnsubscribeURL()
-
setUnsubscribeURL
public void setUnsubscribeURL(String unsubscribeURL)
-
getAllData
public Collection<Map.Entry<String,String>> getAllData()
-
getId
public String getId()
-
getContextKey
public String getContextKey()
-
setContextKey
public void setContextKey(String contextKey)
-
setId
public void setId(MailingStaticConfig staticConfig, String id)
-
addFeedBack
public void addFeedBack(FeedBackMailingBean bean) throws IOException
- Throws:
IOException
-
getFeedBack
public List<FeedBackMailingBean> getFeedBack() throws IOException
- Throws:
IOException
-
getReadersRate
public float getReadersRate() throws IOException
- Throws:
IOException
-
getDeliveryErrorRate
public float getDeliveryErrorRate() throws IOException
- Throws:
IOException
-
getCountReaders
public int getCountReaders() throws IOException
- Throws:
IOException
-
getCountReadersByHour
public Map<Integer,Integer> getCountReadersByHour() throws IOException
- Throws:
IOException
-
getCountClicks
public Map<String,Integer> getCountClicks() throws IOException
- Throws:
IOException
-
getCountUnsubscribe
public int getCountUnsubscribe() throws IOException
- Throws:
IOException
-
getCountForward
public int getCountForward() throws IOException
- Throws:
IOException
-
getDate
public Date getDate()
-
isTest
public boolean isTest()
-
setTest
public void setTest(boolean test)
-
getEncoding
public String getEncoding()
-
setEncoding
public void setEncoding(String encoding)
-
getTemplateId
public String getTemplateId()
-
setTemplateId
public void setTemplateId(String templateId)
-
getSendDate
public Date getSendDate()
-
getDateString
public String getDateString()
-
setSendDate
public void setSendDate(Date sendDate)
-
getAdminEmail
public String getAdminEmail()
-
setAdminEmail
public void setAdminEmail(String adminEmail)
-
isValid
public boolean isValid()
-
getSmtpHost
public String getSmtpHost()
-
setSmtpHost
public void setSmtpHost(String smtpHost)
-
getSmtpPort
public String getSmtpPort()
-
setSmtpPort
public void setSmtpPort(String smtpPort)
-
getSmtpUser
public String getSmtpUser()
-
setSmtpUser
public void setSmtpUser(String smtpUser)
-
getSmtpPassword
public String getSmtpPassword()
-
setSmtpPassword
public void setSmtpPassword(String smtpPassword)
-
getManualUnsubscribeLink
public String getManualUnsubscribeLink()
-
setManualUnsubscribeLink
public void setManualUnsubscribeLink(String manualUnsubcribeLink)
-
getDkimDomain
public String getDkimDomain()
-
setDkimDomain
public void setDkimDomain(String dkimDomain)
-
getDkimSelector
public String getDkimSelector()
-
setDkimSelector
public void setDkimSelector(String dkimSelector)
-
storePrivateKeyFile
public void storePrivateKeyFile(File privateKey)
-
setDirectory
public void setDirectory(StaticConfig staticConfig)
-
getDkimPrivateKeyFile
public File getDkimPrivateKeyFile()
-
getErrorMessage
public String getErrorMessage()
-
setErrorMessage
public void setErrorMessage(String errorMessage)
-
getWarningMessage
public String getWarningMessage()
-
setWarningMessage
public void setWarningMessage(String warningMessage)
-
getMessage
public String getMessage()
-
getPageId
public String getPageId()
-
setPageId
public void setPageId(String pageId)
-
printInfo
public void printInfo(PrintStream out)
-
-