|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.mflow.impl.MsgImpl
This class models a generic message. Msg contains a set of attributes and a "content".
Constructor Summary | |
---|---|
MsgImpl()
No-arg version of the constructor, makes a blank Msg |
|
MsgImpl(Msg m)
Copy constructor, fills a new Msg with the values of an existing Msg |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MsgImpl()
public MsgImpl(Msg m)
m
- the Msg to copy attributes fromMethod Detail |
---|
public void addRecipient(ContactMethod cm)
addRecipient
in interface Msg
cm
- the recipientpublic void addRecipients(ContactMethod[] cms)
addRecipients
in interface Msg
cms
- the recipientspublic void addReplyTo(ContactMethod cm)
addReplyTo
in interface Msg
cm
- the reply ContactMethodpublic ContactMethod[] getRecipients()
getRecipients
in interface Msg
public ContentHandler[] getContentHandlers()
getContentHandlers
in interface Msg
public Contact[] getFrom()
getFrom
in interface Msg
public java.util.Date getReceivedDate()
getReceivedDate
in interface Msg
public ContactMethod[] getReplyTo()
getReplyTo
in interface Msg
public java.util.Date getSentDate()
getSentDate
in interface Msg
public java.lang.String getSubject()
getSubject
in interface Msg
public Msg reply(boolean replyToAll)
reply
in interface Msg
replyToAll
- whether to reply to all recipients of the original message, or just the reply-to ContactMethods
public void addContentHandler(ContentHandler ch)
addContentHandler
in interface Msg
ch
- the new ContentHandlerpublic void setContentHandler(ContentHandler ch)
setContentHandler
in interface Msg
ch
- the new ContentHandlerpublic void setContentHandlers(ContentHandler[] chs)
setContentHandlers
in interface Msg
chs
- the new ContentHandlerspublic void setFrom(Contact c)
setFrom
in interface Msg
c
- the Contact for the senderpublic void setFrom(Contact[] cs)
setFrom
in interface Msg
cs
- the new sender Contact(s)public void setReceivedDate(java.util.Date d)
setReceivedDate
in interface Msg
d
- the Date the Msg was receivedpublic void setRecipient(ContactMethod cm)
setRecipient
in interface Msg
cm
- the recipientpublic void setRecipients(ContactMethod[] cms)
setRecipients
in interface Msg
cms
- the recipientspublic void setReplyTo(ContactMethod cm)
setReplyTo
in interface Msg
cm
- the reply ContactMethodpublic void setReplyTo(ContactMethod[] cms)
setReplyTo
in interface Msg
cms
- the reply ContactMethodspublic void setSentDate(java.util.Date d)
setSentDate
in interface Msg
d
- the Date the Msg was sentpublic void setSubject(java.lang.String s)
setSubject
in interface Msg
s
- the subjectpublic java.lang.String getText()
getText
in interface Msg
public void setText(java.lang.String body)
setText
in interface Msg
body
- the text to set as the contentpublic void setUnread(boolean isUnread)
setUnread
in interface Msg
isUnread
- whether the Msg has not been readpublic void setNew(boolean isNew)
setNew
in interface Msg
isNew
- whether the Msg is "new"public boolean isUnread()
isUnread
in interface Msg
public boolean isNew()
isNew
in interface Msg
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |