Oracle Email Java API Reference
Release 2(9.0.4)

B10724-01

oracle.mail.sdk.esmail
Class OracleMessage

oracle.mail.sdk.esmail.OracleMessage

public class OracleMessage

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.

Version:
1.0, 2001/03/21

Field Summary
static int EMAIL_TYPE
           
static int FAX_TYPE
           
static int NEWS_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(oracle.mail.sdk.esmail.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, oracle.mail.sdk.esmail.Address[] addresses)
          Please refer to Sun Microsystems, Inc.
 void clear()
           Method to clear the internal message objects.
 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.
 oracle.mail.sdk.esmail.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.
 oracle.mail.sdk.esmail.Flags getFlags()
          Please refer to Sun Microsystems, Inc.
 oracle.mail.sdk.esmail.Folder getFolder()
          Returns the folder from which this message is obtained.
 oracle.mail.sdk.esmail.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.
 oracle.mail.sdk.esmail.Address[] getRecipients(javax.mail.Message.RecipientType type)
           
 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
 void removeHeader(java.lang.String header_name)
          Please refer to Sun Microsystems, Inc.
 void saveChanges()
          Please refer to Sun Microsystems, Inc.
 void setFlags(oracle.mail.sdk.esmail.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 writeTo(java.io.OutputStream os)
          Please refer to Sun Microsystems, Inc.

 

Field Detail

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
Constructor Detail

OracleMessage

public OracleMessage(OracleFolder aOracleFolder,
                     int msgUid,
                     int folderId,
                     int aMsgNum)
              throws oracle.mail.sdk.esmail.MessagingException

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)
              throws oracle.mail.sdk.esmail.MessagingException

Constructor

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

OracleMessage

public OracleMessage(oracle.mail.sdk.esmail.Session session)

Constructor

Parameters:
session - JMA Session
Method Detail

getUid

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

getFolder

public oracle.mail.sdk.esmail.Folder getFolder()
Returns the folder from which this message is obtained.

addFrom

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

addRecipients

public void addRecipients(javax.mail.Message.RecipientType type,
                          oracle.mail.sdk.esmail.Address[] addresses)
                   throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
addRecipients

getFlags

public oracle.mail.sdk.esmail.Flags getFlags()
                                      throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
getFlags

getFrom

public oracle.mail.sdk.esmail.Address[] getFrom()
                                         throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
getFrom

getContentID

public java.lang.String getContentID()
                              throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
getContentID

getContentMD5

public java.lang.String getContentMD5()
                               throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
getContentID

getContentLanguage

public java.lang.String[] getContentLanguage()
                                      throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
getContentID

getReceivedDate

public java.util.Date getReceivedDate()
                               throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
getReceivedDate

getRecipients

public oracle.mail.sdk.esmail.Address[] getRecipients(javax.mail.Message.RecipientType type)
                                               throws oracle.mail.sdk.esmail.MessagingException

getSentDate

public java.util.Date getSentDate()
                           throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
getSentDate

getSubject

public java.lang.String getSubject()
                            throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
getSubject

saveChanges

public void saveChanges()
                 throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Message.saveChanges

getSize

public int getSize()
            throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getSize()

getLineCount

public int getLineCount()
                 throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getLineCount()

getEncoding

public java.lang.String getEncoding()
                             throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getEncoding()

getContentType

public java.lang.String getContentType()
                                throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getContentType()

getDisposition

public java.lang.String getDisposition()
                                throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getDisposition()

getDescription

public java.lang.String getDescription()
                                throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getDescription()

getFileName

public java.lang.String getFileName()
                             throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getFileName()

getContentStream

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

getDataHandler

public oracle.mail.sdk.esmail.DataHandler getDataHandler()
                                                  throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getDataHandler()

writeTo

public void writeTo(java.io.OutputStream os)
             throws java.io.IOException,
                    oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.writeTo()

getHeader

public java.lang.String[] getHeader(java.lang.String header_name)
                             throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getHeader()

setHeader

public void setHeader(java.lang.String name,
                      java.lang.String value)
               throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.setHeader()

addHeader

public void addHeader(java.lang.String header_name,
                      java.lang.String header_value)
               throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.addHeader()

removeHeader

public void removeHeader(java.lang.String header_name)
                  throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.removeHeader()

getAllHeaders

public java.util.Enumeration getAllHeaders()
                                    throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getAllHeaders()

getMatchingHeaders

public java.util.Enumeration getMatchingHeaders(java.lang.String[] header_names)
                                         throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getMatchingHeaders()

getNonMatchingHeaders

public java.util.Enumeration getNonMatchingHeaders(java.lang.String[] header_names)
                                            throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Part.getNonMatchingHeaders()

setFlags

public void setFlags(oracle.mail.sdk.esmail.Flags flag,
                     boolean set)
              throws oracle.mail.sdk.esmail.MessagingException
Please refer to Sun Microsystems, Inc. Javamail API documentation.
See Also:
Message.setFlag

getAuthInfo

public java.lang.String getAuthInfo()
                             throws oracle.mail.sdk.esmail.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 oracle.mail.sdk.esmail.MessagingException
Returns the comment for the commentName.
Parameters:
commentName - - key for comment
Throws:
oracle.mail.sdk.esmail.MessagingException - when no comment found

getAllMessageComments

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

setMessageComment

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

setMessageComments

public void setMessageComments(OracleComment[] comments)
                        throws oracle.mail.sdk.esmail.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.


Oracle Email Java API Reference
Release 2(9.0.4)

B10724-01

Copyright © 1988, 2003 Oracle Corporation. All Rights Reserved.