Compoze Software, Inc.

com.compoze.collab.groupware
Interface IMailMessage

All Superinterfaces:
IGroupwareItem, IItem, IMessage, IMessagingItem, java.io.Serializable
All Known Subinterfaces:
IDeliveryReport, IExchangeMessage, IExchangeNonDeliveryReport, IExchangeReadReport, IMapiTaskRequest, IMeetingCancellation, IMeetingNotice, IMeetingNoticeAccepted, IMeetingNoticeDeclined, IMeetingNoticeTentative, IMeetingRequest, INonDeliveryReport, IReadReport, ITaskNotice, ITaskRequest

public interface IMailMessage
extends IMessage, IGroupwareItem

Classes that implement this interface are messaging in the messaging schema.


Field Summary
static ItemClass CLASS
          The ItemClass that represents a groupware mail message.
static Key DELIVERY_DATE
          Represents the delivery date of a message.
static Key DISPLAY_BCC
          Represents the displayable 'bcc' addresses of the message (in a provider specific format).
static Key DISPLAY_CC
          Represents the displayable 'cc' addresses of the message (in a provider specific format).
static Key DISPLAY_FROM
          Represents the displayable 'from' addresses of the message (in a provider specific format).
static Key DISPLAY_TO
          Represents the displayable 'to' addresses of the message (in a provider specific format).
static Key ENCRYPTED
          Represents the encrypted status of a message.
static int KEYID_DELIVERY_DATE
          The int ID for the DELIVERY_DATE key.
static int KEYID_DISPLAY_BCC
          The int ID for the DISPLAY_BCC key.
static int KEYID_DISPLAY_CC
          The int ID for the DISPLAY_CC key.
static int KEYID_DISPLAY_FROM
          The int ID for the DISPLAY_FROM key.
static int KEYID_DISPLAY_TO
          The int ID for the DISPLAY_TO key.
static int KEYID_ENCRYPTED
          The int ID for the ENCRYPTED key.
static int KEYID_READ_RECEIPT_REQUESTED
          The int ID for the READ_RECEIPT_REQUESTED key.
static int KEYID_SENDER_ADDRESS
          The int ID for the SENDER_ADDRESS key.
static int KEYID_SENDER_NAME
          The int ID for the SENDER_NAME key.
static int KEYID_SENT_DATE
          The int ID for the SENT_DATE key.
static int KEYID_SIGNED
          The int ID for the SIGNED key.
static int KEYID_UNREAD
          The int ID for the UNREAD key.
static Key READ_RECEIPT_REQUESTED
          Represents the read receipt requested status of a message.
static Key SENDER_ADDRESS
          Represents the sender address of a message.
static Key SENDER_NAME
          Represents the sender name of a message.
static Key SENT_DATE
          Represents the sent date of a message.
static Key SIGNED
          Represents the signed status of a message.
static Key UNREAD
          Represents the unread status of a message.
 
Fields inherited from interface com.compoze.collab.messaging.IMessage
KEYID_RECIPIENTS, RECIPIENTS
 
Fields inherited from interface com.compoze.collab.messaging.IMessagingItem
BODY, BODY_HTML, KEYID_BODY, KEYID_BODY_HTML
 
Fields inherited from interface com.compoze.collab.IItem
ID, ITEM_CLASS, KEYID_ID, KEYID_ITEM_CLASS, KEYID_PARENT_ID, MINIMUM_ITEM_KEYS, PARENT_ID
 
Fields inherited from interface com.compoze.collab.groupware.IGroupwareItem
CATEGORIES, DATE_CREATED, DATE_LAST_MODIFIED, IMPORTANCE, KEYID_CATEGORIES, KEYID_DATE_CREATED, KEYID_DATE_LAST_MODIFIED, KEYID_IMPORTANCE, KEYID_SIZE, KEYID_SUBJECT, SIZE, SUBJECT
 
