Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.exchange
Class Message

    java.lang.Object
      com.compoze.exchange.AbstractItem
          com.compoze.exchange.Message

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  Appointment, Contact, DistributionList, Journal, MeetingCancellation, MeetingRequest, MeetingResponse, Task, UndeliverableMessage

public class Message
extends AbstractItem
implements java.io.Serializable

This class is an Exchange message. Message instances are obtained either from the `Folder` class using one of its `server*Messages` methods, or from the `Messages` class. Methods that access properties on the class require that the properties were loaded beforehand, when the message was initially retrieved. Any methods in this class that begin with the string `server` make a query to the server, and require that the `PropertyKey.MESSAGE_ID` be loaded beforehand. In order for the correct class of message to be instantiated, the `PropertyKey.MESSAGE_TYPE` property must also be requested. Any additional property requirements are indicated on each individual method.

See Also:
  Serialized Form

Field Summary
`static PropertyKey[]` | `ALL_PROPS` Contains an array of all of the properties available on a message.

Fields inherited from class com.compoze.exchange.AbstractItem
`m_props, m_session`

Method Summary
`ActionStatus` | `getActionStatus()` Gets the action status of the message.
`int` | `getAttachmentCount()` Gets the number of attachments on the message.
`AttachmentInfo` | `getAttachmentInfo(int iIndex)` Gets the attachment info for the specified index.
`AttachmentInfo[]` | `getAttachmentInfoArray()` Gets information about the attachments on the message.
`java.lang.String[]` | `getCategories()` Gets the categories of the message.
`java.lang.String` | `getConversationIndex()` Gets the conversation index of the message.
`java.lang.String` | `getConversationTopic()` Gets the conversation topic of the message.
`boolean` | `getDeliveryReceipt()` Gets the delivery receipt flag.
`boolean` | `getEncrypted()` Gets the encrypted flag.
`FlagStatus` | `getFlagStatus()` Gets the flag status for the message.
`java.lang.String` | `getFlagText()` Gets the flag text for the message.
`java.lang.String` | `getFolderID()` Gets the ID of the folder that the message is in.
`java.lang.String` | `getFolderName()` Gets the name of the folder that the message is in.
`java.lang.String` | `getHtml()` Gets the HTML body.
`java.lang.String` | `getHtml(boolean bBodyOnly, IEmbeddedImageListener listener)` Gets the HTML body.
`java.lang.String` | `getID()` Gets the ID of the message.
`Importance` | `getImportance()` Gets the importance of the message.
`MessageType` | `getMessageType()` Gets the type of the message.
`java.lang.String` | `getNormalizedSubject()` Gets the normalized subject of the message (without RE:, FWD:, etc).
`boolean` | `getReadReceipt()` Gets the read receipt for the message.
`RecipientInfo` | `getRecipientInfo(int iIndex)` Gets information about the specified recipient.
`RecipientInfo[]` | `getRecipientInfoArray()` Gets information about the recipients of the message.
`java.lang.String` | `getRichTextFormat()` Gets the rich text format property of the message.
`java.lang.String` | `getRichTextFormatAsHtml()` Gets the rich text format property of the message as HTML.
`java.lang.String` | `getRichTextFormatAsHtml(boolean bBodyOnly, IEmbeddedImageListener listener)` Gets the rich text format property of the message as HTML.
`java.lang.String` | `getRichTextFormatAsPlain()` Retrieves the rich text format from a message and extracts the plain text from it.
`AddressEntryInfo` | `getSender()` Gets information about the sender of the message.
`java.lang.String` | `getSenderName()` Gets the true display name of the sender.
`Sensitivity` | `getSensitivity()` Gets the sensitivity for the message.
`boolean` | `getSent()` Gets the sent flag for the message.
`boolean` | `getSigned()` Gets the signed flag for the message.
`int` | `getSize()` Gets the size of the message.
`java.lang.String` | `getStoreID()` Gets the ID of the store that the message is in.
`java.lang.String` | `getSubject()` Gets the subject of the message.
`java.lang.String` | `getSubject(int iLength)` Gets the subject of the message.
`boolean` | `getSubmitted()` Gets the submitted flag of the message.
`java.lang.String` | `getText()` Gets the text property of the message.
`java.util.Date` | `getTimeCreated()` Gets the time that the message was created.
`java.util.Date` | `getTimeExpired()` Gets the time that the message expired.
`java.util.Date` | `getTimeLastModified()` Gets the time that the message was last modified.
`java.util.Date` | `getTimeReceived()` Gets the time that the message was received.
`java.lang.String` | `getTimeReceivedString(java.text.DateFormat dateFormat)` Gets the time that the message was received formatted to the specified date format.
`java.util.Date` | `getTimeSent()` Gets the time that the message was sent.
`boolean` | `getUnread()` Gets the unread flag for the message.
`boolean` | `hasAttachment()` Checks if the message has at least one attachment.
`int` | `serverAddAttachment(AttachmentType attachmentType, java.lang.String sName, java.lang.String sSource, int iPosition, javax.activation.DataHandler handler)` Hits the server to add an attachment to a message.
`void` | `serverCopyTo(java.lang.String sFolderID)` Hits the server to copy the message to another folder.
`void` | `serverDelete()` Hits the server to delete the message (the message is removed permanently, and not moved into deleted items).
`void` | `serverDelete(boolean bDeletedItems)` Hits the server to delete the message.
`void` | `serverDeleteAttachment(int iIndex)` Hits the server to delete an attachment from a message.
`javax.activation.DataHandler` | `serverGetAttachment(int iIndex)` Queries the server to get the specified attachment data handler.
`Attachment[]` | `serverGetAttachments(PropertyKey[] attachmentKeys)` Hits the server to get attachment information for a message.
`void` | `serverMoveTo(DefaultFolderType folderType)` Hits the server to move the specified messages to another folder.
`void` | `serverMoveTo(java.lang.String sFolderID)` Hits the server to move the message to another folder.
`UnresolvedRecipient[]` | `serverResolveRecipients(boolean bRemove)` Hits the server to resolve recipients for the message.
`void` | `serverUpdate()` Hits the server to update any changed properties.
`void` | `serverUpdate(Recipient[] recipients, boolean bSend, boolean bSaveInSent)` Hits the server to update any changed properties.
`void` | `serverUpdate(Recipient[] recipients, int[] deleteRecipients, boolean bSend, boolean bSaveInSent)` Hits the server to update any changed properties.
`void` | `setActionStatus(ActionStatus actionStatus)` Sets an action status for a message.
`void` | `setCategories(java.lang.String[] categories)` Sets the categories of the message.
`void` | `setConversationIndex(java.lang.String sIndex)` Sets the conversation index of the message.
`void` | `setConversationTopic(java.lang.String sTopic)` Sets the conversation topic of the message.
`void` | `setDeliveryReceipt(boolean bFlag)` Sets the delivery receipt flag.
`void` | `setEncrypted(boolean bEncrypted)` Sets the encrypted flag.
`void` | `setFlagStatus(FlagStatus status)` Sets the flag status for the message.
`void` | `setFlagText(FlagText text)` Sets the flag text for the message.
`void` | `setFlagText(java.lang.String sText)` Sets the flag text for the message.
`void` | `setHtml(java.lang.String sHtml)` Sets the HTML body of the message.
`void` | `setImportance(Importance importance)` Sets the importance of the message.
`void` | `setMessageType(MessageType type)` Sets the type of the message.
`void` | `setReadReceipt(boolean bReadReceipt)` Sets the read receipt for the message.
`void` | `setRichTextFormat(java.lang.String sRichText)` Gets the rich text format property of the message.
`void` | `setSender(AddressEntry addressEntry)` Sets the sender of the message.
`void` | `setSensitivity(Sensitivity sensitivity)` Sets the sensitivity of the message.
`void` | `setSent(boolean bSent)` Sets the sent flag for the message.
`void` | `setSigned(boolean bSigned)` Sets the signed flag for the message.
`void` | `setSubject(java.lang.String sSubject)` Sets the subject of the message.
`void` | `setSubmitted(boolean bSubmitted)` Sets the submitted flag of the message.
`void` | `setText(java.lang.String sText)` Sets the text property of the message.
`void` | `setTimeExpired(java.util.Date timeExpired)` Sets the time that the message expired.
`void` | `setTimeReceived(java.util.Date timeReceived)` Sets the time that the message was received.
`void` | `setTimeSent(java.util.Date timeSent)` Sets the time that the message was sent.
`void` | `setUnread(boolean bUnread)` Sets the unread flag for the message.
`java.lang.String` | `toString()` Returns the string representation of the message.

