Oracle® Mail Java API Reference
10g Release 1 (10.1.1)

B14492-01

oracle.mail.sdk.esmail
Class OracleMessage

java.lang.Object
  |
  +--javax.mail.Message
        |
        +--javax.mail.internet.MimeMessage
              |
              +--oracle.mail.sdk.esmail.OracleMessage

public class OracleMessage
extends javax.mail.internet.MimeMessage

This class extends MimeMessage

Oracle Message class extends the MimeMessage class. This class enables a user to fetch data part by part from the database. The shell parser is responsible for parsing the shell for a given message and populates OracleBodyPart and OracleMultipart objects.

NOTE: The abstract Message api(s) invoke these api(s) when using this Service Provider.


Inner classes inherited from class javax.mail.internet.MimeMessage
javax.mail.internet.MimeMessage.RecipientType

Inner classes inherited from class javax.mail.Message
javax.mail.Message.RecipientType

Field Summary
static int EMAIL_TYPE
static java.lang.String FAX_MSG_TYPE
static int FAX_TYPE
static java.lang.String NEWS_MSG_TYPE
static int NEWS_TYPE
static java.lang.String TD_MSG_TYPE
static int TD_TYPE
static java.lang.String VOICE_MSG_TYPE
static int VOICE_TYPE

Constructor Summary
OracleMessage(OracleFolder aOracleFolder, int msgUid, int folderId)
Constructor
OracleMessage(OracleFolder aOracleFolder, int msgUid, int folderId, int aMsgNum)
Constructor
OracleMessage(javax.mail.Session session)
Constructor

Method Summary
static java.lang.String[] _parseValue(java.lang.String s1)
void addFrom()
Please refer to Sun Microsystems, Inc.
void addHeader(java.lang.String header_name, java.lang.String header_value)
Please refer to Sun Microsystems, Inc.
void addRecipients(javax.mail.Message.RecipientType type, javax.mail.Address[] addresses)
Please refer to Sun Microsystems, Inc.
void clear()
Method to clear the internal message objects.
void deleteMessageComment(java.lang.String commentName)
Delete the comment for the message.
void deleteMessageComments(OracleComment[] comments)
Delete the comments for a message.

java.util.Enumeration getAllHeaders()
Please refer to Sun Microsystems, Inc.
OracleComment[] getAllMessageComments(java.lang.String[] filter)
Returns the list of comments for the message as an array of OracleComment objects
java.lang.String getAuthInfo()
This is an extended api that returns the authenticated user's email address.
java.lang.String getContentID()
Please refer to Sun Microsystems, Inc.
java.lang.String[] getContentLanguage()
Please refer to Sun Microsystems, Inc.
java.lang.String getContentMD5()
Please refer to Sun Microsystems, Inc.
java.io.InputStream getContentStream()
Please refer to Sun Microsystems, Inc.
java.lang.String getContentType()
Please refer to Sun Microsystems, Inc.
javax.activation.DataHandler getDataHandler()
Please refer to Sun Microsystems, Inc.
java.lang.String getDescription()
Please refer to Sun Microsystems, Inc.
java.lang.String getDisposition()
Please refer to Sun Microsystems, Inc.
java.lang.String getEncoding()
Please refer to Sun Microsystems, Inc.
java.lang.String getFileName()
Please refer to Sun Microsystems, Inc.
void getFilteredText(java.lang.String aMimeLevel, int aFlag, boolean withBinary, char[] outBuffer)
IMT API that returns filtered text(plain text or html versions) of the message.
javax.mail.Flags getFlags()
Please refer to Sun Microsystems, Inc.
javax.mail.Folder getFolder()
Returns the folder from which this message is obtained.
javax.mail.Address[] getFrom()
Please refer to Sun Microsystems, Inc.
java.lang.String[] getHeader(java.lang.String header_name)
Please refer to Sun Microsystems, Inc.
void getHighlight(java.lang.String aMimeLevel, int aFlag, java.lang.String textQuery, boolean withBinary, int[] offsetTable, int[] lengthTable)
IMT API that returns the highlights of the message.
int getLineCount()
Please refer to Sun Microsystems, Inc.
void getMarkupText(java.lang.String aMimeLevel, int aFlag, java.lang.String textQuery, boolean withBinary, char[] outBuffer, java.lang.String tagSet, java.lang.String startTag, java.lang.String endTag, java.lang.String prevTag, java.lang.String nextTag)
IMT API that returns queried text(message or message part) of the message
java.util.Enumeration getMatchingHeaders(java.lang.String[] header_names)
Please refer to Sun Microsystems, Inc.
java.lang.String getMessageComment(java.lang.String commentName)
Returns the comment for the commentName.
java.util.Enumeration getNonMatchingHeaders(java.lang.String[] header_names)
Please refer to Sun Microsystems, Inc.
java.util.Date getReceivedDate()
Please refer to Sun Microsystems, Inc.
javax.mail.Address[] getRecipients(javax.mail.Message.RecipientType type)
javax.mail.Address[] getReplyTo()
Please refer to Sun Microsystems, Inc.
java.util.Date getSentDate()
Please refer to Sun Microsystems, Inc.
int getSize()
Please refer to Sun Microsystems, Inc.
java.lang.String getSubject()
Please refer to Sun Microsystems, Inc.
void getThemes(java.lang.String aMimeLevel, int aFlag, boolean withBinary, java.lang.String[] themes, int[] weight)
IMT API that returns the theme of a message or part of a message.
void getTokens(java.lang.String aMimeLevel, java.lang.String aLanguage, boolean withBinary, java.lang.String[] tokenList, int[] offsetList, int[] lengthList)
IMT API that returns word tokens out of a message or message part.
int getType()
API that returns the message type.
long getUid()
Retrieves the uid value for this message
boolean isSet(javax.mail.Flags.Flag flag)
Please refer to Sun Microsystems, Inc.
boolean isSet(java.lang.String flag)
Convenience method added to test for OracleFolder.OracleFlags
void removeHeader(java.lang.String header_name)
Please refer to Sun Microsystems, Inc.
void saveChanges()
Please refer to Sun Microsystems, Inc.
void setCharset(java.lang.String charset)
Method to set the charset for the message.
void setFlags(javax.mail.Flags flag, boolean set)
Please refer to Sun Microsystems, Inc.
void setHeader(java.lang.String name, java.lang.String value)
Please refer to Sun Microsystems, Inc.
void setMessageComment(java.lang.String commentName, java.lang.String commentValue)
Sets the comment for the message.
void setMessageComments(OracleComment[] comments)
Sets the comments for a message.

