Compoze Software, Inc.

com.compoze.exchange.webdav
Class AbstractMessage


java.lang.Object

  |

  +--com.compoze.exchange.webdav.AbstractItem

        |

        +--com.compoze.exchange.webdav.AbstractMessage

All Implemented Interfaces:
java.lang.Cloneable, IItem, java.io.Serializable
Direct Known Subclasses:
Appointment, Contact, DistributionList, Document, JournalEntry, Message, Note, Task

public abstract class AbstractMessage
extends AbstractItem
implements java.io.Serializable, java.lang.Cloneable

This class provides an extended skeletal implementation that deals specifically with messages, for example contacts, appointments, and mail messages.

The following table contains the properties defined in the Exchange store schema and mappings to their corresponding Java enumeration and methods:

Exchange Store Property Property Enumeration Java Methods
http://schemas.microsoft.com/mapi/proptag/x00170003 MapiProperty.IMPORTANCE getImportance()
setImportance(Importance)
http://schemas.microsoft.com/mapi/proptag/x0e080003 MapiProperty.MESSAGE_SIZE getSize()
urn:schemas:httpmail:textdescription HttpMailProperty.TEXT_DESCRIPTION getTextDescription()
setTextDescription(String)
urn:schemas:mailheader:bcc MailHeaderProperty.BCC getBccAddresses()
setBccAddresses(List)
urn:schemas:mailheader:cc MailHeaderProperty.CC getCcAddresses()
setCcAddresses(List)
http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/x00008586 MapiProperty.CONTACT_NAMES getContactNames()
setContactNames(String[])
urn:schemas:mailheader:from MailHeaderProperty.FROM getFromAddresses()
setFromAddresses(List)
urn:schemas:httpmail:fromemail HttpMailProperty.FROM_EMAIL getFromEmailAddress()
urn:schemas:httpmail:fromname HttpMailProperty.FROM_NAME getFromName()
urn:schemas:httpmail:hasattachment HttpMailProperty.HAS_ATTACHMENT hasAttachment()
http://schemas.microsoft.com/exchange/keywords-utf8 ExchangeProperty.KEYWORDS getCategories()
setCategories(String[])
http://schemas.microsoft.com/mapi/sensitivity MapiProperty.SENSITIVITY getSensitivity()
setSensitivity(Sensitivity)
urn:schemas:httpmail:normalizedsubject HttpMailProperty.NORMALIZED_SUBJECT getNormalizedSubject()
http://schemas.microsoft.com/exchange/outlookmessageclass ExchangeProperty.OUTLOOK_MESSAGE_CLASS getType()
AbstractItem.setType(IOutlookType)
urn:schemas:httpmail:read HttpMailProperty.READ isRead()
setRead(boolean)
urn:schemas:httpmail:datereceived HttpMailProperty.DATE_RECEIVED getDateReceived()
setDateReceived(Date)
urn:schemas:httpmail:subject HttpMailProperty.SUBJECT MailHeaderProperty.SUBJECT getSubject()
setSubject(String)
urn:schemas:mailheader:to MailHeaderProperty.TO getToAddresses()
setToAddresses(List)

See Also:
Serialized Form

Constructor Summary
protected AbstractMessage(java.lang.String sSubject, OutlookMessageType outlookMessageClass, ContentClass contentClass)
          Constructor.
protected AbstractMessage(java.lang.String sSubject, java.lang.String sOutlookMessageClass, java.lang.String sContentClass)
          Constructor.
 
Method Summary
 void addAttachment(Attachment attachment)
          Adds an attachement to this message.
protected  java.lang.Object clone()
          Creates and returns a copy of this object.