Methods inherited from class com.compoze.exchange.AbstractItem
`get, getBoolean, getByteArray, getDate, getDouble, getInt, getInvalidPropertyValues, getPropertyKeys, getString, getStringArray, getUpdatedPropertyValues, set, setBoolean, setByteArray, setDate, setDouble, setInt, setString, setStringArray`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ALL_PROPS

    public static final PropertyKey[] ALL_PROPS

  Contains an array of all of the properties available on a message. Although this can be used when specifying property keys to retrieve, it's preferable to only specify the keys that are required as the number of properties that are pulled back from the server has a direct impact on performance.

Method Detail

### getSenderName

    public java.lang.String getSenderName()
                                   throws ExchangeException

  Gets the true display name of the sender.

  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.SENT_REPRESENTING_NAME`

### getAttachmentInfoArray

    public AttachmentInfo[] getAttachmentInfoArray()
                                            throws ExchangeException

  Gets information about the attachments on the message.

  Returns:
    an array of `AttachmentInfo` objects, or an empty array if there are no attachments
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_ATTACHMENT_INFO`

### getRecipientInfoArray

    public RecipientInfo[] getRecipientInfoArray()
                                          throws ExchangeException

  Gets information about the recipients of the message. `NOTE:` Two different properties can be used to retrieve the recipient info, `MESSAGE_RECIPIENT_INFO` and `MESSAGE_RECIPIENT_INFO_OVERVIEW`. The overview property contains a subset of the recipient information (only display name, index and recipient type), and requires significantly less processing time.

  Returns:
    an array of `RecipientInfo` objects, or an empty array if there are no recipients
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_RECIPIENT_INFO`, `PropertyKey.MESSAGE_RECIPIENT_INFO_OVERVIEW`

### getSender

    public AddressEntryInfo getSender()
                               throws ExchangeException

  Gets information about the sender of the message.

  Returns:
    the sender, or `null` if not available
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SENDER`

### setSender

    public void setSender(AddressEntry addressEntry)
                   throws ExchangeException

  Sets the sender of the message.

  Parameters:
    `addressEntry` - the address entry of the sender
  Throws:
    `ExchangeException` - the address entry id must be available

### getRecipientInfo

    public RecipientInfo getRecipientInfo(int iIndex)
                                   throws ExchangeException

  Gets information about the specified recipient. `NOTE:` Two different properties can be used to retrieve the recipient info, `MESSAGE_RECIPIENT_INFO` and `MESSAGE_RECIPIENT_INFO_OVERVIEW`. The overview property contains a subset of the recipient information (only display name, index and recipient type), and requires significantly less processing time. Index values start at `1`.

  Parameters:
    `iIndex` - the index of the recipient in the recipients collection of the message
  Returns:
    the recipient info or `null` if not found
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_RECIPIENT_INFO`, `PropertyKey.MESSAGE_RECIPIENT_INFO_OVERVIEW`

### getAttachmentCount

    public int getAttachmentCount()
                           throws ExchangeException

  Gets the number of attachments on the message.

  Returns:
    the number of attachments
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_ATTACHMENT_COUNT`

### hasAttachment

    public boolean hasAttachment()
                          throws ExchangeException

  Checks if the message has at least one attachment.

  Returns:
    `true` if the message has at least one attachment; `false` otherwise
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_ATTACHMENT_COUNT`

### getCategories

    public java.lang.String[] getCategories()
                                     throws ExchangeException

  Gets the categories of the message.

  Returns:
    the categories
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_CATEGORIES`

### setCategories

    public void setCategories(java.lang.String[] categories)
                       throws ExchangeException

  Sets the categories of the message.

  Parameters:
    `categories` - the categories
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_CATEGORIES`

### getConversationIndex

    public java.lang.String getConversationIndex()
                                          throws ExchangeException

  Gets the conversation index of the message.

  Returns:
    the conversation index
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_CONVERSATION_INDEX`

### setConversationIndex

    public void setConversationIndex(java.lang.String sIndex)
                              throws ExchangeException

  Sets the conversation index of the message.

  Parameters:
    `sIndex` - the conversation index
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_CONVERSATION_INDEX`

### getConversationTopic

    public java.lang.String getConversationTopic()
                                          throws ExchangeException

  Gets the conversation topic of the message.

  Returns:
    the conversation topic
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_CONVERSATION_TOPIC`

### setConversationTopic

    public void setConversationTopic(java.lang.String sTopic)
                              throws ExchangeException

  Sets the conversation topic of the message.

  Parameters:
    `sTopic` - the conversation topic
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_CONVERSATION_TOPIC`

### getDeliveryReceipt

    public boolean getDeliveryReceipt()
                               throws ExchangeException

  Gets the delivery receipt flag.

  Returns:
    `true` to request a delivery receipt; `false` otherwise
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_DELIVERY_RECEIPT`

### setDeliveryReceipt

    public void setDeliveryReceipt(boolean bFlag)
                            throws ExchangeException

  Sets the delivery receipt flag.

  Parameters:
    `bFlag` - `true` to request a delivery receipt; `false` otherwise
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_DELIVERY_RECEIPT`

### getEncrypted

    public boolean getEncrypted()
                         throws ExchangeException

  Gets the encrypted flag.

  Returns:
    the flag
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_ENCRYPTED`

### setEncrypted

    public void setEncrypted(boolean bEncrypted)
                      throws ExchangeException

  Sets the encrypted flag.

  Parameters:
    `bEncrypted` - the encrypted flag
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_ENCRYPTED`

### getFolderID

    public java.lang.String getFolderID()
                                 throws ExchangeException

  Gets the ID of the folder that the message is in.

  Returns:
    the ID
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_FOLDERID`

### getFolderName

    public java.lang.String getFolderName()
                                   throws ExchangeException

  Gets the name of the folder that the message is in.

  Throws:
    `ExchangeException`

### getID

    public java.lang.String getID()
                           throws ExchangeException

  Gets the ID of the message.

  Returns:
    the ID
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_ID`

### getImportance

    public Importance getImportance()
                             throws ExchangeException

  Gets the importance of the message.

  Returns:
    the importance or `null` if not available
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_IMPORTANCE`

### setImportance

    public void setImportance(Importance importance)
                       throws ExchangeException

  Sets the importance of the message.

  Parameters:
    `importance` - the importance of the message (may not be `null`)
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_IMPORTANCE`

### getReadReceipt

    public boolean getReadReceipt()
                           throws ExchangeException

  Gets the read receipt for the message.

  Returns:
    `true` to request a read receipt; `false` otherwise
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_READ_RECEIPT`

### setReadReceipt

    public void setReadReceipt(boolean bReadReceipt)
                        throws ExchangeException

  Sets the read receipt for the message.

  Parameters:
    `bReadReceipt` - `true` to request a read receipt; `false` otherwise
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_READ_RECEIPT`

### getSensitivity

    public Sensitivity getSensitivity()
                               throws ExchangeException

  Gets the sensitivity for the message.

  Returns:
    the sensitivity or `null` if not set
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SENSITIVITY`

### setSensitivity

    public void setSensitivity(Sensitivity sensitivity)
                        throws ExchangeException

  Sets the sensitivity of the message.

  Parameters:
    `sensitivity` - the sensitivity (may not be `null`)
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SENSITIVITY`

### getSent

    public boolean getSent()
                    throws ExchangeException

  Gets the sent flag for the message.

  Returns:
    the sent flag
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SENT`

### setSent

    public void setSent(boolean bSent)
                 throws ExchangeException

  Sets the sent flag for the message.

  Parameters:
    `bSent` - the sent flag
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SENT`

### getSigned

    public boolean getSigned()
                      throws ExchangeException

  Gets the signed flag for the message.

  Returns:
    the signed flag
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SIGNED`

### setSigned

    public void setSigned(boolean bSigned)
                   throws ExchangeException

  Sets the signed flag for the message.

  Parameters:
    `bSigned` - the signed flag
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SIGNED`

### getSize

    public int getSize()
                throws ExchangeException

  Gets the size of the message.

  Returns:
    the size of the message
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SIZE`

### getStoreID

    public java.lang.String getStoreID()
                                throws ExchangeException

  Gets the ID of the store that the message is in.

  Returns:
    the ID
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_STOREID`

### getSubject

    public java.lang.String getSubject()
                                throws ExchangeException

  Gets the subject of the message.

  Returns:
    the subject or `null` for no subject
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SUBJECT`

### getNormalizedSubject

    public java.lang.String getNormalizedSubject()
                                          throws ExchangeException

  Gets the normalized subject of the message (without RE:, FWD:, etc).

  Returns:
    the normalized subject or `null` for no subject
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SUBJECT`

### getSubject

    public java.lang.String getSubject(int iLength)
                                throws ExchangeException

  Gets the subject of the message. The subject is truncated after the specified number of characters and "..." is appended to it.

  Parameters:
    `iLength` - the maximum length of the result (string plus "...")
  Returns:
    the truncated subject of the message or `null` if for no subject
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SUBJECT`

### setSubject

    public void setSubject(java.lang.String sSubject)
                    throws ExchangeException

  Sets the subject of the message.

  Parameters:
    `sSubject` - the subject
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SUBJECT`

### getSubmitted

    public boolean getSubmitted()
                         throws ExchangeException

  Gets the submitted flag of the message.

  Returns:
    the submitted flag
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SUBMITTED`

### setSubmitted

    public void setSubmitted(boolean bSubmitted)
                      throws ExchangeException

  Sets the submitted flag of the message.

  Parameters:
    `bSubmitted` - the submitted flag
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_SUBMITTED`

### getText

    public java.lang.String getText()
                             throws ExchangeException

  Gets the text property of the message.

  Returns:
    the text
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TEXT`

### setHtml

    public void setHtml(java.lang.String sHtml)
                 throws ExchangeException

  Sets the HTML body of the message. HTML bodies are technically supported by Exchange 2000 and higher. This method checks the version of Exchange, and if HTML is not supported, then it converts the HTML to RTF and sets that instead.

  Parameters:
    `sHtml` - the HTML string
  Throws:
    `ExchangeException` - if the HTML could not be set

### getHtml

    public java.lang.String getHtml()
                             throws ExchangeException

  Gets the HTML body. Follows the same requirements as `getHtml(boolean, IEmbeddedImageListener)`.

  Returns:
    the HTML string, if available
  Throws:
    `ExchangeException` - if there was an error getting the HTML body

### getHtml

    public java.lang.String getHtml(boolean bBodyOnly,
                                    IEmbeddedImageListener listener)
                             throws ExchangeException

  Gets the HTML body. The caller should check whether or not the session is to an Exchange 5.5 server. If it is, then RTF should be used as HTML is likely not on the message. Requires the keys in See Also.

  Parameters:
    `bBodyOnly` - `true` to return the body only
  Returns:
    the HTML string, if available
  Throws:
    `ExchangeException` - if there was an error getting the HTML body
  See Also:
    `PropertyKey.MESSAGE_HTML`, `PropertyKey.SESSION_OPTION_EXCHANGE55`

### setRichTextFormat

    public void setRichTextFormat(java.lang.String sRichText)
                           throws ExchangeException

  Gets the rich text format property of the message. If the rich text property is set, the text property is overridden. Therefore, do not set this property if you want the message to be sent only as plain text.

  Parameters:
    `sRichText` - rich text for the message (must be in RTF format)
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_RTF`

### getRichTextFormat

    public java.lang.String getRichTextFormat()
                                       throws ExchangeException

  Gets the rich text format property of the message.

  Returns:
    the rich text format
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_RTF`

### getRichTextFormatAsHtml

    public java.lang.String getRichTextFormatAsHtml()
                                             throws ExchangeException

  Gets the rich text format property of the message as HTML.

  Returns:
    the rich text format as HTML
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_RTF`

### getRichTextFormatAsHtml

    public java.lang.String getRichTextFormatAsHtml(boolean bBodyOnly,
                                                    IEmbeddedImageListener listener)
                                             throws ExchangeException

  Gets the rich text format property of the message as HTML.

  Parameters:
    `bBodyOnly` - set to `true` to return only the content of the message between `<BODY>` and `</BODY>` tags tags
    `listener` - the embedded (inline) link creator is defined; pass `null` to ignore inline image tags
  Returns:
    the rich text format as html
  Throws:
    `ExchangeException`

### getRichTextFormatAsPlain

    public java.lang.String getRichTextFormatAsPlain()
                                              throws ExchangeException

  Retrieves the rich text format from a message and extracts the plain text from it.

  Returns:
    the plain text body
  Throws:
    `ExchangeException`

### setText

    public void setText(java.lang.String sText)
                 throws ExchangeException

  Sets the text property of the message. This is the plain text body of the message. This property is overriden by the rich text property (set by `setRichTextFormat`, so only one of the two properties should be used).

  Parameters:
    `sText` - the text as the plain text body of the message
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TEXT`

### getTimeCreated

    public java.util.Date getTimeCreated()
                                  throws ExchangeException

  Gets the time that the message was created.

  Returns:
    the time
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TIME_CREATED`

### getTimeExpired

    public java.util.Date getTimeExpired()
                                  throws ExchangeException

  Gets the time that the message expired.

  Returns:
    the time
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TIME_EXPIRED`

### setTimeExpired

    public void setTimeExpired(java.util.Date timeExpired)
                        throws ExchangeException

  Sets the time that the message expired.

  Parameters:
    `timeExpired` - the time
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TIME_EXPIRED`

### getTimeLastModified

    public java.util.Date getTimeLastModified()
                                       throws ExchangeException

  Gets the time that the message was last modified.

  Returns:
    the time
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TIME_LAST_MODIFIED`

### getTimeReceived

    public java.util.Date getTimeReceived()
                                   throws ExchangeException

  Gets the time that the message was received.

  Returns:
    the received time
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TIME_RECEIVED`

### getTimeReceivedString

    public java.lang.String getTimeReceivedString(java.text.DateFormat dateFormat)
                                           throws ExchangeException

  Gets the time that the message was received formatted to the specified date format.

  Parameters:
    `dateFormat` - the date format (may not be `null`)
  Returns:
    the formatted received time or empty string if time recieved property not set
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TIME_RECEIVED`

### setTimeReceived

    public void setTimeReceived(java.util.Date timeReceived)
                         throws ExchangeException

  Sets the time that the message was received.

  Parameters:
    `timeReceived` - the time
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TIME_RECEIVED`

### getTimeSent

    public java.util.Date getTimeSent()
                               throws ExchangeException

  Gets the time that the message was sent.

  Returns:
    the sent time
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TIME_SENT`

### setTimeSent

    public void setTimeSent(java.util.Date timeSent)
                     throws ExchangeException

  Sets the time that the message was sent.

  Parameters:
    `timeSent` - the sent time
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TIME_SENT`

### getMessageType

    public MessageType getMessageType()
                               throws ExchangeException

  Gets the type of the message.

  Returns:
    the message type
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TYPE`

