Compoze Software, Inc.

com.compoze.exchange.webdav
Class Note


java.lang.Object

  |

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

        |

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

              |

              +--com.compoze.exchange.webdav.Note

All Implemented Interfaces:
java.lang.Cloneable, IItem, java.io.Serializable

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

This class extends AbstractMessage to represent a message that is a note in the Exchange store. Functionality may be very limited due to the lack of support by Microsoft for manipulating stick notes in Exchange Server via WebDAV. The following table contains the properties defined in the Exchange store schema and mappings to their corresponding Java enumeration and methods:

Exchange Store Property Java Enumeration Java Methods
http://schemas.microsoft.com/mapi/id/{0006200E-0000-0000-C000-000000000046}/x00008b00 MapiProperty.NOTE_COLOR getColor()
setColor(Color)
http://schemas.microsoft.com/mapi/id/{0006200E-0000-0000-C000-000000000046}/x00008b02 MapiProperty.NOTE_WIDTH getWidth()
setWidth(int)
http://schemas.microsoft.com/mapi/id/{0006200E-0000-0000-C000-000000000046}/x00008b03 MapiProperty.NOTE_HEIGHT getHeight()
setHeight(int)
http://schemas.microsoft.com/mapi/proptag/x1000001f MapiProperty.BODY_WIDE getTextDescription()
setTextDescription(String)

See Also:
Serialized Form

Constructor Summary
Note(java.lang.String sBody)
          Constructor.
 
Method Summary
 void addAttachment(Attachment attachment)
          Adds an attachement to this message.
 java.lang.Object clone()
          Creates and returns a copy of this object.
 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.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.
 Color getColor()
          Gets the color of this note.
static java.util.List getDefaultProperties()
          Gets a list of default properties pertaining to a note.
 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.
 int getHeight()
          Gets the height of this note.
static java.util.List getProperties()
          Gets a list of properties pertaining to a note.
 java.lang.String getTextDescription()
          Gets the plain text version of the note.
 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.
 int getWidth()
          Gets the width of this note.
 java.util.List serverGetAttachments()
          Queries the server to get a list of the attachments of this message.
 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 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 setColor(Color color)
          Sets the color of this note.
 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 setHeight(int iHeight)
          Sets the height of this note.
 void setTextDescription(java.lang.String sTextDescription)
          Sets the plain text version of the note.
 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 setWidth(int iWidth)
          Sets the width of this note.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class com.compoze.exchange.webdav.AbstractMessage
createFilename, equals, getAttachments, getBody, getCategories, getContactNames, getDateReceived, getFromEmailAddress, getFromName, getImportance, getNormalizedSubject, getSensitivity, getSize, getSubject, getType, hasAttachment, isRead, serverDeleteAttachment, serverUpdate, setBody, setCategories, setCategories, setContactNames, setContactNames, setDateReceived, setImportance, setRead, setSensitivity, setSubject, setType
 
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

Note


public Note(java.lang.String sBody)
Constructor.
Parameters:
sBody - the body of the note (must not be null nor empty).
Method Detail

getTextDescription


public java.lang.String getTextDescription()
Gets the plain text version of the note.
Overrides:
getTextDescription in class AbstractMessage
Returns:
the plain text
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MapiProperty.BODY_WIDE

setTextDescription


public void setTextDescription(java.lang.String sTextDescription)
Sets the plain text version of the note. The subject of this note is taken from the first line of the body.
Overrides:
setTextDescription in class AbstractMessage
Parameters:
sTextDescription - the plain text
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
MapiProperty.BODY_WIDE

getColor


public Color getColor()
Gets the color of this note.
Returns:
the color of the note.
See Also:
MapiProperty.NOTE_COLOR

setColor


public void setColor(Color color)
Sets the color of this note.
Parameters:
iColor - the color of the note.
See Also:
MapiProperty.NOTE_COLOR

getWidth


public int getWidth()
Gets the width of this note.
Returns:
the width of the note.
See Also:
MapiProperty.NOTE_WIDTH

setWidth


public void setWidth(int iWidth)
Sets the width of this note.
Parameters:
iWidth - the width of the note.
See Also:
MapiProperty.NOTE_WIDTH

getHeight


public int getHeight()
Gets the height of this note.
Returns:
the height of the note.
See Also:
MapiProperty.NOTE_HEIGHT

setHeight


public void setHeight(int iHeight)
Sets the height of this note.
Parameters:
iHeight - the height of the note.
See Also:
MapiProperty.NOTE_HEIGHT

getFromAddressesString


public java.lang.String getFromAddressesString()
Description copied from class: AbstractMessage
Gets the string representation of a list of from whom the message was sent.
Overrides:
getFromAddressesString in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

getFromAddresses


public java.util.LinkedList getFromAddresses()
Description copied from class: AbstractMessage
Gets the addresses from whom the message was sent.
Overrides:
getFromAddresses in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

setFromAddress


public void setFromAddress(java.lang.String sFromAddress)
Description copied from class: AbstractMessage
Sets the address from whom the message was sent.
Overrides:
setFromAddress in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

setFromAddresses


public void setFromAddresses(java.util.List addresses)
Description copied from class: AbstractMessage
Sets the addresses from whom the message was sent.
Overrides:
setFromAddresses in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

getFrom


public com.compoze.util.mail.InternetAddress[] getFrom()
                                                throws com.compoze.util.mail.AddressException