protected  java.lang.String createFilename(int iIndex)
          Creates the filename for this message.
 boolean equals(java.lang.Object o, java.util.Locale locale)
          Indicates whether some other IItem object is "equal to" this one.
 java.util.LinkedList getAttachments()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetAttachments()
 java.util.LinkedList getBccAddresses()
          Gets the blind carbon copy (Bcc) addresses.
 java.lang.String getBccAddressesString()
          Gets the string representation of a list of blind carbon copy (Bcc) addresses.
 com.compoze.util.mail.InternetAddress[] getBccRecipients()
          Gets internet addresses of recipients set in the "Bcc" (blind carbon copy) field.
 java.lang.String getBody()
          Gets the body of this message.
 java.lang.String[] getCategories()
          Gets the categories associated with this message.
 java.util.LinkedList getCcAddresses()
          Gets the carbon copy (Cc) addresses.
 java.lang.String getCcAddressesString()
          Gets the string representation of a list of carbon copy (Cc) addresses.
 com.compoze.util.mail.InternetAddress[] getCcRecipients()
          Gets internet addresses of recipients set in the "Cc" (carbon copy) field.
 java.lang.String[] getContactNames()
          Gets the names of the contacts associated with this message.
 java.util.Date getDateReceived()
          Gets the date this message was received by the server.
static java.util.List getDefaultProperties()
          Gets a list of default properties pertaining to a message.
 com.compoze.util.mail.InternetAddress[] getFrom()
          Gets internet addresses of whom this message was sent.
 java.util.LinkedList getFromAddresses()
          Gets the addresses from whom the message was sent.
 java.lang.String getFromAddressesString()
          Gets the string representation of a list of from whom the message was sent.
 java.lang.String getFromEmailAddress()
          Gets the email address from which the message was sent.
 java.lang.String getFromName()
          Gets the display name from which the message was sent.
 Importance getImportance()
          Gets the level of importance of this message.
 java.lang.String getNormalizedSubject()
          Gets the subject of this message with all prefixes removed.
static java.util.List getProperties()
          Gets a list of properties pertaining to a message.
 Sensitivity getSensitivity()
          Gets the sensitivity of this message.
 int getSize()
          Gets the size of this item (in bytes).
 java.lang.String getSubject()
          Gets the subject of this message.
 java.lang.String getTextDescription()
          Gets the plain text version of the message.
 java.util.LinkedList getToAddresses()
          Gets the principal (To) addresses.
 java.lang.String getToAddressesString()
          Gets the string representation of a list of principal (To) addresses.
 com.compoze.util.mail.InternetAddress[] getToRecipients()
          Gets internet addresses of recipients set in the "To" (principal) field.
 java.lang.String getType()
          Gets the type of this message.
 boolean hasAttachment()
          Gets whether this message has attachments.
 boolean isRead()
          Determines if this message is read.
 void serverDeleteAttachment(int iIndex)
          Deletes an attachment by its index from the server.
 java.util.List serverGetAttachments()
          Queries the server to get a list of the attachments of this message.
 void serverUpdate(boolean bServerRefresh)
          Requests the server to update the message of any changed properties.
 void setBccAddresses(java.util.List addresses)
          Sets the blind carbon copy (Bcc) addresses.
 void setBccRecipients(com.compoze.util.mail.InternetAddress[] addressList)
          Sets "Bcc" (blind carbon copy) field with recipient's internet addresses.
 void setBccRecipients(java.lang.String sAddressList)
          Sets "Bcc" (blind carbon copy) field with sequence of recipient's internet addresses.
 void setBody(java.lang.String sBody)
          Sets the body of this message.
 void setCategories(java.util.List categories)
          Sets the categories associated with this message.
 void setCategories(java.lang.String[] categories)
          Sets the categories associated with this message.
 void setCcAddresses(java.util.List addresses)
          Sets the carbon copy (Cc) addresses.
 void setCcRecipients(com.compoze.util.mail.InternetAddress[] addressesList)
          Sets "Cc" (carbon copy) field with recipient's internet addresses.
 void setCcRecipients(java.lang.String sAddressList)
          Sets "Cc" (carbon copy) field with sequence of recipient's internet addresses.
 void setContactNames(java.util.List names)
          Sets the names of the contacts associated with this message.
 void setContactNames(java.lang.String[] names)
          Sets the names of the contacts associated with this message.
 void setDateReceived(java.util.Date received)
          Sets the date this message was received by the server.
 void setFrom(com.compoze.util.mail.InternetAddress[] addressesList)
          Sets "From" field with internet addresses of whom this message was sent.
 void setFrom(java.lang.String sAddressList)
          Sets "From" field with sequence of internet addresses of whom this message was sent.
 void setFromAddress(java.lang.String sFromAddress)
          Sets the address from whom the message was sent.
 void setFromAddresses(java.util.List addresses)
          Sets the addresses from whom the message was sent.
 void setImportance(Importance importance)
          Sets the level of importance of this message.
 void setRead(boolean bRead)
          Sets this message as read.
 void setSensitivity(Sensitivity sensitivity)
          Sets the sensitivity of this message.
 void setSubject(java.lang.String sSubject)
          Sets the subject of this message.
 void setTextDescription(java.lang.String sTextDescription)
          Sets the plain text version of the message.
 void setToAddresses(java.util.List addresses)
          Sets the principal (To) addresses.
 void setToRecipients(com.compoze.util.mail.InternetAddress[] addressList)
          Sets "To" (principal) field with recipient's internet addresses.
 void setToRecipients(java.lang.String sAddressList)
          Sets "To" (principal) field with sequence of recipient's internet addresses.
 void setType(java.lang.String sType)
          Sets the type of this message.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class com.compoze.exchange.webdav.AbstractItem
copy, copy, copy, createFilename, delete, equals, getComment, getContentClass, getCreationDate, getDateLastModified, getDisplayName, getFile, getHRef, getID, getParentFolder, getPermanentURL, getUID, isFolder, isHidden, isReadOnly, isRoot, move, move, move, serverCopyTo, serverCopyTo, serverCopyTo, serverCopyTo, serverDelete, serverGetParentFolder, serverMoveTo, serverMoveTo, serverMoveTo, serverMoveTo, serverUpdate, setComment, setContentClass, setContentClass, setHidden, setReadOnly, setReleased, setType, setUID, update, update, validate
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractMessage


protected AbstractMessage(java.lang.String sSubject,
                          OutlookMessageType outlookMessageClass,
                          ContentClass contentClass)
Constructor.
Parameters:
sSubject - the subject of the message.
sOutlookMessageClass - the type of the message (see OutlookMessageType).
sContentClass - the content class of the message (see ContentClass).

AbstractMessage


protected AbstractMessage(java.lang.String sSubject,
                          java.lang.String sOutlookMessageClass,
                          java.lang.String sContentClass)
Constructor.
Parameters:
sSubject - the subject of the message.
sOutlookMessageClass - the type of the message (see OutlookMessageType).
sContentClass - the content class of the message (see ContentClass).
Method Detail

getTextDescription


public java.lang.String getTextDescription()
Gets the plain text version of the message.
Returns:
the plain text
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
HttpMailProperty.TEXT_DESCRIPTION

setTextDescription


public void setTextDescription(java.lang.String sTextDescription)
Sets the plain text version of the message.
Parameters:
sTextDescription - the plain text
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
HttpMailProperty.TEXT_DESCRIPTION

getFromName


public java.lang.String getFromName()
Gets the display name from which the message was sent.
Returns:
the display from name, or null if not set
See Also:
HttpMailProperty.FROM_NAME

getFromEmailAddress


public java.lang.String getFromEmailAddress()
Gets the email address from which the message was sent.
Returns:
the from address, or null if not set
See Also:
HttpMailProperty.FROM_EMAIL

getDateReceived


public java.util.Date getDateReceived()
Gets the date this message was received by the server.
Returns:
the date the message was received, or null if not set.
See Also:
HttpMailProperty.DATE_RECEIVED

setDateReceived


public void setDateReceived(java.util.Date received)
Sets the date this message was received by the server.
Returns:
received the date message was received.
See Also:
HttpMailProperty.DATE_RECEIVED

getContactNames


public java.lang.String[] getContactNames()
Gets the names of the contacts associated with this message.
Returns:
list of contact names associated with the message.
See Also:
MapiProperty.CONTACT_NAMES

setContactNames


public void setContactNames(java.util.List names)
Sets the names of the contacts associated with this message.
Parameters:
names - list of contact names associated with the message.
See Also:
MapiProperty.CONTACT_NAMES

setContactNames


public void setContactNames(java.lang.String[] names)
Sets the names of the contacts associated with this message.
Parameters:
names - list of contact names associated with the message.
See Also:
MapiProperty.CONTACT_NAMES

getSensitivity


public Sensitivity getSensitivity()
Gets the sensitivity of this message.
Returns:
the sensitivity of the message, or null if not set.
See Also:
MapiProperty.SENSITIVITY

setSensitivity


public void setSensitivity(Sensitivity sensitivity)
Sets the sensitivity of this message.
Parameters:
sensitivity - the sensitivity of the message.
See Also:
MapiProperty.SENSITIVITY

getCategories


public java.lang.String[] getCategories()
Gets the categories associated with this message.
Returns:
list of categories associated with the message.
See Also:
ExchangeProperty.KEYWORDS

setCategories


public void setCategories(java.util.List categories)
Sets the categories associated with this message.
Parameters:
categories - list of categories associated with the message.
See Also:
ExchangeProperty.KEYWORDS

setCategories


public void setCategories(java.lang.String[] categories)
Sets the categories associated with this message.
Parameters:
categories - list of categories associated with the message.
See Also:
ExchangeProperty.KEYWORDS

getSubject


public java.lang.String getSubject()
Gets the subject of this message.
Returns:
the subject of the message (may be null)
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.
See Also:
HttpMailProperty.SUBJECT, MailHeaderProperty.SUBJECT

setSubject


public void setSubject(java.lang.String sSubject)
Sets the subject of this message.
Parameters:
sSubject - the subject of the message.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.
See Also:
HttpMailProperty.SUBJECT, MailHeaderProperty.SUBJECT

getNormalizedSubject


public java.lang.String getNormalizedSubject()
Gets the subject of this message with all prefixes removed.
Returns:
the normalized subject of the message.
See Also:
HttpMailProperty.NORMALIZED_SUBJECT

getFromAddressesString


public java.lang.String getFromAddressesString()
Gets the string representation of a list of from whom the message was sent.
Returns:
a string representation of a list of internet addresses; or null if not set
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.FROM

getFromAddresses


public java.util.LinkedList getFromAddresses()
Gets the addresses from whom the message was sent.
Returns:
list of addresses, or an empty list if not set
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.FROM

setFromAddress


public void setFromAddress(java.lang.String sFromAddress)
Sets the address from whom the message was sent.
Parameters:
sFromAddress - the email address from whom message was sent
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.FROM

setFromAddresses


public void setFromAddresses(java.util.List addresses)
Sets the addresses from whom the message was sent.
Parameters:
addresses - list of addresses
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.FROM

getFrom


public com.compoze.util.mail.InternetAddress[] getFrom()
                                                throws com.compoze.util.mail.AddressException
Gets internet addresses of whom this message was sent.
Returns:
array of InternetAddress objects; or null if not set
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
See Also:
MailHeaderProperty.FROM

setFrom


public void setFrom(java.lang.String sAddressList)
             throws com.compoze.util.mail.AddressException
Sets "From" field with sequence of internet addresses of whom this message was sent.
Parameters:
sAddressList - sequence of internet addresses
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
See Also:
MailHeaderProperty.FROM

setFrom


public void setFrom(com.compoze.util.mail.InternetAddress[] addressesList)
Sets "From" field with internet addresses of whom this message was sent.
Parameters:
addressesList - array of InternetAddress objects
See Also:
MailHeaderProperty.FROM

getCcAddressesString


public java.lang.String getCcAddressesString()
Gets the string representation of a list of carbon copy (Cc) addresses.
Returns:
a string representation of a list of internet addresses; or null if not set
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.CC

getCcAddresses


public java.util.LinkedList getCcAddresses()
Gets the carbon copy (Cc) addresses.
Returns:
list of String objects representing internet addresses, or an empty list if not set
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.CC

setCcAddresses


public void setCcAddresses(java.util.List addresses)
Sets the carbon copy (Cc) addresses.
Parameters:
addresses - list of String objects representing internet addresses
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.CC

getCcRecipients


public com.compoze.util.mail.InternetAddress[] getCcRecipients()
                                                        throws com.compoze.util.mail.AddressException
Gets internet addresses of recipients set in the "Cc" (carbon copy) field.
Returns:
array of InternetAddress objects; or null if not set
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
See Also:
MailHeaderProperty.CC

setCcRecipients


public void setCcRecipients(java.lang.String sAddressList)
                     throws com.compoze.util.mail.AddressException
Sets "Cc" (carbon copy) field with sequence of recipient's internet addresses.
Parameters:
sAddressList - sequence of internet addresses
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
See Also:
MailHeaderProperty.CC

setCcRecipients


public void setCcRecipients(com.compoze.util.mail.InternetAddress[] addressesList)
Sets "Cc" (carbon copy) field with recipient's internet addresses.
Parameters:
addressesList - array of InternetAddress objects
See Also:
MailHeaderProperty.CC

getBccAddressesString


public java.lang.String getBccAddressesString()
Gets the string representation of a list of blind carbon copy (Bcc) addresses.
Returns:
a string representation of a list of internet addresses; or null if not set
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.BCC

getBccAddresses


public java.util.LinkedList getBccAddresses()
Gets the blind carbon copy (Bcc) addresses.
Returns:
list of String objects representing internet addresses, or an empty list if not set
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.BCC

setBccAddresses


public void setBccAddresses(java.util.List addresses)
Sets the blind carbon copy (Bcc) addresses.
Parameters:
addresses - list of String objects representing internet addresses
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.BCC

getBccRecipients


public com.compoze.util.mail.InternetAddress[] getBccRecipients()
                                                         throws com.compoze.util.mail.AddressException
Gets internet addresses of recipients set in the "Bcc" (blind carbon copy) field.
Returns:
array of InternetAddress objects; or null if not set
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
See Also:
MailHeaderProperty.BCC

setBccRecipients


public void setBccRecipients(java.lang.String sAddressList)
                      throws com.compoze.util.mail.AddressException
Sets "Bcc" (blind carbon copy) field with sequence of recipient's internet addresses.
Parameters:
sAddressList - sequence of internet addresses
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
See Also:
MailHeaderProperty.BCC

setBccRecipients


public void setBccRecipients(com.compoze.util.mail.InternetAddress[] addressList)
Sets "Bcc" (blind carbon copy) field with recipient's internet addresses.
Parameters:
addressList - array of InternetAddress objects
See Also:
MailHeaderProperty.BCC

getToAddressesString


public java.lang.String getToAddressesString()
Gets the string representation of a list of principal (To) addresses.
Returns:
a string representation of a list of internet addresses; or null if not set
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.TO

getToAddresses


public java.util.LinkedList getToAddresses()
Gets the principal (To) addresses.
Returns:
list of String objects representing internet addresses, or an empty list if not set
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.TO

setToAddresses


public void setToAddresses(java.util.List addresses)
Sets the principal (To) addresses.
Parameters:
addresses - list of String objects representing internet addresses
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MailHeaderProperty.TO

getToRecipients


public com.compoze.util.mail.InternetAddress[] getToRecipients()
                                                        throws com.compoze.util.mail.AddressException
Gets internet addresses of recipients set in the "To" (principal) field.
Returns:
array of InternetAddress objects; or null if not set
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
See Also:
MailHeaderProperty.TO

setToRecipients


public void setToRecipients(java.lang.String sAddressList)
                     throws com.compoze.util.mail.AddressException
Sets "To" (principal) field with sequence of recipient's internet addresses.
Parameters:
sAddressList - sequence of internet addresses
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
See Also:
MailHeaderProperty.TO

setToRecipients


public void setToRecipients(com.compoze.util.mail.InternetAddress[] addressList)
Sets "To" (principal) field with recipient's internet addresses.
Parameters:
addressList - array of InternetAddress objects
See Also:
MailHeaderProperty.TO

isRead


public boolean isRead()
Determines if this message is read.
Returns:
true if the message is read.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
HttpMailProperty.READ

setRead


public void setRead(boolean bRead)
Sets this message as read.
Parameters:
bRead - true if message is read; false otherwise
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
HttpMailProperty.READ

getImportance


public Importance getImportance()
Gets the level of importance of this message.
Returns:
the importance of the message, or null if not set.
See Also:
MapiProperty.IMPORTANCE

setImportance


public void setImportance(Importance importance)
Sets the level of importance of this message.
Parameters:
importance - the level of importance of the message.
See Also:
MapiProperty.IMPORTANCE

getBody


public java.lang.String getBody()
Gets the body of this message.
Returns:
the body of the message.
See Also:
MapiProperty.BODY_WIDE