Method Summary
 IEmbeddedAttachment addEmbeddedAttachment(java.lang.String sID, java.lang.String sName, int iPosition)
          Adds an embedded message to this mail message.
 IMailRecipient addRecipient(RecipientType type, java.lang.String sAddress)
          Adds a recipient to the message.
 IMailRecipient addRecipient(RecipientType type, java.lang.String sAddress, java.lang.String sName)
          Adds a recipient to the message.
 IMailMessage forward(IContainer container)
          Creates a message that is suitable for forwarding and brings back the minimum properties on the new message.
 IMailMessage forward(IContainer container, FetchProfile fp)
          Creates a message that is suitable for forwarding.
 java.lang.String getBccAddresses()
          Gets the 'bcc' addresses in a displayable format specific to the provider.
 IMailRecipient[] getBccRecipients()
          Gets recipient that are BCC recipients.
 java.lang.String getCcAddresses()
          Gets the 'cc' addresses in a displayable format specific to the provider.
 IMailRecipient[] getCcRecipients()
          Gets recipient that are CC recipients.
 java.util.Date getDateDelivered()
          Gets the date the message was delivered.
 java.util.Date getDateSent()
          Gets the date the message was sent.
 java.lang.String getFromAddresses()
          Gets the 'from' addresses in a displayable format specific to the provider.
 IMailRecipient[] getRecipientsByType(RecipientType type)
          Gets the recipients by recipient type.
 Sender getSender()
          Gets the sender for this mail message.
 java.lang.String getToAddresses()
          Gets the 'to' addresses in a displayable format specific to the provider.
 IMailRecipient[] getToRecipients()
          Gets recipient that are TO recipients.
 boolean isEncrypted()
          Determines if the message encrypted flag is set.
 boolean isReadReceiptRequested()
          Determines if a read receipt is requested.
 boolean isSigned()
          Determines if the message signed flag is set.
 boolean isUnread()
          Gets the unread status.
 void removeRecipient(IMailRecipient recipient)
          Removes a recipient from the message.
 void removeRecipient(java.lang.String sAddress)
          Removes a recipient from the message.
 void removeRecipient(java.lang.String sAddress, RecipientType type)
          Removes a recipient from the message.
 IMailMessage reply(IContainer container, boolean bAll)
          Creates a message that is suitable to be sent to the recipients already on a message.
 IMailMessage reply(IContainer container, FetchProfile fp, boolean bAll)
          Creates a message that is suitable to be sent to the recipients already on a message and brings back the minimum properties on the new message.
 void send(boolean bDelete)
          Sends the message, optionally deleting it after submit.
 void send(IContainer copyTo)
          Sends the message, optionally saving it to a folder.
 void setEncrypted(boolean bEncrypted)
          Sets the encrypted flag on the message.
 void setReadReceiptRequested(boolean bReadReceiptRequested)
          Sets the read receipt requested flag of the message.
 void setSigned(boolean bSigned)
          Sets the signed flag on the message.
 void setUnread(boolean bUnread)
          Sets the unread flag.
 
Methods inherited from interface com.compoze.collab.messaging.IMessage
addRecipient, getRecipients, send, setRecipients
 
Methods inherited from interface com.compoze.collab.messaging.IMessagingItem
getBody, getBodyHtml, setBody, setBodyHtml
 
Methods inherited from interface com.compoze.collab.IItem
commit, containsKey, containsKey, copyProperties, copyTo, delete, fetchProperties, getAttribute, getEnum, getID, getInputStream, getItemClass, getOutputStream, getParent, getParent, getParentID, getProperties, getProperties, getProperties, getProperty, getProperty, getProperty, getReader, getRootContainer, getSession, getWriter, isMissing, moveTo, removeAttribute, removeProperty, setAttribute, setProperties, setProperty, setProperty, setProperty
 
Methods inherited from interface com.compoze.collab.groupware.IGroupwareItem
getBodyHtml, getBodyHtml, getCategories, getDateCreated, getDateLastModified, getImportance, getNormalizedSubject, getSize, getSubject, getSubject, getSubjectPrefix, setBodyHtml, setCategories, setImportance, setSubject
 

Field Detail

KEYID_DELIVERY_DATE