Gets internet addresses of whom this message was sent.
Overrides:
getFrom in class AbstractMessage
Returns:
array of InternetAddress objects; or null if not set
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
UnsupportedOperationException - if operation is not supported.
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.
Overrides:
setFrom in class AbstractMessage
Parameters:
sAddressList - sequence of internet addresses
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
UnsupportedOperationException - if operation is not supported.
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.
Overrides:
setFrom in class AbstractMessage
Parameters:
addressesList - array of InternetAddress objects
Throws:
UnsupportedOperationException - if operation is not supported.
See Also:
MailHeaderProperty.FROM

getToAddressesString


public java.lang.String getToAddressesString()
Description copied from class: AbstractMessage
Gets the string representation of a list of principal (To) addresses.
Overrides:
getToAddressesString in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

getToAddresses


public java.util.LinkedList getToAddresses()
Description copied from class: AbstractMessage
Gets the principal (To) addresses.
Overrides:
getToAddresses in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

setToAddresses


public void setToAddresses(java.util.List addresses)
Description copied from class: AbstractMessage
Sets the principal (To) addresses.
Overrides:
setToAddresses in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

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.
Overrides:
getToRecipients in class AbstractMessage
Returns:
array of InternetAddress objects; or null if not set
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
UnsupportedOperationException - if operation is not supported.
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.
Overrides:
setToRecipients in class AbstractMessage
Parameters:
sAddressList - sequence of internet addresses
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
UnsupportedOperationException - if operation is not supported.
See Also:
MailHeaderProperty.TO

setToRecipients


public void setToRecipients(com.compoze.util.mail.InternetAddress[] addressList)
Sets "To" (principal) field with recipient's internet addresses.
Overrides:
setToRecipients in class AbstractMessage
Parameters:
addressList - array of InternetAddress objects
Throws:
UnsupportedOperationException - if operation is not supported.
See Also:
MailHeaderProperty.TO

getCcAddressesString


public java.lang.String getCcAddressesString()
Description copied from class: AbstractMessage
Gets the string representation of a list of carbon copy (Cc) addresses.
Overrides:
getCcAddressesString in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

getCcAddresses


public java.util.LinkedList getCcAddresses()
Description copied from class: AbstractMessage
Gets the carbon copy (Cc) addresses.
Overrides:
getCcAddresses in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

setCcAddresses


public void setCcAddresses(java.util.List addresses)
Description copied from class: AbstractMessage
Sets the carbon copy (Cc) addresses.
Overrides:
setCcAddresses in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

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.
Overrides:
getCcRecipients in class AbstractMessage
Returns:
array of InternetAddress objects; or null if not set
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
UnsupportedOperationException - if operation is not supported.
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.
Overrides:
setCcRecipients in class AbstractMessage
Parameters:
sAddressList - sequence of internet addresses
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
UnsupportedOperationException - if operation is not supported.
See Also:
MailHeaderProperty.CC

setCcRecipients


public void setCcRecipients(com.compoze.util.mail.InternetAddress[] addressesList)
Sets "Cc" (carbon copy) field with recipient's internet addresses.
Overrides:
setCcRecipients in class AbstractMessage
Parameters:
addressesList - array of InternetAddress objects
Throws:
UnsupportedOperationException - if operation is not supported.
See Also:
MailHeaderProperty.CC

getBccAddressesString


public java.lang.String getBccAddressesString()
Description copied from class: AbstractMessage
Gets the string representation of a list of blind carbon copy (Bcc) addresses.
Overrides:
getBccAddressesString in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

getBccAddresses


public java.util.LinkedList getBccAddresses()
Description copied from class: AbstractMessage
Gets the blind carbon copy (Bcc) addresses.
Overrides:
getBccAddresses in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

setBccAddresses


public void setBccAddresses(java.util.List addresses)
Description copied from class: AbstractMessage
Sets the blind carbon copy (Bcc) addresses.
Overrides:
setBccAddresses in class AbstractMessage
Throws:
UnsupportedOperationException - if operation is not supported.

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.
Overrides:
getBccRecipients in class AbstractMessage
Returns:
array of InternetAddress objects; or null if not set
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
UnsupportedOperationException - if operation is not supported.
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.
Overrides:
setBccRecipients in class AbstractMessage
Parameters:
sAddressList - sequence of internet addresses
Throws:
com.compoze.util.mail.AddressException - if parsing of internet addresses fail
UnsupportedOperationException - if operation is not supported.
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.
Overrides:
setBccRecipients in class AbstractMessage
Parameters:
addressList - array of InternetAddress objects
Throws:
UnsupportedOperationException - if operation is not supported.
See Also:
MailHeaderProperty.BCC

addAttachment


public void addAttachment(Attachment attachment)
                   throws ExchangeException
Description copied from class: AbstractMessage
Adds an attachement to this message. Call this method multiple times to add more than one attachment.
Overrides:
addAttachment in class AbstractMessage
Throws:
UnsupportedOperationException - if the addAttachment operation is not supported by this note.

serverGetAttachments


public java.util.List serverGetAttachments()
                                    throws ExchangeException
Description copied from class: AbstractMessage
Queries the server to get a list of the attachments of this message. Use hasAttachment() first to determine if this message has attachments.
Overrides:
serverGetAttachments in class AbstractMessage
Throws:
UnsupportedOperationException - if the getAttachments operation is not supported by this note.

clone


public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.
Overrides:
clone in class AbstractMessage
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 AbstractMessage
Returns:
the string representation of the object.

getDefaultProperties


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

getProperties


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

Compoze Software, Inc.

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