void setQuickOpen(boolean b)
void writeTo(java.io.OutputStream os)
Please refer to Sun Microsystems, Inc.

Methods inherited from class javax.mail.internet.MimeMessage
addFrom, addHeaderLine, addRecipients, getAllHeaderLines, getAllRecipients, getContent, getHeader, getInputStream, getMatchingHeaderLines, getMessageID, getNonMatchingHeaderLines, getRawInputStream, isMimeType, reply, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFrom, setFrom, setRecipients, setRecipients, setReplyTo, setSentDate, setSubject, setSubject, setText, setText, writeTo

Methods inherited from class javax.mail.Message
addRecipient, getMessageNumber, isExpunged, match, setFlag, setRecipient

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

VOICE_MSG_TYPE

public static final java.lang.String VOICE_MSG_TYPE

NEWS_MSG_TYPE

public static final java.lang.String NEWS_MSG_TYPE

FAX_MSG_TYPE

public static final java.lang.String FAX_MSG_TYPE

TD_MSG_TYPE

public static final java.lang.String TD_MSG_TYPE

EMAIL_TYPE

public static final int EMAIL_TYPE

VOICE_TYPE

public static final int VOICE_TYPE

FAX_TYPE

public static final int FAX_TYPE

NEWS_TYPE

public static final int NEWS_TYPE

TD_TYPE

public static final int TD_TYPE

Constructor Detail

OracleMessage

public OracleMessage(OracleFolder aOracleFolder,
                     int msgUid,
                     int folderId,
                     int aMsgNum)

Constructor

Parameters:
aOracleFolder - folder that contains the message
msgUid - UID for the message
folderId - Unique folder id for the folder
aMsgNum - message number

OracleMessage

public OracleMessage(OracleFolder aOracleFolder,
                     int msgUid,
                     int folderId)

Constructor

Parameters:
aOracleFolder - folder that contains the message
msgUid - UID for the message
folderId - Unique folder id for the folder

OracleMessage

public OracleMessage(javax.mail.Session session)

Constructor

Parameters:
session - JMA Session

Method Detail

getUid

public long getUid()
Retrieves the uid value for this message

getFolder

public javax.mail.Folder getFolder()
Returns the folder from which this message is obtained.
Overrides:
getFolder in class javax.mail.Message

addFrom

public void addFrom()
             throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
addFrom

addRecipients

public void addRecipients(javax.mail.Message.RecipientType type,
                          javax.mail.Address[] addresses)
                   throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
addRecipients in class javax.mail.internet.MimeMessage
See Also:
addRecipients

getFlags

public javax.mail.Flags getFlags()
                          throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getFlags in class javax.mail.internet.MimeMessage
See Also:
getFlags

isSet

public boolean isSet(javax.mail.Flags.Flag flag)
              throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
isSet in class javax.mail.internet.MimeMessage
See Also:
isSet

isSet

public boolean isSet(java.lang.String flag)
              throws javax.mail.MessagingException
Convenience method added to test for OracleFolder.OracleFlags

getFrom

