|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.exchange.webdav.AbstractItem | +--com.compoze.exchange.webdav.AbstractMessage
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:
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 |
protected AbstractMessage(java.lang.String sSubject, OutlookMessageType outlookMessageClass, ContentClass contentClass)
sSubject
- the subject of the message.sOutlookMessageClass
- the type of the message (see OutlookMessageType
).sContentClass
- the content class of the message (see ContentClass
).protected AbstractMessage(java.lang.String sSubject, java.lang.String sOutlookMessageClass, java.lang.String sContentClass)
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 |
public java.lang.String getTextDescription()
ExchangeRuntimeException
- if this object has been released and can
no longer be usedHttpMailProperty.TEXT_DESCRIPTION
public void setTextDescription(java.lang.String sTextDescription)
sTextDescription
- the plain textExchangeRuntimeException
- if this object has been released and can
no longer be usedHttpMailProperty.TEXT_DESCRIPTION
public java.lang.String getFromName()
null
if not setHttpMailProperty.FROM_NAME
public java.lang.String getFromEmailAddress()
null
if not setHttpMailProperty.FROM_EMAIL
public java.util.Date getDateReceived()
null
if not set.HttpMailProperty.DATE_RECEIVED
public void setDateReceived(java.util.Date received)
HttpMailProperty.DATE_RECEIVED
public java.lang.String[] getContactNames()
MapiProperty.CONTACT_NAMES
public void setContactNames(java.util.List names)
names
- list of contact names associated with the message.MapiProperty.CONTACT_NAMES
public void setContactNames(java.lang.String[] names)
names
- list of contact names associated with the message.MapiProperty.CONTACT_NAMES
public Sensitivity getSensitivity()
null
if not set.MapiProperty.SENSITIVITY
public void setSensitivity(Sensitivity sensitivity)
sensitivity
- the sensitivity of the message.MapiProperty.SENSITIVITY
public java.lang.String[] getCategories()
ExchangeProperty.KEYWORDS
public void setCategories(java.util.List categories)
categories
- list of categories associated with the message.ExchangeProperty.KEYWORDS
public void setCategories(java.lang.String[] categories)
categories
- list of categories associated with the message.ExchangeProperty.KEYWORDS
public java.lang.String getSubject()
null
)ExchangeRuntimeException
- if this object has been released and can
no longer be used.HttpMailProperty.SUBJECT
,
MailHeaderProperty.SUBJECT
public void setSubject(java.lang.String sSubject)
sSubject
- the subject of the message.ExchangeRuntimeException
- if this object has been released and can
no longer be used.HttpMailProperty.SUBJECT
,
MailHeaderProperty.SUBJECT
public java.lang.String getNormalizedSubject()
HttpMailProperty.NORMALIZED_SUBJECT
public java.lang.String getFromAddressesString()
null
if not setExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.FROM
public java.util.LinkedList getFromAddresses()
ExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.FROM
public void setFromAddress(java.lang.String sFromAddress)
sFromAddress
- the email address from whom message was sentExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.FROM
public void setFromAddresses(java.util.List addresses)
addresses
- list of addressesExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.FROM
public com.compoze.util.mail.InternetAddress[] getFrom() throws com.compoze.util.mail.AddressException
InternetAddress
objects; or null
if not setcom.compoze.util.mail.AddressException
- if parsing of internet addresses failMailHeaderProperty.FROM
public void setFrom(java.lang.String sAddressList) throws com.compoze.util.mail.AddressException
sAddressList
- sequence of internet addressescom.compoze.util.mail.AddressException
- if parsing of internet addresses failMailHeaderProperty.FROM
public void setFrom(com.compoze.util.mail.InternetAddress[] addressesList)
addressesList
- array of InternetAddress
objectsMailHeaderProperty.FROM
public java.lang.String getCcAddressesString()
null
if not setExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.CC
public java.util.LinkedList getCcAddresses()
String
objects representing internet addresses,
or an empty list if not setExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.CC
public void setCcAddresses(java.util.List addresses)
addresses
- list of String
objects representing
internet addressesExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.CC
public com.compoze.util.mail.InternetAddress[] getCcRecipients() throws com.compoze.util.mail.AddressException
InternetAddress
objects; or null
if not setcom.compoze.util.mail.AddressException
- if parsing of internet addresses failMailHeaderProperty.CC
public void setCcRecipients(java.lang.String sAddressList) throws com.compoze.util.mail.AddressException
sAddressList
- sequence of internet addressescom.compoze.util.mail.AddressException
- if parsing of internet addresses failMailHeaderProperty.CC
public void setCcRecipients(com.compoze.util.mail.InternetAddress[] addressesList)
addressesList
- array of InternetAddress
objectsMailHeaderProperty.CC
public java.lang.String getBccAddressesString()
null
if not setExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.BCC
public java.util.LinkedList getBccAddresses()
String
objects representing internet addresses,
or an empty list if not setExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.BCC
public void setBccAddresses(java.util.List addresses)
addresses
- list of String
objects representing
internet addressesExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.BCC
public com.compoze.util.mail.InternetAddress[] getBccRecipients() throws com.compoze.util.mail.AddressException
InternetAddress
objects; or null
if not setcom.compoze.util.mail.AddressException
- if parsing of internet addresses failMailHeaderProperty.BCC
public void setBccRecipients(java.lang.String sAddressList) throws com.compoze.util.mail.AddressException
sAddressList
- sequence of internet addressescom.compoze.util.mail.AddressException
- if parsing of internet addresses failMailHeaderProperty.BCC
public void setBccRecipients(com.compoze.util.mail.InternetAddress[] addressList)
addressList
- array of InternetAddress
objectsMailHeaderProperty.BCC
public java.lang.String getToAddressesString()
null
if not setExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.TO
public java.util.LinkedList getToAddresses()
String
objects representing internet addresses,
or an empty list if not setExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.TO
public void setToAddresses(java.util.List addresses)
addresses
- list of String
objects representing
internet addressesExchangeRuntimeException
- if this object has been released and can
no longer be usedMailHeaderProperty.TO
public com.compoze.util.mail.InternetAddress[] getToRecipients() throws com.compoze.util.mail.AddressException
InternetAddress
objects; or null
if not setcom.compoze.util.mail.AddressException
- if parsing of internet addresses failMailHeaderProperty.TO
public void setToRecipients(java.lang.String sAddressList) throws com.compoze.util.mail.AddressException
sAddressList
- sequence of internet addressescom.compoze.util.mail.AddressException
- if parsing of internet addresses failMailHeaderProperty.TO
public void setToRecipients(com.compoze.util.mail.InternetAddress[] addressList)
addressList
- array of InternetAddress
objectsMailHeaderProperty.TO
public boolean isRead()
true
if the message is read.ExchangeRuntimeException
- if this object has been released and can no longer be usedHttpMailProperty.READ
public void setRead(boolean bRead)
bRead
- true
if message is read; false
otherwiseExchangeRuntimeException
- if this object has been released and can no longer be usedHttpMailProperty.READ
public Importance getImportance()
null
if not set.MapiProperty.IMPORTANCE
public void setImportance(Importance importance)
importance
- the level of importance of the message.MapiProperty.IMPORTANCE
public java.lang.String getBody()
MapiProperty.BODY_WIDE
public void setBody(java.lang.String sBody)
sBody
- the body of the message.MapiProperty.BODY_WIDE
public int getSize()
IItem
getSize
in class AbstractItem
MapiProperty.MESSAGE_SIZE
public java.lang.String getType()
OutlookMessageType
for a partial
list of message types.getType
in class AbstractItem
ExchangeRuntimeException
- if this object has been released and can
no longer be used.ExchangeProperty.OUTLOOK_MESSAGE_CLASS
public void setType(java.lang.String sType)
OutlookMessageType
for a partial
list of message types.setType
in class AbstractItem
stype
- the type of the mesage.ExchangeRuntimeException
- if this object has been released and can
no longer be used.ExchangeProperty.OUTLOOK_MESSAGE_CLASS
public boolean hasAttachment()
true
if the message has attachments.HttpMailProperty.HAS_ATTACHMENT
public void addAttachment(Attachment attachment) throws ExchangeException
attachment
- the attachment to addpublic java.util.LinkedList getAttachments() throws ExchangeException
serverGetAttachments()
hasAttachment()
first
to determine if this message has attachments.public java.util.List serverGetAttachments() throws ExchangeException
hasAttachment()
first to determine if this message has attachments.ExchangeException
- if a problem occurred while connecting to or interaction with Exchange ServerExchangeRuntimeException
- if this object has been released and can no longer be usedpublic void serverDeleteAttachment(int iIndex) throws ExchangeException
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.
iIndex
- the index of the attachment to delete (see note
in method description regarding deleting multiple attachments)ExchangeException
- if an exception occurs while
connecting to or interacting with Exchangepublic void serverUpdate(boolean bServerRefresh) throws ExchangeException
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.
serverUpdate
in class AbstractItem
bServerRefresh
- true
requests the server to refresh
the propertiesAttachmentException
- if any files failed to attached to this message.ExchangeException
- if a problem occurred while connecting to or interaction with Exchange ServerExchangeRuntimeException
- if this object has been released and can no longer be usedpublic boolean equals(java.lang.Object o, java.util.Locale locale)
IItem
object is "equal to" this one.equals
in class AbstractItem
true
if this object is the same as the object argumentprotected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractItem
java.lang.CloneNotSupportedException
- if the object's class does not support the Cloneable interface.public java.lang.String toString()
toString
in class AbstractItem
protected java.lang.String createFilename(int iIndex)
The filename of this message is composed of the subject. If no subject is specified, then default "No Subject.eml" is used.
createFilename
in class AbstractItem
iIndex
- the index to appendAbstractItem.createFilename(int)
public static java.util.List getDefaultProperties()
ExchangeProperty.OUTLOOK_MESSAGE_CLASS
MapiProperty.MESSAGE_SIZE
MapiProperty.BODY_WIDE
MapiProperty.IMPORTANCE
HttpMailProperty.READ
MailHeaderProperty.TO
MailHeaderProperty.CC
MailHeaderProperty.BCC
MailHeaderProperty.FROM
HttpMailProperty.FROM_NAME
HttpMailProperty.HAS_ATTACHMENT
HttpMailProperty.NORMALIZED_SUBJECT
HttpMailProperty.DATE_RECEIVED
HttpMailProperty.SUBJECT
MailHeaderProperty.SUBJECT
HttpMailProperty.TEXT_DESCRIPTION
AbstractItem.getDefaultProperties()
public static java.util.List getProperties()
AbstractItem.getProperties()
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |