|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class models a generic message. Msg contains a set of attributes and a "content".
Method Summary | |
---|---|
void |
addContentHandler(ContentHandler ch)
Adds a new ContentHandler |
void |
addRecipient(ContactMethod cm)
Add this recipient ContactMethod to the existing ones. |
void |
addRecipients(ContactMethod[] cms)
Add these recipient ContactMethods to the existing ones. |
void |
addReplyTo(ContactMethod cm)
Add this ContactMethod to be replied to |
ContentHandler[] |
getContentHandlers()
Return the ContentHandlers for the content |
Contact[] |
getFrom()
Get the sender(s). |
java.util.Date |
getReceivedDate()
Get the Date this Msg was received. |
ContactMethod[] |
getRecipients()
Get all the recipient ContactMethods for the Msg. |
ContactMethod[] |
getReplyTo()
Get the ContactMethods to which replies should be directed. |
java.util.Date |
getSentDate()
Get the Date this Msg was sent. |
java.lang.String |
getSubject()
Get the subject of this Msg |
java.lang.String |
getText()
Convenience method to get the content of the Msg as a String |
boolean |
isNew()
Accessor for the "new" state |
boolean |
isUnread()
Accessor for the unread state |
Msg |
reply(boolean replyToAll)
Get a new Msg suitable for a reply to this message. |
void |
setContentHandler(ContentHandler ch)
Sets a new ContentHandler |
void |
setContentHandlers(ContentHandler[] chs)
Sets the content of the Msg |
void |
setFrom(Contact c)
Set the "from" Contact for this Msg. |
void |
setFrom(Contact[] cs)
Set the "from" Contact(s) for this Msg. |
void |
setNew(boolean isNew)
Mutator for the "new" state |
void |
setReceivedDate(java.util.Date d)
Set the received Date |
void |
setRecipient(ContactMethod cm)
Set the recipient ContactMethod. |
void |
setRecipients(ContactMethod[] cms)
Set these recipient ContactMethods. |
void |
setReplyTo(ContactMethod cm)
Set the address to which replies should be directed. |
void |
setReplyTo(ContactMethod[] cms)
Set the addresses to which replies should be directed. |
void |
setSentDate(java.util.Date d)
Set the sent Date |
void |
setSubject(java.lang.String s)
Set the subject |
void |
setText(java.lang.String body)
Convenience method to set the content of the Msg to a String |
void |
setUnread(boolean isUnread)
Mutator for the unread state |
Method Detail |
---|
void addRecipient(ContactMethod cm)
cm
- the recipientvoid addRecipients(ContactMethod[] cms)
cms
- the recipientsvoid addReplyTo(ContactMethod cm)
cm
- the reply ContactMethodContactMethod[] getRecipients()
ContentHandler[] getContentHandlers()
Contact[] getFrom()
java.util.Date getReceivedDate()
ContactMethod[] getReplyTo()
java.util.Date getSentDate()
java.lang.String getSubject()
Msg reply(boolean replyToAll)
Get a new Msg suitable for a reply to this message. The new Msg will have its attributes set up appropriately. Note that this new Msg object will be empty, that is, it will not have a "content". These will have to be suitably filled in by the client.
If replyToAll is set, the new Msg will be addressed to all recipients of this message. Otherwise, the reply will be addressed to only the sender of this message (using the value of the getReplyTo method).
The "Subject" field is filled in with the original subject prefixed with "Re: " (unless it already starts with "Re:" (case insensitive)).
replyToAll
- whether to reply to all recipients of the original
message, or just the reply-to ContactMethods
void addContentHandler(ContentHandler ch)
ch
- the new ContentHandlervoid setContentHandler(ContentHandler ch)
ch
- the new ContentHandlervoid setContentHandlers(ContentHandler[] chs)
chs
- the new ContentHandlersvoid setFrom(Contact c)
c
- the Contact for the sendervoid setFrom(Contact[] cs)
cs
- the new sender Contact(s)void setReceivedDate(java.util.Date d)
d
- the Date the Msg was receivedvoid setRecipient(ContactMethod cm)
cm
- the recipientvoid setRecipients(ContactMethod[] cms)
cms
- the recipientsvoid setReplyTo(ContactMethod cm)
cm
- the reply ContactMethodvoid setReplyTo(ContactMethod[] cms)
cms
- the reply ContactMethodsvoid setSentDate(java.util.Date d)
d
- the Date the Msg was sentvoid setSubject(java.lang.String s)
s
- the subjectjava.lang.String getText()
void setText(java.lang.String body)
body
- the text to set as the contentvoid setUnread(boolean isUnread)
isUnread
- whether the Msg has not been readvoid setNew(boolean isNew)
isNew
- whether the Msg is "new"boolean isUnread()
boolean isNew()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |