| com.knowgate.hipermail.DBMimeMessage
DBMimeMessage | public class DBMimeMessage extends MimeMessage implements MimePart,Part(Code) | | MIME messages stored at database BLOB columns or MBOX files
author: Sergio Montoro Ten version: 2.2 |
Field Summary | |
final public static short | ClassId |
ClassId | final public static short ClassId(Code) | | |
DBMimeMessage | public DBMimeMessage(Session oMailSession)(Code) | | Create an empty message
Parameters: oMailSession - |
DBMimeMessage | public DBMimeMessage(MimeMessage oMsg) throws MessagingException(Code) | | Create DBMimeMessage from a MimeMessage and assign a new GUID
Parameters: oMsg - MimeMessage throws: MessagingException - |
DBMimeMessage | public DBMimeMessage(Session oMailSession, InputStream oInStrm) throws MessagingException(Code) | | Create DBMimeMessage from an InputStream and assign a new GUID
Parameters: oMailSession - Session Parameters: oInStrm - InputStream throws: MessagingException - |
DBMimeMessage | public DBMimeMessage(Folder oFldr, InputStream oInStrm) throws MessagingException, ClassCastException(Code) | | Create DBMimeMessage from an InputStream, set folder and assign a new GUID
Parameters: Folder - oFldr Parameters: oInStrm - InputStream throws: MessagingException - |
DBMimeMessage | public DBMimeMessage(Folder oFldr, MimeMessage oMsg) throws MessagingException(Code) | | Create DBMimeMessage from a MimeMessage, set folder and assign a new GUID
Parameters: oFldr - Folder Parameters: MimeMessage - oMsg throws: MessagingException - |
DBMimeMessage | public DBMimeMessage(Folder oFldr, DBMimeMessage oMsg) throws MessagingException(Code) | | Create DBMimeMessage from another DBMimeMessage
GUID of this message is set to be the same as that of oMsg
Parameters: oFldr - Folder Parameters: MimeMessage - oMsg throws: MessagingException - |
DBMimeMessage | public DBMimeMessage(Folder oFldr, String sMsgGuid) throws MessagingException(Code) | | Create empty message at the given folder
Parameters: oFldr - Folder Parameters: sMsgGuid - String Message GUID throws: MessagingException - |
composeFinalMessage | public SMTPMessage composeFinalMessage(Session oMailSession, String sSubject, String sBody, String sId, String sContentType) throws IOException, MessagingException, IllegalArgumentException, SecurityException(Code) | | 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}] |
Parameters: oMailSession - Session Parameters: sSubject - String Message subject or null Parameters: sBody - String Message text body or null Parameters: sId - String Contend-ID for message or null Parameters: sContentType - String should be either "plain" or "html" SMTPMessage throws: IOException - throws: MessagingException - throws: SecurityException - throws: IllegalArgumentException - if sContentType is not "plain" or "html" |
delete | public static void delete(JDCConnection oConn, String sFolderId, String sMimeMsgId) throws SQLException, IOException(Code) | | Delete message from database
This method calls stored procedure k_sp_del_mime_msg
Parameters: oConn - JDBC database connection Parameters: sFolderId - Folder GUID (k_mime_msgs.gu_category) Parameters: sMimeMsgId - Message GUID (k_mime_msgs.gu_mimemsg) throws: SQLException - |
getAllRecipients | public Address[] getAllRecipients() throws MessagingException, NullPointerException, IllegalArgumentException(Code) | | 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()
If this message is stored at the database then this method returnsan array of DBInetAddr objects. If this message has not been stored yet thenthis method returns an array of javax.mail.internet.InternetAddress objects throws: MessagingException - throws: NullPointerException - throws: IllegalArgumentException - |
getBody | public MimePart getBody() throws ParseException, MessagingException, IOException(Code) | | |
getContentType | public String getContentType() throws MessagingException(Code) | | |
getFlags | public Flags getFlags() throws MessagingException(Code) | | Get message flags
Message flags are readed from k_mime_msgs table at the database
Flags throws: MessagingException - |
getFolder | public Folder getFolder()(Code) | | Get message folder
Folder |
getFromRecipient | public DBInetAddr getFromRecipient() throws MessagingException(Code) | | |
getMessageBody | public MimePart getMessageBody() throws ParseException, MessagingException, IOException(Code) | | |
getMessageGuid | public String getMessageGuid()(Code) | | Get message GUID
If message had no previous GUID then a new one is assigned
String |
getParts | public Multipart getParts() throws MessagingException, IOException, NullPointerException(Code) | | Get message parts as an array of DBMimePart objects
DBMimeMultiPart if this message folder is of type DBFolderor another type of Object if this message folder is another subclass of javax.mail.Foldersuch as POP3Folder. throws: MessagingException - throws: IOException - throws: NullPointerException - If this message Folder is null |
getRecipients | public Address[] getRecipients(Message.RecipientType cTpRecipient) throws MessagingException(Code) | | Get recipients of a particular type
This method first calls getAllRecipients() and then filters retrieved recipients by their type.
Parameters: cTpRecipient - javax.mail.Message.RecipientType Address[] throws: MessagingException - |
getSentDate | public Date getSentDate() throws MessagingException(Code) | | |
getSubject | public String getSubject() throws MessagingException(Code) | | |
saveChanges | public void saveChanges() throws MessagingException(Code) | | |
setFlag | public void setFlag(Flags.Flag oFlg, boolean bFlg) throws MessagingException(Code) | | |
setFolder | public void setFolder(Folder oFldr)(Code) | | Set message folder
Parameters: oFldr - Folder |
setMessageGuid | public void setMessageGuid(String sId)(Code) | | Set message GUID
Parameters: sId - String |
|
|