com.compoze.collab.groupware
Interface IMailMessage

All Superinterfaces
IGroupwareItem, IItem, IMessage, IMessagingItem, Serializable
All Known Subinterfaces:
ICmMailMessage, INonDeliveryReport, IReadReport

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
 
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
 
Method Summary
 IEmbeddedAttachment addEmbeddedAttachment(String sID, String sName, int iPosition)
          Adds an embedded message to this mail message.
 IMailRecipient addRecipient(RecipientType type, String sAddress)
          Adds a recipient to the message.
 IMailRecipient addRecipient(RecipientType type, String sAddress, 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.
 String getBccAddresses()
          Gets the 'bcc' addresses in a displayable format specific to the provider.
 IMailRecipient[] getBccRecipients()
          Gets recipient that are BCC recipients.
 String getCcAddresses()
          Gets the 'cc' addresses in a displayable format specific to the provider.
 IMailRecipient[] getCcRecipients()
          Gets recipient that are CC recipients.
 Date getDateDelivered()
          Gets the date the message was delivered.
 Date getDateSent()
          Gets the date the message was sent.
 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.
 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(String sAddress)
          Removes a recipient from the message.
 void removeRecipient(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, setBody
 
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
 
Methods inherited from interface com.compoze.collab.messaging.IMessagingItem
getBody, setBody
 
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
 

Field Detail

KEYID_DELIVERY_DATE

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

See Also
Constants Summary

KEYID_ENCRYPTED

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

See Also
Constants Summary

KEYID_READ_RECEIPT_REQUESTED

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

See Also
Constants Summary

KEYID_SENDER_NAME

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

See Also
Constants Summary

KEYID_SENDER_ADDRESS

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

See Also
Constants Summary

KEYID_SENT_DATE

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

See Also
Constants Summary

KEYID_SIGNED

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

See Also
Constants Summary

KEYID_UNREAD

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

See Also
Constants Summary

KEYID_DISPLAY_TO

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

See Also
Constants Summary

KEYID_DISPLAY_CC

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

See Also
Constants Summary

KEYID_DISPLAY_BCC

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

See Also
Constants Summary

KEYID_DISPLAY_FROM

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

See Also
Constants Summary

DELIVERY_DATE

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


ENCRYPTED

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

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


SENDER_NAME

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


SENDER_ADDRESS

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


SENT_DATE

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


SIGNED

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

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


DISPLAY_TO

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


DISPLAY_CC

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


DISPLAY_BCC

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


DISPLAY_FROM

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


CLASS

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

Method Detail

addEmbeddedAttachment

IEmbeddedAttachment addEmbeddedAttachment(String sID,
                                          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

IMailRecipient addRecipient(RecipientType type,
                            String sAddress,
                            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)
Throws
CollaborationException
See Also
IMessage.RECIPIENTS

addRecipient

IMailRecipient addRecipient(RecipientType type,
                            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)
Throws
CollaborationException
See Also
IMessage.RECIPIENTS

removeRecipient

void removeRecipient(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)
Throws
CollaborationException
See Also
IMessage.RECIPIENTS

removeRecipient

void removeRecipient(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).
Throws
CollaborationException
See Also
IMessage.RECIPIENTS

removeRecipient

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)
Throws
CollaborationException
See Also
IMessage.RECIPIENTS

getToRecipients

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)
Throws
CollaborationException
See Also
IMessage.RECIPIENTS

getCcRecipients

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)
Throws
CollaborationException
See Also
IMessage.RECIPIENTS

getBccRecipients

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)
Throws
CollaborationException
See Also
IMessage.RECIPIENTS

getRecipientsByType

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)
Throws
CollaborationException
See Also
IMessage.RECIPIENTS

forward

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

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

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

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

Date getDateDelivered()
                      throws CollaborationException
Gets the date the message was delivered.

Returns
the date the message was delivered
Throws
CollaborationException
See Also
DELIVERY_DATE

isEncrypted

boolean isEncrypted()
                    throws CollaborationException
Determines if the message encrypted flag is set.

Returns
if true, the message should be encrypted when it is sent
Throws
CollaborationException
See Also
ENCRYPTED

setEncrypted

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
Throws
CollaborationException
See Also
ENCRYPTED

isReadReceiptRequested

boolean isReadReceiptRequested()
                               throws CollaborationException
Determines if a read receipt is requested.

Returns
if true, a read receipt is requested from the receiving client
Throws
CollaborationException
See Also
READ_RECEIPT_REQUESTED

setReadReceiptRequested

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
Throws
CollaborationException
See Also
READ_RECEIPT_REQUESTED

getDateSent

Date getDateSent()
                 throws CollaborationException
Gets the date the message was sent.

Returns
the date the message was sent
Throws
CollaborationException
See Also
SENT_DATE

isSigned

boolean isSigned()
                 throws CollaborationException
Determines if the message signed flag is set.

Returns
if true, the message should be signed when it is sent
Throws
CollaborationException
See Also
SIGNED

setSigned

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
Throws
CollaborationException
See Also
SIGNED

setUnread

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

boolean isUnread()
                 throws CollaborationException
Gets the unread status.

Returns
true if this message is be unread, false otherwise.
Throws
CollaborationException
See Also
UNREAD

getToAddresses

String getToAddresses()
                      throws CollaborationException
Gets the 'to' addresses in a displayable format specific to the provider.

Returns
the 'to' addresses (not null)
Throws
CollaborationException
See Also
DISPLAY_TO

getCcAddresses

String getCcAddresses()
                      throws CollaborationException
Gets the 'cc' addresses in a displayable format specific to the provider.

Returns
the 'cc' addresses (not null)
Throws
CollaborationException
See Also
DISPLAY_CC

getBccAddresses

String getBccAddresses()
                       throws CollaborationException
Gets the 'bcc' addresses in a displayable format specific to the provider.

Returns
the 'bcc' addresses (not null)
Throws
CollaborationException
See Also
DISPLAY_BCC

getFromAddresses

String getFromAddresses()
                        throws CollaborationException
Gets the 'from' addresses in a displayable format specific to the provider.

Returns
the 'from' addresses (not null)
Throws
CollaborationException
See Also
DISPLAY_FROM

getSender

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

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

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


Copyright © 2006 BEA Systems, Inc. All Rights Reserved