Package org.apache.ofbiz.service.mail
Class MimeMessageWrapper
java.lang.Object
org.apache.ofbiz.service.mail.MimeMessageWrapper
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorDescriptionMimeMessageWrapper
(javax.mail.Session session) MimeMessageWrapper
(javax.mail.Session session, javax.mail.internet.MimeMessage message) -
Method Summary
Modifier and TypeMethodDescriptionGets attachment indexes.javax.mail.Address[]
getBcc()
Get bcc address [ ].protected ByteBuffer
getByteBufferFromStream
(InputStream stream) Gets byte buffer from stream.javax.mail.Address[]
getCc()
Get cc address [ ].protected String
getContentText
(Object content) Gets content text.Gets content type.getFirstHeader
(String header) Gets first header.javax.mail.Address[]
getFrom()
Get from address [ ].String[]
Get header string [ ].int
Gets main part count.javax.mail.internet.MimeMessage
Gets message.Gets message body.Gets message body content type.Gets message id.Gets message raw text.javax.mail.BodyPart
Gets part.getPartByteBuffer
(String index) Gets part byte buffer.getPartContentType
(String index) Gets part content type.getPartDescription
(String index) Gets part description.getPartDisposition
(String index) Gets part disposition.getPartFilename
(String index) Gets part filename.getPartRawText
(String index) Gets part raw text.getPartText
(String index) Gets part text.Gets received date.Gets sent date.javax.mail.Session
Gets session.Gets subject.int
getSubPartCount
(int index) Gets sub part count.protected String
getTextFromStream
(InputStream stream) Gets text from stream.javax.mail.Address[]
getTo()
Get to address [ ].void
setMessage
(javax.mail.internet.MimeMessage message) Sets message.void
setSession
(javax.mail.Session session) Sets session.
-
Constructor Details
-
MimeMessageWrapper
public MimeMessageWrapper(javax.mail.Session session, javax.mail.internet.MimeMessage message) -
MimeMessageWrapper
public MimeMessageWrapper(javax.mail.Session session)
-
-
Method Details
-
setSession
public void setSession(javax.mail.Session session) Sets session.- Parameters:
session
- the session
-
getSession
public javax.mail.Session getSession()Gets session.- Returns:
- the session
-
setMessage
public void setMessage(javax.mail.internet.MimeMessage message) Sets message.- Parameters:
message
- the message
-
getMessage
public javax.mail.internet.MimeMessage getMessage()Gets message.- Returns:
- the message
-
getFirstHeader
Gets first header.- Parameters:
header
- the header- Returns:
- the first header
-
getHeader
Get header string [ ].- Parameters:
header
- the header- Returns:
- the string [ ]
-
getFrom
public javax.mail.Address[] getFrom()Get from address [ ].- Returns:
- the address [ ]
-
getTo
public javax.mail.Address[] getTo()Get to address [ ].- Returns:
- the address [ ]
-
getCc
public javax.mail.Address[] getCc()Get cc address [ ].- Returns:
- the address [ ]
-
getBcc
public javax.mail.Address[] getBcc()Get bcc address [ ].- Returns:
- the address [ ]
-
getSubject
Gets subject.- Returns:
- the subject
-
getMessageId
Gets message id.- Returns:
- the message id
-
getSentDate
Gets sent date.- Returns:
- the sent date
-
getReceivedDate
Gets received date.- Returns:
- the received date
-
getContentType
Gets content type.- Returns:
- the content type
-
getMainPartCount
public int getMainPartCount()Gets main part count.- Returns:
- the main part count
-
getSubPartCount
public int getSubPartCount(int index) Gets sub part count.- Parameters:
index
- the index- Returns:
- the sub part count
-
getAttachmentIndexes
Gets attachment indexes.- Returns:
- the attachment indexes
-
getMessageBody
Gets message body.- Returns:
- the message body
-
getMessageBodyContentType
Gets message body content type.- Returns:
- the message body content type
-
getMessageRawText
Gets message raw text.- Returns:
- the message raw text
-
getPartDescription
Gets part description.- Parameters:
index
- the index- Returns:
- the part description
-
getPartContentType
Gets part content type.- Parameters:
index
- the index- Returns:
- the part content type
-
getPartDisposition
Gets part disposition.- Parameters:
index
- the index- Returns:
- the part disposition
-
getPartFilename
Gets part filename.- Parameters:
index
- the index- Returns:
- the part filename
-
getPartByteBuffer
Gets part byte buffer.- Parameters:
index
- the index- Returns:
- the part byte buffer
-
getPartText
Gets part text.- Parameters:
index
- the index- Returns:
- the part text
-
getPartRawText
Gets part raw text.- Parameters:
index
- the index- Returns:
- the part raw text
-
getPart
Gets part.- Parameters:
indexStr
- the index str- Returns:
- the part
-
getContentText
Gets content text.- Parameters:
content
- the content- Returns:
- the content text
-
getTextFromStream
Gets text from stream.- Parameters:
stream
- the stream- Returns:
- the text from stream
-
getByteBufferFromStream
Gets byte buffer from stream.- Parameters:
stream
- the stream- Returns:
- the byte buffer from stream
-