public static final int KEYID_DELIVERY_DATE
The int ID for the DELIVERY_DATE key.

KEYID_ENCRYPTED


public static final int KEYID_ENCRYPTED
The int ID for the ENCRYPTED key.

KEYID_READ_RECEIPT_REQUESTED


public static final int KEYID_READ_RECEIPT_REQUESTED
The int ID for the READ_RECEIPT_REQUESTED key.

KEYID_SENDER_NAME


public static final int KEYID_SENDER_NAME
The int ID for the SENDER_NAME key.

KEYID_SENDER_ADDRESS


public static final int KEYID_SENDER_ADDRESS
The int ID for the SENDER_ADDRESS key.

KEYID_SENT_DATE


public static final int KEYID_SENT_DATE
The int ID for the SENT_DATE key.

KEYID_SIGNED


public static final int KEYID_SIGNED
The int ID for the SIGNED key.

KEYID_UNREAD


public static final int KEYID_UNREAD
The int ID for the UNREAD key.

KEYID_DISPLAY_TO


public static final int KEYID_DISPLAY_TO
The int ID for the DISPLAY_TO key.

KEYID_DISPLAY_CC


public static final int KEYID_DISPLAY_CC
The int ID for the DISPLAY_CC key.

KEYID_DISPLAY_BCC


public static final int KEYID_DISPLAY_BCC
The int ID for the DISPLAY_BCC key.

KEYID_DISPLAY_FROM


public static final int KEYID_DISPLAY_FROM
The int ID for the DISPLAY_FROM key.

DELIVERY_DATE


public static final Key DELIVERY_DATE
Represents the delivery date of a message.

ENCRYPTED


public static final Key ENCRYPTED
Represents the encrypted status of a message. Indicating that a message is encrypted just means that it should be encrypted when it is sent, not necessarily that it definitely will be.

READ_RECEIPT_REQUESTED


public static final Key READ_RECEIPT_REQUESTED
Represents the read receipt requested status of a message.

SENDER_NAME


public static final Key SENDER_NAME
Represents the sender name of a message. This key is read-only.

SENDER_ADDRESS


public static final Key SENDER_ADDRESS
Represents the sender address of a message. This key is read-ony.

SENT_DATE


public static final Key SENT_DATE
Represents the sent date of a message.

SIGNED


public static final Key SIGNED
Represents the signed status of a message. Indicating that a message is signed just means that it should be digitally signed when it is sent, not necessarily that it definitely will be.

UNREAD


public static final Key UNREAD
Represents the unread status of a message.

DISPLAY_TO


public static final Key DISPLAY_TO
Represents the displayable 'to' addresses of the message (in a provider specific format).

DISPLAY_CC


public static final Key DISPLAY_CC
Represents the displayable 'cc' addresses of the message (in a provider specific format).

DISPLAY_BCC


public static final Key DISPLAY_BCC
Represents the displayable 'bcc' addresses of the message (in a provider specific format).

DISPLAY_FROM


public static final Key DISPLAY_FROM
Represents the displayable 'from' addresses of the message (in a provider specific format).

CLASS


public static final ItemClass CLASS
The ItemClass that represents a groupware mail message.
Method Detail

addEmbeddedAttachment


public IEmbeddedAttachment addEmbeddedAttachment(java.lang.String sID,
                                                 java.lang.String sName,
                                                 int iPosition)
                                          throws CollaborationException
Adds an embedded message to this mail message.
Parameters:
sID - the id of the message to embed
sName - the display name of the embedded attachment
iPosition - the position of the embedded attachment
Returns:
the embedded attachment
Throws:
CollaborationException - if there was an error creating the embedded attachment

addRecipient


public IMailRecipient addRecipient(RecipientType type,
                                   java.lang.String sAddress,
                                   java.lang.String sName)
                            throws CollaborationException
Adds a recipient to the message.
Parameters:
type - the RecipientType to add (must not be null)
sAddress - the user address (must not be null)
sName - the user name (may be null)
See Also:
IMessage.RECIPIENTS

addRecipient