setBody


public void setBody(java.lang.String sBody)
Sets the body of this message.
Parameters:
sBody - the body of the message.
See Also:
MapiProperty.BODY_WIDE

getSize


public int getSize()
Description copied from interface: IItem
Gets the size of this item (in bytes). This property is read-only.
Overrides:
getSize in class AbstractItem
See Also:
MapiProperty.MESSAGE_SIZE

getType


public java.lang.String getType()
Gets the type of this message. See OutlookMessageType for a partial list of message types.
Overrides:
getType in class AbstractItem
Returns:
the type of the message.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.
See Also:
ExchangeProperty.OUTLOOK_MESSAGE_CLASS

setType


public void setType(java.lang.String sType)
Sets the type of this message. See OutlookMessageType for a partial list of message types.
Overrides:
setType in class AbstractItem
Parameters:
stype - the type of the mesage.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.
See Also:
ExchangeProperty.OUTLOOK_MESSAGE_CLASS

hasAttachment


public boolean hasAttachment()
Gets whether this message has attachments.
Returns:
true if the message has attachments.
See Also:
HttpMailProperty.HAS_ATTACHMENT

addAttachment


public void addAttachment(Attachment attachment)
                   throws ExchangeException
Adds an attachement to this message. Call this method multiple times to add more than one attachment.
Parameters:
attachment - the attachment to add

getAttachments


public java.util.LinkedList getAttachments()
                                    throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetAttachments()

Gets the attachments of this message. Use hasAttachment() first to determine if this message has attachments.
Returns:
collection of attachments, or an empty list if not set

serverGetAttachments


public java.util.List serverGetAttachments()
                                    throws ExchangeException
Queries the server to get a list of the attachments of this message. Use hasAttachment() first to determine if this message has attachments.
Returns:
list of attachments, or an empty list if not set
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

serverDeleteAttachment


public void serverDeleteAttachment(int iIndex)
                            throws ExchangeException
Deletes an attachment by its index from the server. Important When deleting multiple attachments from the server, the attachment indexes will change as you are deleting. Each attachment with an index higher than the one passed in will now be indexed by its original index minus one.

This method does not use pure WebDAV to do its work. It uses an HTTP request to simulate a browser POST with form data that would be made when a user is using OWA.

Parameters:
iIndex - the index of the attachment to delete (see note in method description regarding deleting multiple attachments)
Throws:
ExchangeException - if an exception occurs while connecting to or interacting with Exchange

serverUpdate


public void serverUpdate(boolean bServerRefresh)
                  throws ExchangeException
Requests the server to update the message of any changed properties.

If the message does not exist in the Exchange store, it is created, else the existing message is updated.

An AttachmentException is thrown if any conflicts occur attaching (uploading) files to the message. The exception will state what files failed to attach. The message is still updated and can be sent, but will exclude the failed attachments.

Overrides:
serverUpdate in class AbstractItem
Parameters:
bServerRefresh - true requests the server to refresh the properties
Throws:
AttachmentException - if any files failed to attached to this message.
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

equals


public boolean equals(java.lang.Object o,
                      java.util.Locale locale)
Indicates whether some other IItem object is "equal to" this one.
Overrides:
equals in class AbstractItem
Returns:
true if this object is the same as the object argument

clone


protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.
Overrides:
clone in class AbstractItem
Returns:
a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface.

toString


public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class AbstractItem
Returns:
the string representation of the object

createFilename


protected java.lang.String createFilename(int iIndex)
Creates the filename for this message.

The filename of this message is composed of the subject. If no subject is specified, then default "No Subject.eml" is used.

Overrides:
createFilename in class AbstractItem
Parameters:
iIndex - the index to append
Returns:
the filename
See Also:
AbstractItem.createFilename(int)

getDefaultProperties


public static java.util.List getDefaultProperties()
Gets a list of default properties pertaining to a message.
Following is the list of properties returned:
Returns:
a list (unmodifiable) of properties.
See Also:
AbstractItem.getDefaultProperties()

getProperties


public static java.util.List getProperties()
Gets a list of properties pertaining to a message.
Returns:
a list (unmodifiable) of properties.
See Also:
AbstractItem.getProperties()

Compoze Software, Inc.

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