|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectMimeMessage
com.knowgate.hipermail.DBMimeMessage
public class DBMimeMessage
MIME messages stored at database BLOB columns or MBOX files
| Field Summary | |
|---|---|
static short |
ClassId
|
| Constructor Summary | |
|---|---|
DBMimeMessage(Folder oFldr,
DBMimeMessage oMsg)
Create DBMimeMessage from another DBMimeMessage GUID of this message is set to be the same as that of oMsg |
|
DBMimeMessage(Folder oFldr,
java.io.InputStream oInStrm)
Create DBMimeMessage from an InputStream, set folder and assign a new GUID |
|
DBMimeMessage(Folder oFldr,
MimeMessage oMsg)
Create DBMimeMessage from a MimeMessage, set folder and assign a new GUID |
|
DBMimeMessage(Folder oFldr,
java.lang.String sMsgGuid)
Create empty message at the given folder |
|
DBMimeMessage(MimeMessage oMsg)
Create DBMimeMessage from a MimeMessage and assign a new GUID |
|
DBMimeMessage(Session oMailSession)
Create an empty message |
|
DBMimeMessage(Session oMailSession,
java.io.InputStream oInStrm)
Create DBMimeMessage from an InputStream and assign a new GUID |
|
| Method Summary | |
|---|---|
SMTPMessage |
composeFinalMessage(Session oMailSession,
java.lang.String sSubject,
java.lang.String sBody,
java.lang.String sId,
java.lang.String sContentType)
Create an SMTPMessage object from given components using UTF-8 for text encoding Depending on what is inside, message structure is as follows : Format/AttachmentsNoYes plaintext/plainmultipart/mixed [text/plain, {attachment}] html without imagesmultipart/alternative [text/plain, text/html]multipart/mixed [multipart/alternative [text/plain, text/html], {attachment}] html with imagesmultipart/alternative [text/plain, multipart/related[text/html, {image}]]multipart/mixed [multipart/alternative [text/plain, multipart/related[text/html, {image}]], {attachment}] |
SMTPMessage |
composeFinalMessage(Session oMailSession,
java.lang.String sSubject,
java.lang.String sBody,
java.lang.String sId,
java.lang.String sContentType,
java.lang.String sEncoding)
Create an SMTPMessage object from given components Depending on what is inside, message structure is as follows : Format/AttachmentsNoYes plaintext/plainmultipart/mixed [text/plain, {attachment}] html without imagesmultipart/alternative [text/plain, text/html]multipart/mixed [multipart/alternative [text/plain, text/html], {attachment}] html with imagesmultipart/alternative [text/plain, multipart/related[text/html, {image}]]multipart/mixed [multipart/alternative [text/plain, multipart/related[text/html, {image}]], {attachment}] |
SMTPMessage |
composeFinalMessage(Session oMailSession,
java.lang.String sSubject,
java.lang.String sBody,
java.lang.String sId,
java.lang.String sContentType,
java.lang.String sEncoding,
boolean bAttachInlineImages)
Create an SMTPMessage object from given components Depending on what is inside, message structure is as follows : Format/AttachmentsNoYes plaintext/plainmultipart/mixed [text/plain, {attachment}] html without imagesmultipart/alternative [text/plain, text/html]multipart/mixed [multipart/alternative [text/plain, text/html], {attachment}] html with imagesmultipart/alternative [text/plain, multipart/related[text/html, {image}]]multipart/mixed [multipart/alternative [text/plain, multipart/related[text/html, {image}]], {attachment}] |
static void |
delete(JDCConnection oConn,
java.lang.String sFolderId,
java.lang.String sMimeMsgId)
Delete message from database This method calls stored procedure k_sp_del_mime_msg |
Address[] |
getAllRecipients()
Get message recipients This method read recipients from a message stored at k_inet_addrs table or if message is not already stored at k_inet_addrs then it delegates behaviour to parent class MimMessage.getAllRecipients() |
MimePart |
getBody()
|
java.lang.String |
getContentType()
|
Flags |
getFlags()
Get message flags Message flags are readed from k_mime_msgs table at the database |
Folder |
getFolder()
Get message folder |
DBInetAddr |
getFromRecipient()
|
static java.lang.String |
getGuidFromId(JDCConnection oConn,
java.lang.String sMsgId)
|
MimePart |
getMessageBody()
|
java.lang.String |
getMessageGuid()
Get message GUID If message had no previous GUID then a new one is assigned |
Multipart |
getParts()
Get message parts as an array of DBMimePart objects |
Address[] |
getRecipients(Message.RecipientType cTpRecipient)
Get recipients of a particular type This method first calls getAllRecipients() and then filters retrieved recipients by their type. |
java.util.Date |
getSentDate()
|
java.lang.String |
getSubject()
|
java.lang.String |
getText()
|
void |
getText(java.lang.StringBuffer oBuffer)
Get message body text into a StringBuffer |
void |
getTextPlain(java.lang.StringBuffer oBuffer)
|
void |
saveChanges()
|
void |
setFlag(Flags.Flag oFlg,
boolean bFlg)
|
void |
setFolder(Folder oFldr)
Set message folder |
void |
setMessageGuid(java.lang.String sId)
Set message GUID |
static java.lang.String |
source(MimeMessage oMsg,
java.lang.String sEncoding)
|
java.lang.String |
tagBodyHtml()
|
java.lang.String |
tagBodyPlain()
|
void |
writeTo(java.io.OutputStream oOutStrm)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final short ClassId
| Constructor Detail |
|---|
public DBMimeMessage(Session oMailSession)
oMailSession -
public DBMimeMessage(MimeMessage oMsg)
throws MessagingException
oMsg - MimeMessage
MessagingException
public DBMimeMessage(Session oMailSession,
java.io.InputStream oInStrm)
throws MessagingException
oMailSession - SessionoInStrm - InputStream
MessagingException
public DBMimeMessage(Folder oFldr,
java.io.InputStream oInStrm)
throws MessagingException,
java.lang.ClassCastException
Folder - oFldroInStrm - InputStream
MessagingException
java.lang.ClassCastException
public DBMimeMessage(Folder oFldr,
MimeMessage oMsg)
throws MessagingException
oFldr - FolderMimeMessage - oMsg
MessagingException
public DBMimeMessage(Folder oFldr,
DBMimeMessage oMsg)
throws MessagingException
Create DBMimeMessage from another DBMimeMessage
GUID of this message is set to be the same as that of oMsg
oFldr - FolderMimeMessage - oMsg
MessagingException
public DBMimeMessage(Folder oFldr,
java.lang.String sMsgGuid)
throws MessagingException
oFldr - FoldersMsgGuid - String Message GUID
MessagingException| Method Detail |
|---|
public Folder getFolder()
public void setFolder(Folder oFldr)
oFldr - Folderpublic java.lang.String getMessageGuid()
Get message GUID
If message had no previous GUID then a new one is assigned
public void setMessageGuid(java.lang.String sId)
sId - String
public Flags getFlags()
throws MessagingException
Get message flags
Message flags are readed from k_mime_msgs table at the database
MessagingException
public Address[] getAllRecipients()
throws MessagingException,
java.lang.NullPointerException,
java.lang.IllegalArgumentException
Get message recipients
This method read recipients from a message stored at k_inet_addrs table or if message is not already stored at k_inet_addrs then it delegates behaviour to parent class MimMessage.getAllRecipients()
java.sql.SQLException
MessagingException
java.lang.NullPointerException
java.lang.IllegalArgumentException
public Address[] getRecipients(Message.RecipientType cTpRecipient)
throws MessagingException
Get recipients of a particular type
This method first calls getAllRecipients() and then filters retrieved recipients by their type.
cTpRecipient - javax.mail.Message.RecipientType
MessagingException
public DBInetAddr getFromRecipient()
throws MessagingException
MessagingException
public java.lang.String getContentType()
throws MessagingException
MessagingException
public java.util.Date getSentDate()
throws MessagingException
MessagingException
public java.lang.String getSubject()
throws MessagingException
MessagingException
public MimePart getMessageBody()
throws ParseException,
MessagingException,
java.io.IOException
ParseException
MessagingException
java.io.IOException
public void setFlag(Flags.Flag oFlg,
boolean bFlg)
throws MessagingException
MessagingException
public void saveChanges()
throws MessagingException
MessagingException
public Multipart getParts()
throws MessagingException,
java.io.IOException,
java.lang.NullPointerException
MessagingException
java.io.IOException
java.lang.NullPointerException - If this message Folder is null
public MimePart getBody()
throws ParseException,
MessagingException,
java.io.IOException
ParseException
MessagingException
java.io.IOException
public void getText(java.lang.StringBuffer oBuffer)
throws MessagingException,
java.io.IOException,
java.lang.ClassCastException
oBuffer - StringBuffer
MessagingException
java.io.IOException
java.lang.ClassCastException
public java.lang.String getText()
throws MessagingException,
java.io.IOException
MessagingException
java.io.IOException
public void getTextPlain(java.lang.StringBuffer oBuffer)
throws MessagingException,
java.io.IOException
MessagingException
java.io.IOException
public void writeTo(java.io.OutputStream oOutStrm)
throws java.io.IOException,
FolderClosedException,
MessagingException
java.io.IOException
FolderClosedException
MessagingException
public java.lang.String tagBodyHtml()
throws java.io.IOException,
javax.mail.MessagingException
java.io.IOException
javax.mail.MessagingException
public java.lang.String tagBodyPlain()
throws java.io.IOException,
javax.mail.MessagingException
java.io.IOException
javax.mail.MessagingException
public SMTPMessage composeFinalMessage(Session oMailSession,
java.lang.String sSubject,
java.lang.String sBody,
java.lang.String sId,
java.lang.String sContentType,
java.lang.String sEncoding,
boolean bAttachInlineImages)
throws java.io.IOException,
MessagingException,
java.lang.IllegalArgumentException,
java.lang.ArrayIndexOutOfBoundsException,
java.lang.SecurityException
Create an SMTPMessage object from given components
Depending on what is inside, message structure is as follows :| Format/Attachments | No | Yes |
| plain | text/plain | multipart/mixed [text/plain, {attachment}] |
| html without images | multipart/alternative [text/plain, text/html] | multipart/mixed [multipart/alternative [text/plain, text/html], {attachment}] |
| html with images | multipart/alternative [text/plain, multipart/related[text/html, {image}]] | multipart/mixed [multipart/alternative [text/plain, multipart/related[text/html, {image}]], {attachment}] |
oMailSession - SessionsSubject - String Message subject or nullsBody - String Message text body or nullsId - String Contend-ID for message or nullsContentType - String should be either "plain" or "html"sEncoding - Character encoding for text
java.io.IOException
MessagingException
java.lang.SecurityException
java.lang.ArrayIndexOutOfBoundsException
java.lang.IllegalArgumentException - if sContentType is not "plain" or "html"
public SMTPMessage composeFinalMessage(Session oMailSession,
java.lang.String sSubject,
java.lang.String sBody,
java.lang.String sId,
java.lang.String sContentType,
java.lang.String sEncoding)
throws java.io.IOException,
MessagingException,
java.lang.IllegalArgumentException,
java.lang.SecurityException
Create an SMTPMessage object from given components
Depending on what is inside, message structure is as follows :| Format/Attachments | No | Yes |
| plain | text/plain | multipart/mixed [text/plain, {attachment}] |
| html without images | multipart/alternative [text/plain, text/html] | multipart/mixed [multipart/alternative [text/plain, text/html], {attachment}] |
| html with images | multipart/alternative [text/plain, multipart/related[text/html, {image}]] | multipart/mixed [multipart/alternative [text/plain, multipart/related[text/html, {image}]], {attachment}] |
oMailSession - SessionsSubject - String Message subject or nullsBody - String Message text body or nullsId - String Contend-ID for message or nullsContentType - String should be either "plain" or "html"sEncoding - Character encoding for text
java.io.IOException
MessagingException
java.lang.SecurityException
java.lang.IllegalArgumentException - if sContentType is not "plain" or "html"
public SMTPMessage composeFinalMessage(Session oMailSession,
java.lang.String sSubject,
java.lang.String sBody,
java.lang.String sId,
java.lang.String sContentType)
throws java.io.IOException,
MessagingException,
java.lang.IllegalArgumentException,
java.lang.SecurityException
Create an SMTPMessage object from given components using UTF-8 for text encoding
Depending on what is inside, message structure is as follows :| Format/Attachments | No | Yes |
| plain | text/plain | multipart/mixed [text/plain, {attachment}] |
| html without images | multipart/alternative [text/plain, text/html] | multipart/mixed [multipart/alternative [text/plain, text/html], {attachment}] |
| html with images | multipart/alternative [text/plain, multipart/related[text/html, {image}]] | multipart/mixed [multipart/alternative [text/plain, multipart/related[text/html, {image}]], {attachment}] |
oMailSession - SessionsSubject - String Message subject or nullsBody - String Message text body or nullsId - String Contend-ID for message or nullsContentType - String should be either "plain" or "html"
java.io.IOException
MessagingException
java.lang.SecurityException
java.lang.IllegalArgumentException - if sContentType is not "plain" or "html"
public static void delete(JDCConnection oConn,
java.lang.String sFolderId,
java.lang.String sMimeMsgId)
throws java.sql.SQLException,
java.io.IOException
Delete message from database
This method calls stored procedure k_sp_del_mime_msg
oConn - JDBC database connectionsFolderId - Folder GUID (k_mime_msgs.gu_category)sMimeMsgId - Message GUID (k_mime_msgs.gu_mimemsg)
java.sql.SQLException
java.io.IOException
public static java.lang.String source(MimeMessage oMsg,
java.lang.String sEncoding)
throws MessagingException,
java.io.UnsupportedEncodingException,
java.io.IOException
MessagingException
java.io.UnsupportedEncodingException
java.io.IOException
public static java.lang.String getGuidFromId(JDCConnection oConn,
java.lang.String sMsgId)
throws java.sql.SQLException
java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||