public javax.mail.Address[] getFrom()
                             throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getFrom in class javax.mail.internet.MimeMessage
See Also:
getFrom

getReplyTo

public javax.mail.Address[] getReplyTo()
                                throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getReplyTo in class javax.mail.internet.MimeMessage
See Also:
getReplyTo

getContentID

public java.lang.String getContentID()
                              throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getContentID in class javax.mail.internet.MimeMessage
See Also:
getContentID

getContentMD5

public java.lang.String getContentMD5()
                               throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getContentMD5 in class javax.mail.internet.MimeMessage
See Also:
getContentMD5

getContentLanguage

public java.lang.String[] getContentLanguage()
                                      throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getContentLanguage in class javax.mail.internet.MimeMessage
See Also:
getContentLanguage

getReceivedDate

public java.util.Date getReceivedDate()
                               throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getReceivedDate in class javax.mail.internet.MimeMessage
See Also:
getReceivedDate

getRecipients

public javax.mail.Address[] getRecipients(javax.mail.Message.RecipientType type)
                                   throws javax.mail.MessagingException
Overrides:
getRecipients in class javax.mail.internet.MimeMessage

getSentDate

public java.util.Date getSentDate()
                           throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getSentDate in class javax.mail.internet.MimeMessage
See Also:
getSentDate

getSubject

public java.lang.String getSubject()
                            throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getSubject in class javax.mail.internet.MimeMessage
See Also:
getSubject

saveChanges

public void saveChanges()
                 throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
saveChanges in class javax.mail.internet.MimeMessage
See Also:
Message.saveChanges

getSize

public int getSize()
            throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getSize in class javax.mail.internet.MimeMessage
See Also:
Part.getSize()

getLineCount

public int getLineCount()
                 throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getLineCount in class javax.mail.internet.MimeMessage
See Also:
Part.getLineCount()

getEncoding

public java.lang.String getEncoding()
                             throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getEncoding in class javax.mail.internet.MimeMessage
See Also:
Part.getEncoding()

getContentType

public java.lang.String getContentType()
                                throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getContentType in class javax.mail.internet.MimeMessage
See Also:
Part.getContentType()

getDisposition

public java.lang.String getDisposition()
                                throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getDisposition in class javax.mail.internet.MimeMessage
See Also:
Part.getDisposition()

getDescription

public java.lang.String getDescription()
                                throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getDescription in class javax.mail.internet.MimeMessage
See Also:
Part.getDescription()

getFileName

public java.lang.String getFileName()
                             throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getFileName in class javax.mail.internet.MimeMessage
See Also:
Part.getFileName()

getContentStream

public java.io.InputStream getContentStream()
                                     throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getContentStream()

getDataHandler

public javax.activation.DataHandler getDataHandler()
                                            throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getDataHandler in class javax.mail.internet.MimeMessage
See Also:
Part.getDataHandler()

writeTo

public void writeTo(java.io.OutputStream os)
             throws java.io.IOException,
                    javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
writeTo in class javax.mail.internet.MimeMessage
See Also:
Part.writeTo()

getHeader

public java.lang.String[] getHeader(java.lang.String header_name)
                             throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getHeader in class javax.mail.internet.MimeMessage
See Also:
Part.getHeader()

setHeader

public void setHeader(java.lang.String name,
                      java.lang.String value)
               throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
setHeader in class javax.mail.internet.MimeMessage
See Also:
Part.setHeader()

addHeader

public void addHeader(java.lang.String header_name,
                      java.lang.String header_value)
               throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
addHeader in class javax.mail.internet.MimeMessage
See Also:
Part.addHeader()

removeHeader

public void removeHeader(java.lang.String header_name)
                  throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
removeHeader in class javax.mail.internet.MimeMessage
See Also:
Part.removeHeader()

getAllHeaders

public java.util.Enumeration getAllHeaders()
                                    throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getAllHeaders in class javax.mail.internet.MimeMessage
See Also:
Part.getAllHeaders()

getMatchingHeaders

public java.util.Enumeration getMatchingHeaders(java.lang.String[] header_names)
                                         throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getMatchingHeaders in class javax.mail.internet.MimeMessage
See Also:
Part.getMatchingHeaders()

getNonMatchingHeaders

public java.util.Enumeration getNonMatchingHeaders(java.lang.String[] header_names)
                                            throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
getNonMatchingHeaders in class javax.mail.internet.MimeMessage
See Also:
Part.getNonMatchingHeaders()

setFlags

public void setFlags(javax.mail.Flags flag,
                     boolean set)
              throws javax.mail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
Overrides:
setFlags in class javax.mail.internet.MimeMessage
See Also:
Message.setFlag

getAuthInfo

public java.lang.String getAuthInfo()
                             throws javax.mail.MessagingException