public IMailRecipient addRecipient(RecipientType type,
                                   java.lang.String sAddress)
                            throws CollaborationException
Adds a recipient to the message.
Parameters:
type - the RecipientType to add (must not be null)
sAddress - the user address (must not be null)
See Also:
IMessage.RECIPIENTS

removeRecipient


public void removeRecipient(java.lang.String sAddress)
                     throws CollaborationException
Removes a recipient from the message. Since no recipient type is specified the first occurrence of the recipient in either the TO, CC or BCC fields will be removed.
Specified by:
removeRecipient in interface IMessage
Parameters:
sAddress - the address to remove (not null)
See Also:
IMessage.RECIPIENTS

removeRecipient


public void removeRecipient(java.lang.String sAddress,
                            RecipientType type)
                     throws CollaborationException
Removes a recipient from the message. If two or more recipient of the same address and type exist on the message, only the first one encountered is removed.
Parameters:
sAddress - the address to remove (not null)
type - the type of recipient to remove (not null).
See Also:
IMessage.RECIPIENTS

removeRecipient


public void removeRecipient(IMailRecipient recipient)
                     throws CollaborationException
Removes a recipient from the message. If two or more recipient of the same address and type exist on the message, only the first one encountered is removed.
Parameters:
recipient - the recipient to remove (not null)
See Also:
IMessage.RECIPIENTS

getToRecipients


public IMailRecipient[] getToRecipients()
                                 throws CollaborationException
Gets recipient that are TO recipients.
Returns:
an array of recipients, length will be zero if no recipients match that type (not null)
See Also:
IMessage.RECIPIENTS

getCcRecipients


public IMailRecipient[] getCcRecipients()
                                 throws CollaborationException
Gets recipient that are CC recipients.
Returns:
an array of recipients, length will be zero if no recipients match that type (not null)
See Also:
IMessage.RECIPIENTS

getBccRecipients


public IMailRecipient[] getBccRecipients()
                                  throws CollaborationException
Gets recipient that are BCC recipients.
Returns:
an array of recipients, length will be zero if no recipients match that type (not null)
See Also:
IMessage.RECIPIENTS

getRecipientsByType


public IMailRecipient[] getRecipientsByType(RecipientType type)
                                     throws CollaborationException
Gets the recipients by recipient type.
Parameters:
type - the type of recipient to find
Returns:
an array of recipients, or a zero length array if no recipients with the type are found (not null)
See Also:
IMessage.RECIPIENTS

forward


public IMailMessage forward(IContainer container)
                     throws CollaborationException
Creates a message that is suitable for forwarding and brings back the minimum properties on the new message.
Parameters:
container - the container to place the new message in (not null)
Returns:
a message that can be sent to another recipient (not null)
Throws:
CollaborationException - if the provider could not create a message suitable for forwarding

forward


public IMailMessage forward(IContainer container,
                            FetchProfile fp)
                     throws CollaborationException
Creates a message that is suitable for forwarding.
Parameters:
container - the container to place the forwarded message in (not null)
fp - the properties to fetch on the message (not null)
Returns:
a message that can be sent to another recipient (not null)
Throws:
CollaborationException - if the provider could not create a message suitable for forwarding

reply


public IMailMessage reply(IContainer container,
                          boolean bAll)
                   throws CollaborationException
Creates a message that is suitable to be sent to the recipients already on a message.
Parameters:
container - the container to place the forwarded message
bAll - set to true to reply to all recipients on the message; false to reply to only the sender
Returns:
a message that can be sent to the sender and optionally other recipients on the message (not null)
Throws:
CollaborationException - if the provider could not create a message suitable for replying

reply


public IMailMessage reply(IContainer container,
                          FetchProfile fp,
                          boolean bAll)
                   throws CollaborationException
Creates a message that is suitable to be sent to the recipients already on a message and brings back the minimum properties on the new message.
Parameters:
container - the container to place the new message in (not null)
fp - the properties to fetch on the new message (not null)
bAll - set to true to reply to all recipients on the message; false to reply to only the sender
Returns:
a message that can be sent to the sender and optionally other recipients on the message (not null)
Throws:
CollaborationException - if the provider could not create a message suitable for replying

