Package de.xima.fc.mdl.mail
Class TextMailData
- java.lang.Object
-
- de.xima.fc.mdl.mail.TextMailData
-
- All Implemented Interfaces:
IBaseMailData,Serializable
- Direct Known Subclasses:
MultipartMailData,SimpleTextMail
public class TextMailData extends Object implements IBaseMailData
Model containing basic mail properties- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.mail.Address[]bccprotected List<BodyPartData>bodyPartsprotected javax.mail.Address[]ccprotected javax.mail.Addressfromprotected Map<String,String>headersprotected javax.mail.Address[]replyprotected IMailSecurityConfigsecurityConfigprotected booleansendSeparateMailsprotected Stringsubjectprotected javax.mail.Address[]to-
Fields inherited from interface de.xima.fc.interfaces.mail.IBaseMailData
ADDRESS_SPLITTER
-
-
Constructor Summary
Constructors Modifier Constructor Description TextMailData(String subject, String body, String bodyMimeType, String from, String to)Deprecated.TextMailData(String subject, String body, String bodyMimeType, String from, String senderName, String to)Deprecated.TextMailData(String subject, String body, String bodyMimeType, String from, String senderName, String to, EMailEncrpytionType encrpytionType)Deprecated.TextMailData(String subject, String body, String bodyMimeType, String from, String senderName, String to, Map<String,String> headers)Deprecated.TextMailData(String subject, String body, String bodyMimeType, String from, javax.mail.Address[] reply, String senderName, String to, EMailEncrpytionType encryptionType)Deprecated.TextMailData(String subject, String body, String bodyMimeType, javax.mail.Address from, javax.mail.Address[] reply, javax.mail.Address[] to)Deprecated.protectedTextMailData(String subject, javax.mail.Address[] to, javax.mail.Address[] reply, javax.mail.Address from, javax.mail.Address[] cc, javax.mail.Address[] bcc, boolean sendSeparateMails, IMailSecurityConfig securityConfig, List<BodyPartData> bodyParts, Map<String,String> headers)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected javax.mail.Address[]getAddressesByString(String addressesString)javax.mail.Address[]getBcc()StringgetBody()Deprecated.StringgetBodyMimeType()Deprecated.List<BodyPartData>getBodyParts()javax.mail.Address[]getCc()EMailEncrpytionTypegetEncryptionType()Deprecated.List<FilePartData>getFileParts()javax.mail.AddressgetFrom()Map<String,String>getHeaders()javax.mail.Address[]getReply()IMailSecurityConfiggetSecurityConfig()Gets the security configuration for this mail, which controls whether and how the mail should be encrypted and/or signed, and what to do if encryption/signing fails.booleangetSendSeparateMails()Flag to indicate that mails should be send separately to the to-recipient.StringgetSubject()javax.mail.Address[]getTo()voidsetBcc(String addresses)Deprecated.UseMailDataBuilder.bcc(String)orMailDataBuilder.bcc(Address[])instead.voidsetBcc(javax.mail.Address[] bcc)Deprecated.UseMailDataBuilder.bcc(Address[])orMailDataBuilder.bcc(String)instead.voidsetCc(String addresses)Deprecated.UseMailDataBuilder.cc(String)orMailDataBuilder.cc(Address[])instead.voidsetCc(javax.mail.Address[] cc)Deprecated.UseMailDataBuilder.cc(Address[])orMailDataBuilder.cc(String)instead.voidsetEncryptionType(EMailEncrpytionType encryptionType)Deprecated.voidsetSendSeparateMails(boolean sendSeparateMails)Deprecated.UseMailDataBuilder.sendSeparateMails(boolean)instead.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.interfaces.mail.IBaseMailData
buildMimeMessage, buildMimeParts, getMimeMessage
-
-
-
-
Field Detail
-
subject
protected final String subject
-
to
protected final javax.mail.Address[] to
-
reply
protected final javax.mail.Address[] reply
-
from
protected final javax.mail.Address from
-
cc
protected javax.mail.Address[] cc
-
bcc
protected javax.mail.Address[] bcc
-
sendSeparateMails
protected boolean sendSeparateMails
-
securityConfig
protected IMailSecurityConfig securityConfig
-
bodyParts
protected List<BodyPartData> bodyParts
-
-
Constructor Detail
-
TextMailData
@Deprecated public TextMailData(String subject, String body, String bodyMimeType, String from, String senderName, String to, Map<String,String> headers) throws Exception
Deprecated.- Throws:
Exception
-
TextMailData
@Deprecated public TextMailData(String subject, String body, String bodyMimeType, String from, String to) throws Exception
Deprecated.- Throws:
Exception
-
TextMailData
@Deprecated public TextMailData(String subject, String body, String bodyMimeType, String from, String senderName, String to) throws Exception
Deprecated.- Throws:
Exception
-
TextMailData
@Deprecated public TextMailData(String subject, String body, String bodyMimeType, String from, String senderName, String to, EMailEncrpytionType encrpytionType) throws Exception
Deprecated.- Throws:
Exception
-
TextMailData
@Deprecated public TextMailData(String subject, String body, String bodyMimeType, String from, javax.mail.Address[] reply, String senderName, String to, EMailEncrpytionType encryptionType) throws Exception
Deprecated.- Throws:
Exception
-
TextMailData
@Deprecated public TextMailData(String subject, String body, String bodyMimeType, javax.mail.Address from, javax.mail.Address[] reply, javax.mail.Address[] to)
Deprecated.
-
TextMailData
protected TextMailData(String subject, javax.mail.Address[] to, javax.mail.Address[] reply, javax.mail.Address from, javax.mail.Address[] cc, javax.mail.Address[] bcc, boolean sendSeparateMails, IMailSecurityConfig securityConfig, List<BodyPartData> bodyParts, Map<String,String> headers)
-
-
Method Detail
-
getBody
@Deprecated public String getBody()
Deprecated.- Returns:
- the body
-
getBodyMimeType
@Deprecated public String getBodyMimeType()
Deprecated.- Returns:
- the bodyMimeType
-
getEncryptionType
@Deprecated public EMailEncrpytionType getEncryptionType()
Deprecated.
-
setEncryptionType
@Deprecated public void setEncryptionType(EMailEncrpytionType encryptionType)
Deprecated.
-
getFileParts
public List<FilePartData> getFileParts()
- Specified by:
getFilePartsin interfaceIBaseMailData
-
getSendSeparateMails
public boolean getSendSeparateMails()
Description copied from interface:IBaseMailDataFlag to indicate that mails should be send separately to the to-recipient. Cc- and Bcc-recipients will be ignored because its not clear how to handle them- Specified by:
getSendSeparateMailsin interfaceIBaseMailData- Returns:
trueif mails should be separately,falseotherwise
-
setSendSeparateMails
@Deprecated public void setSendSeparateMails(boolean sendSeparateMails)
Deprecated.UseMailDataBuilder.sendSeparateMails(boolean)instead.- Parameters:
sendSeparateMails-trueif mails should be separately,falseotherwise
-
setBcc
@Deprecated public void setBcc(String addresses) throws javax.mail.internet.AddressException
Deprecated.UseMailDataBuilder.bcc(String)orMailDataBuilder.bcc(Address[])instead.- Parameters:
addresses- The BCC addresses to set as a string.- Throws:
javax.mail.internet.AddressException- When an address is not a valid email address.
-
setBcc
@Deprecated public void setBcc(javax.mail.Address[] bcc)
Deprecated.UseMailDataBuilder.bcc(Address[])orMailDataBuilder.bcc(String)instead.- Parameters:
bcc- the bcc addresses to set
-
setCc
@Deprecated public void setCc(String addresses) throws javax.mail.internet.AddressException
Deprecated.UseMailDataBuilder.cc(String)orMailDataBuilder.cc(Address[])instead.- Parameters:
addresses- The CC addresses to set as a string.- Throws:
javax.mail.internet.AddressException- When an address is not a valid email address.
-
setCc
@Deprecated public void setCc(javax.mail.Address[] cc)
Deprecated.UseMailDataBuilder.cc(Address[])orMailDataBuilder.cc(String)instead.- Parameters:
cc- the cc addresses to set
-
getAddressesByString
protected javax.mail.Address[] getAddressesByString(String addressesString) throws javax.mail.internet.AddressException
- Throws:
javax.mail.internet.AddressException
-
getSubject
public String getSubject()
- Specified by:
getSubjectin interfaceIBaseMailData
-
getTo
public javax.mail.Address[] getTo()
- Specified by:
getToin interfaceIBaseMailData- Returns:
- the to
-
getReply
public javax.mail.Address[] getReply()
- Specified by:
getReplyin interfaceIBaseMailData- Returns:
- the reply
-
getFrom
public javax.mail.Address getFrom()
- Specified by:
getFromin interfaceIBaseMailData- Returns:
- the from
-
getCc
public javax.mail.Address[] getCc()
- Specified by:
getCcin interfaceIBaseMailData- Returns:
- the cc
-
getBcc
public javax.mail.Address[] getBcc()
- Specified by:
getBccin interfaceIBaseMailData- Returns:
- the bcc
-
getSecurityConfig
public IMailSecurityConfig getSecurityConfig()
Description copied from interface:IBaseMailDataGets the security configuration for this mail, which controls whether and how the mail should be encrypted and/or signed, and what to do if encryption/signing fails.- Specified by:
getSecurityConfigin interfaceIBaseMailData- Returns:
- security configuration for this mail
-
getBodyParts
public List<BodyPartData> getBodyParts()
- Specified by:
getBodyPartsin interfaceIBaseMailData
-
getHeaders
public Map<String,String> getHeaders()
- Specified by:
getHeadersin interfaceIBaseMailData
-
-