|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ploin.pmf.impl.MailFactory
public class MailFactory
Description: Implementation of the IMailFactory interface. This is
the main class. This class control the MailReader, MailReplacer,
MailSender and the PropertiesLoader.
........
.WHHUUVOOOOU&,
dMMMMMMMMMMMa, .MMMMF .MHW0Oz+!``````?G. .MMMM% .MMMMMMMMMMMN,
.MMMMMMMMMMMMMMr JMMMM JHHXwOz;:^..``` `O, JMMM# dMMMMMMMMMMMMN
JMMM# ,MMMMF MMMMF .MHVXwOz++.^.```` +n .MMMM$ .MMMMt dMMM#
.MMMMt .MMMMt .MMMM! JMHWWXwOz++.... `.+X JMMMM JMMMM .MMMM%
JMMM# .MMMM@ dMMM# ,MHHWWXwOzz+++....?df MMMMF .MMMMF JMMM#
.MMMMNNNNNMMMMMD MMMMMNNm 4MHHWWXXwOOzzz1+1wX'.MMMM! .MMMM` .MMMM$
.MMMMMMMMMMMM"` .YMMMMMF TMHHHWWWXXXwwwwXK! MMMMF MMMMF JMMMM
MMMMF TMMHHHHHWWWHY^
.MMMM' `7""""^`
dMMM#
| Constructor Summary | |
|---|---|
MailFactory()
Constructor Reads the properties from the mail.properties file |
|
| Method Summary | |
|---|---|
java.lang.String |
getDirectory()
Returns the directory where the email-templates and the mandants are in. |
java.lang.String |
getHtmlExtension()
returns the html extension. |
java.lang.String |
getHtmlMessage(TemplateConfig templateConfig)
This method tries to find a HTML template file with the given name ("mailname"), fills it with the values from the map and returns the filled template. |
IMailReader |
getMailReader()
Returns the IMailReader |
IMailReplacer |
getMailReplacer()
Returns the IMailReplacer |
IMailSender |
getMailSender()
Returns the IMailSender |
java.lang.String |
getPlainExtension()
returns the plain extension. |
java.lang.String |
getPlainMessage(TemplateConfig templateConfig)
This method tries to find a plain-text template file with the given name ("mailname"), fills it with the values from the map and returns the filled template. |
IPropertiesLoader |
getPropertiesLoader()
Returns the IPropertiesLoader |
void |
init()
Initialize the mail Factory |
boolean |
isSingleThread()
returns the variable "singleThread" |
SendingResult |
sendMail(MailConfig mailConfig,
TemplateConfig templateConfig)
This is the main method. |
SendingResult |
sendMailFromTemplate(MailConfig mailConfig,
TemplateConfig templateConfig)
|
SendingResult |
sendMailWithContent(MailConfig mailConfig,
TemplateConfig templateConfig,
java.lang.String plainReplaced,
java.lang.String htmlReplaced)
This method sends an e-mail with the given plainReplaced content and htmlReplaced content. |
void |
setDirectory(java.lang.String directory)
Set teh directory where the email-templates and the mandants are in. |
void |
setHtmlExtension(java.lang.String htmlExtension)
Set the html extension. |
void |
setMailReader(IMailReader mailReader)
Set the IMailReader |
void |
setMailReplacer(IMailReplacer mailReplacer)
Set the IMailReplacer |
void |
setMailSender(IMailSender mailSender)
Set the IMailSender |
void |
setPlainExtension(java.lang.String plainExtendsion)
Set the plain extension. |
void |
setPropertiesLoader(IPropertiesLoader propertiesLoader)
Set the IPropertiesLoader |
void |
setSingleThread(boolean singleThread)
Set the singleThread |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MailFactory()
| Method Detail |
|---|
public void init()
IMailFactory
init in interface IMailFactory
public SendingResult sendMail(MailConfig mailConfig,
TemplateConfig templateConfig)
IMailFactory
sendMail in interface IMailFactorymailConfig - the object containing the recipients and the mandanttemplateConfig - containing mandant/client, locale, template-name and map.
public SendingResult sendMailWithContent(MailConfig mailConfig,
TemplateConfig templateConfig,
java.lang.String plainReplaced,
java.lang.String htmlReplaced)
throws java.lang.Exception
IMailFactory
sendMailWithContent in interface IMailFactorymailConfig - the mailConfig objecttemplateConfig - containing mandant/client, locale, template-name and map.plainReplaced - the plain text content to be send in the email.htmlReplaced - the HTML content to be send in the email.
java.lang.Exceptionpublic java.lang.String getPlainMessage(TemplateConfig templateConfig)
IMailFactory
getPlainMessage in interface IMailFactorytemplateConfig - containing mandant/client, locale, template-name and map.
public java.lang.String getHtmlMessage(TemplateConfig templateConfig)
IMailFactory
getHtmlMessage in interface IMailFactorytemplateConfig - containing mandant/client, locale, template-name and map.
public SendingResult sendMailFromTemplate(MailConfig mailConfig,
TemplateConfig templateConfig)
public IMailReader getMailReader()
IMailFactory
getMailReader in interface IMailFactorypublic void setMailReader(IMailReader mailReader)
IMailFactory
setMailReader in interface IMailFactorypublic IMailReplacer getMailReplacer()
IMailFactory
getMailReplacer in interface IMailFactorypublic void setMailReplacer(IMailReplacer mailReplacer)
IMailFactory
setMailReplacer in interface IMailFactorypublic IMailSender getMailSender()
IMailFactory
getMailSender in interface IMailFactorypublic void setMailSender(IMailSender mailSender)
IMailFactory
setMailSender in interface IMailFactorypublic IPropertiesLoader getPropertiesLoader()
IMailFactory
getPropertiesLoader in interface IMailFactorypublic void setPropertiesLoader(IPropertiesLoader propertiesLoader)
IMailFactory
setPropertiesLoader in interface IMailFactorypublic java.lang.String getDirectory()
IMailFactory
getDirectory in interface IMailFactorypublic void setDirectory(java.lang.String directory)
IMailFactory
setDirectory in interface IMailFactorypublic java.lang.String getHtmlExtension()
IMailFactory
getHtmlExtension in interface IMailFactorypublic java.lang.String getPlainExtension()
IMailFactory
getPlainExtension in interface IMailFactorypublic void setHtmlExtension(java.lang.String htmlExtension)
IMailFactory
setHtmlExtension in interface IMailFactorypublic void setPlainExtension(java.lang.String plainExtendsion)
IMailFactory
setPlainExtension in interface IMailFactorypublic boolean isSingleThread()
IMailFactory
isSingleThread in interface IMailFactorypublic void setSingleThread(boolean singleThread)
IMailFactory
setSingleThread in interface IMailFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||