This is an extended api that returns the authenticated user's email address. The auth info is used to determine if an authenticated user has sent this message.

getThemes

public void getThemes(java.lang.String aMimeLevel,
                      int aFlag,
                      boolean withBinary,
                      java.lang.String[] themes,
                      int[] weight)
IMT API that returns the theme of a message or part of a message. Uses OracleText api(s) on the message content to generate a list of themes.
Parameters:
aMsgId - msg_id for the message to work on
aMimeLevel - Mime level of part, if null 0
aFlag - flag
withBinary - flag
themes - list of themes for message
weight - weight

getHighlight

public void getHighlight(java.lang.String aMimeLevel,
                         int aFlag,
                         java.lang.String textQuery,
                         boolean withBinary,
                         int[] offsetTable,
                         int[] lengthTable)
IMT API that returns the highlights of the message. This api gets the positions of the queried text in a message or a message part
Parameters:
aMsgId - message id for the message to work on
aMimeLevel - Mime level of part, if null 0
aFlag - flag
textQuery - text for query
withBinary - flag
offsetTable - offsets
lengthTable - length table
Returns:
void

getFilteredText

public void getFilteredText(java.lang.String aMimeLevel,
                            int aFlag,
                            boolean withBinary,
                            char[] outBuffer)
IMT API that returns filtered text(plain text or html versions) of the message.
Parameters:
aMsgId - message id for the message to work on
aMimeLevel - Mime level of part, if null 0
aFlag - flag
outBuffer - represented as CLOB
Returns:
void

getMarkupText

public void getMarkupText(java.lang.String aMimeLevel,
                          int aFlag,
                          java.lang.String textQuery,
                          boolean withBinary,
                          char[] outBuffer,
                          java.lang.String tagSet,
                          java.lang.String startTag,
                          java.lang.String endTag,
                          java.lang.String prevTag,
                          java.lang.String nextTag)
IMT API that returns queried text(message or message part) of the message
Parameters:
aMimeLevel - Mime level of part, if null 0
aFlag - flag
textQuery - query text
withBinary - flag
outBuffer - represented as CLOB
tagSet - set of tags
startTag - start tag
endTag - end tag
prevTag - previous tag
nextTag - next tag
Returns:
void

getTokens

public void getTokens(java.lang.String aMimeLevel,
                      java.lang.String aLanguage,
                      boolean withBinary,
                      java.lang.String[] tokenList,
                      int[] offsetList,
                      int[] lengthList)
IMT API that returns word tokens out of a message or message part.
Parameters:
aMimeLevel - Mime level of part, if null 0
aLanguage - language
tokenList - tokens
offsetList - list of offsets
lengthList - length
Returns:
void

getType

public int getType()
API that returns the message type. Returns OracleMessage.EMAIL_TYPE, OracleMessage.VOICE_TYPE, OracleMessage.FAX_TYPE or OracleMessage.NEWS_TYPE
Returns:
the message type

getMessageComment

public java.lang.String getMessageComment(java.lang.String commentName)
                                   throws javax.mail.MessagingException
Returns the comment for the commentName.
Parameters:
commentName - - key for comment
Throws:
javax.mail.MessagingException - when no comment found

getAllMessageComments

public OracleComment[] getAllMessageComments(java.lang.String[] filter)
                                      throws javax.mail.MessagingException
Returns the list of comments for the message as an array of OracleComment objects
Throws:
javax.mail.MessagingException - when no comment found

setMessageComment

public void setMessageComment(java.lang.String commentName,
                              java.lang.String commentValue)
                       throws javax.mail.MessagingException
Sets the comment for the message.
Parameters:
commentName - - key for comment
commentValue - - value for comment
Throws:
javax.mail.MessagingException - when no comment found

setMessageComments

public void setMessageComments(OracleComment[] comments)
                        throws javax.mail.MessagingException
Sets the comments for a message.

Parameters:
comments - - Array of OracleComments

_parseValue

public static java.lang.String[] _parseValue(java.lang.String s1)

clear

public void clear()

Method to clear the internal message objects.


setQuickOpen

public void setQuickOpen(boolean b)

setCharset

public void setCharset(java.lang.String charset)

Method to set the charset for the message. The charset is expected as IANA standard charset.


deleteMessageComments

public void deleteMessageComments(OracleComment[] comments)
                           throws javax.mail.MessagingException
Delete the comments for a message.

Parameters:
comments - - Array of OracleComments

deleteMessageComment

public void deleteMessageComment(java.lang.String commentName)
                          throws javax.mail.MessagingException
Delete the comment for the message.
Parameters:
commentName - - key for comment
Throws:
javax.mail.MessagingException - when no comment found

Oracle® Mail Java API Reference
10g Release 1 (10.1.1)

B14492-01

Copyright © 1988, 2005, Oracle. All rights reserved.