getDateDelivered


public java.util.Date getDateDelivered()
                                throws CollaborationException
Gets the date the message was delivered.
Returns:
the date the message was delivered
See Also:
DELIVERY_DATE

isEncrypted


public boolean isEncrypted()
                    throws CollaborationException
Determines if the message encrypted flag is set.
Returns:
if true, the message should be encrypted when it is sent
See Also:
ENCRYPTED

setEncrypted


public void setEncrypted(boolean bEncrypted)
                  throws CollaborationException
Sets the encrypted flag on the message.
Parameters:
bEncrypted - if true, the message should be encrypted when it is sent
See Also:
ENCRYPTED

isReadReceiptRequested


public boolean isReadReceiptRequested()
                               throws CollaborationException
Determines if a read receipt is requested.
Returns:
if true, a read receipt is requested from the receiving client
See Also:
READ_RECEIPT_REQUESTED

setReadReceiptRequested


public void setReadReceiptRequested(boolean bReadReceiptRequested)
                             throws CollaborationException
Sets the read receipt requested flag of the message.
Parameters:
bReadReceiptRequested - if true, set the read receipt requested flag of the message
See Also:
READ_RECEIPT_REQUESTED

getDateSent


public java.util.Date getDateSent()
                           throws CollaborationException
Gets the date the message was sent.
Returns:
the date the message was sent
See Also:
SENT_DATE

isSigned


public boolean isSigned()
                 throws CollaborationException
Determines if the message signed flag is set.
Returns:
if true, the message should be signed when it is sent
See Also:
SIGNED

setSigned


public void setSigned(boolean bSigned)
               throws CollaborationException
Sets the signed flag on the message.
Parameters:
bSigned - if true, the message should be signed when it is sent
See Also:
SIGNED

setUnread


public void setUnread(boolean bUnread)
               throws CollaborationException
Sets the unread flag.
Parameters:
bUnread - true if this message should be unread, false otherwise.
Throws:
CollaborationException -  
See Also:
UNREAD

isUnread


public boolean isUnread()
                 throws CollaborationException
Gets the unread status.
Returns:
true if this message is be unread, false otherwise.
Throws:
CollaborationException -  
See Also:
UNREAD

getToAddresses


public java.lang.String getToAddresses()
                                throws CollaborationException
Gets the 'to' addresses in a displayable format specific to the provider.
Returns:
the 'to' addresses (not null)
See Also:
DISPLAY_TO

getCcAddresses


public java.lang.String getCcAddresses()
                                throws CollaborationException
Gets the 'cc' addresses in a displayable format specific to the provider.
Returns:
the 'cc' addresses (not null)
See Also:
DISPLAY_CC

getBccAddresses


public java.lang.String getBccAddresses()
                                 throws CollaborationException
Gets the 'bcc' addresses in a displayable format specific to the provider.
Returns:
the 'bcc' addresses (not null)
See Also:
DISPLAY_BCC

getFromAddresses


public java.lang.String getFromAddresses()
                                  throws CollaborationException
Gets the 'from' addresses in a displayable format specific to the provider.
Returns:
the 'from' addresses (not null)
See Also:
DISPLAY_FROM

getSender


public Sender getSender()
                 throws CollaborationException
Gets the sender for this mail message.
Returns:
the sender
Throws:
CollaborationException - if there was an error getting the sender information
See Also:
SENDER_NAME, SENDER_ADDRESS

send


public void send(IContainer copyTo)
          throws CollaborationException
Sends the message, optionally saving it to a folder.
Parameters:
copyTo - the container to move the message (use null to leave the message)
Throws:
CollaborationException - if there was an error commiting the item

send


public void send(boolean bDelete)
          throws CollaborationException
Sends the message, optionally deleting it after submit.
Parameters:
bDelete - true to delete the message, false to leave it.
Throws:
CollaborationException - if there was an error commiting the item

Compoze Software, Inc.

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