### setMessageType

    public void setMessageType(MessageType type)
                        throws ExchangeException

  Sets the type of the message.

  Parameters:
    `type` - the type (may not be `null`)
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_TYPE`

### getUnread

    public boolean getUnread()
                      throws ExchangeException

  Gets the unread flag for the message.

  Returns:
    `true` if the message is unread; `false` otherwise
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_UNREAD`

### setUnread

    public void setUnread(boolean bUnread)
                   throws ExchangeException

  Sets the unread flag for the message.

  Parameters:
    `bUnread` - `true` to set the message as unread; `false` otherwise
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_UNREAD`

### getFlagStatus

    public FlagStatus getFlagStatus()
                             throws ExchangeException

  Gets the flag status for the message.

  Returns:
    the flag status
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.FLAG_STATUS`

### setFlagStatus

    public void setFlagStatus(FlagStatus status)
                       throws ExchangeException

  Sets the flag status for the message.

  Parameters:
    `status` - the flag status (may not be `null`)
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.FLAG_STATUS`

### getFlagText

    public java.lang.String getFlagText()
                                 throws ExchangeException

  Gets the flag text for the message.

  Returns:
    the flag text
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.FLAG_TEXT`

### setFlagText

    public void setFlagText(java.lang.String sText)
                     throws ExchangeException

  Sets the flag text for the message.

  Parameters:
    `sText` - the flag text
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.FLAG_TEXT`

### setFlagText

    public void setFlagText(FlagText text)
                     throws ExchangeException

  Sets the flag text for the message.

  Parameters:
    `text` - the flag text (may not be `null`)
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.FLAG_TEXT`

### serverDelete

    public void serverDelete()
                      throws ExchangeException

  Hits the server to delete the message (the message is removed permanently, and not moved into deleted items).

  Throws:
    `ExchangeException`

### serverDelete

    public void serverDelete(boolean bDeletedItems)
                      throws ExchangeException

  Hits the server to delete the message.

  Parameters:
    `bDeletedItems` - if `true`, move the message into deleted items
  Throws:
    `ExchangeException`

### serverGetAttachments

    public Attachment[] serverGetAttachments(PropertyKey[] attachmentKeys)
                                      throws ExchangeException

  Hits the server to get attachment information for a message.

  Parameters:
    `attachmentKeys` - the property keys of the attachment
  Throws:
    `ExchangeException`

### serverGetAttachment

    public javax.activation.DataHandler serverGetAttachment(int iIndex)
                                                     throws ExchangeException

  Queries the server to get the specified attachment data handler.

  Parameters:
    `iIndex` - the index of the attachment in the attachments collection of the message
  Returns:
    a handler that can supply the attachment data
  Throws:
    `ExchangeException`

### serverResolveRecipients

    public UnresolvedRecipient[] serverResolveRecipients(boolean bRemove)
                                                  throws ExchangeException

  Hits the server to resolve recipients for the message. Recipients with an SMTP address resolve properly.

  Parameters:
    `bRemove` - if `true`, remove recipients if they do not resolve.
  Returns:
    an array of `Recipient` objects of unresolved recipients, or an array of zero length if all recipients were resolved
  Throws:
    `ExchangeException`

### getAttachmentInfo

    public AttachmentInfo getAttachmentInfo(int iIndex)
                                     throws ExchangeException

  Gets the attachment info for the specified index.

  Parameters:
    `iIndex` - the index of the attachment in the attachments collection of the message
  Returns:
    the attachment info or `null` if not found
  Throws:
    `ExchangeException`
  See Also:
    `PropertyKey.MESSAGE_ATTACHMENT_INFO`

### getActionStatus

    public ActionStatus getActionStatus()
                                 throws ExchangeException

  Gets the action status of the message.

  Throws:
    `ExchangeException`

### setActionStatus

    public void setActionStatus(ActionStatus actionStatus)
                         throws ExchangeException

  Sets an action status for a message. The date for a status is set automatically.

  Parameters:
    `actionStatus` - the action status
  Throws:
    `ExchangeException`

### serverAddAttachment

    public int serverAddAttachment(AttachmentType attachmentType,
                                   java.lang.String sName,
                                   java.lang.String sSource,
                                   int iPosition,
                                   javax.activation.DataHandler handler)
                            throws ExchangeException

  Hits the server to add an attachment to a message. The source that should be specified depends on the attachment type as follows:
  - `AttachmentType.FILE_DATA` - source parameter is ignored, pass in `null`
  - `AttachmentType.FILE_LINK` - pass in a link in UNC form, such as `\\server\path\file.doc`
  - `AttachmentType.OLE` - source parameter is ignored, pass in `null`
  - `AttachmentType.EMBEDDED_MESSAGE` - source parameter should be an ID to a message

  Note: the attachment is added to the message immediately. There is no need to call `serverUpdate()`.

  Any number of attachments can be added to a message, but individually none of them can be larger than `SessionInfo.serverGetMaxAttachmentSize()`.

  Parameters:
    `attachmentType` - the attachment type
    `sName` - the display name of the attachment
    `sSource` - the attachment source
    `iPosition` - the position of the attachment in the message (0 to ignore)
    `handler` - a handler that can supply the attachment data
  Returns:
    the position of the newly added attachment in the attachments collection of the message
  Throws:
    `ExchangeException`

### serverDeleteAttachment

    public void serverDeleteAttachment(int iIndex)
                                throws ExchangeException

  Hits the server to delete an attachment from a message.

  Note: the attachment is removed from the message immediately. There is no need to call `serverUpdate()`.

  Parameters:
    `iIndex` - the index of the attachment in the attachments collection of the message
  Throws:
    `ExchangeException`

### serverCopyTo

    public void serverCopyTo(java.lang.String sFolderID)
                      throws ExchangeException

  Hits the server to copy the message to another folder.

  Parameters:
    `sFolderID` - the ID of the target folder
  Throws:
    `ExchangeException`

### serverMoveTo

    public void serverMoveTo(java.lang.String sFolderID)
                      throws ExchangeException

  Hits the server to move the message to another folder.

  Parameters:
    `sFolderID` - the ID of the target folder
  Throws:
    `ExchangeException`

### serverMoveTo

    public void serverMoveTo(DefaultFolderType folderType)
                      throws ExchangeException

  Hits the server to move the specified messages to another folder.

  Parameters:
    `folderType` - the default folder type the message will go in
  Throws:
    `ExchangeException`

### serverUpdate

    public void serverUpdate()
                      throws ExchangeException

  Hits the server to update any changed properties.

  Specified by:
    `serverUpdate` in class `AbstractItem`
  Throws:
    `ExchangeException`

### serverUpdate

    public void serverUpdate(Recipient[] recipients,
                             boolean bSend,
                             boolean bSaveInSent)
                      throws ExchangeException

  Hits the server to update any changed properties.

  Parameters:
    `recipients` - the recipients to add to the message (or `null` for no recipients to add)
    `bSend` - if `true`, send the message
    `bSaveInSent` - if `true` and sending the message, save the message in the `Sent Items` folder
  Throws:
    `ExchangeException`

### serverUpdate

    public void serverUpdate(Recipient[] recipients,
                             int[] deleteRecipients,
                             boolean bSend,
                             boolean bSaveInSent)
                      throws ExchangeException

  Hits the server to update any changed properties. This method should be used to delete recipients from a message. Note that recipients are deleted before the new ones are added, as deleting changes the indexes of recipients already on the message.

  Parameters:
    `recipients` - the recipients to add to the message (or `null` for no recipients to add)
    `deleteRecipients` - the recipients to remove from the message (or `null` for no recipients to remove)
    `bSend` - if `true`, send the message
    `bSaveInSent` - if `true` and sending the message, save the message in the `Sent Items` folder
  Throws:
    `ExchangeException`

### toString

    public java.lang.String toString()

  Returns the string representation of the message.

  Returns:
    the string representation of the message
  See Also:
    `PropertyKey.MESSAGE_SUBJECT`, `PropertyKey.MESSAGE_ID`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.