|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--dtw.webmail.model.JwmaDisplayMessage
Class implementing the JwmaMessage model.
This implementation is specialized to wrap a javax.mail.Message for displaying it.
| Constructor Summary | |
protected |
JwmaDisplayMessage(javax.mail.Message msg,
int number)
Constructs a JwmaDisplayMessage instance. |
| Method Summary | |
static JwmaDisplayMessage |
createJwmaDisplayMessage(JwmaMessageInfoImpl msginfo,
javax.mail.Message msg,
JwmaPreferences prefs)
Creates a JwmaDisplayMessage instance. |
static JwmaDisplayMessage |
createJwmaDisplayMessage(javax.mail.Message msg,
JwmaPreferences prefs)
Creates a JwmaDisplayMessage instance. |
java.lang.String |
getBCCTo()
Returns a String representing the blind carbon copy receivers(s) of the message. |
java.lang.String |
getBody()
Returns a String representing the body of the message. |
java.lang.String |
getCCTo()
Returns a String representing the carbon copy receivers(s) of the message. |
java.util.Date |
getDate()
Convenience method that returns a Date representing the received or sent date of the message. |
java.lang.String |
getFrom()
Returns a String representing the sender(s) of the message. |
java.lang.String |
getFullHeader()
Returns the full message header as String. |
javax.mail.Message |
getMessage()
|
int |
getMessageNumber()
Returns an int representing the number of this message. |
JwmaMessagePart |
getMessagePart(int number)
Returns the message part with the given number. |
JwmaMessagePart[] |
getMessageParts()
Returns an array of JwmaMessagePart objects. |
java.util.Date |
getReceivedDate()
Returns a Date representing the date when the message was received. |
java.lang.String |
getReplyTo()
Returns a String representing the Reply-To address(es) of the message. |
java.util.Date |
getSentDate()
Returns a Date representing the date when the message was sent. |
java.lang.String |
getSubject()
Returns a String representing the subject of the message. |
java.lang.String |
getTo()
Returns a String representing the receivers(s) of the message. |
boolean |
isMultipart()
Tests if the message is multipart. |
boolean |
isReceived()
Tests if the message was received. |
boolean |
isSent()
Tests if the message was sent. |
boolean |
isSinglepart()
Tests if the message is singlepart. |
void |
setBody(java.lang.String body)
Sets the body of the message. |
void |
setReplyTo(java.lang.String replyto)
Set the Reply-To address(es) of the message. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected JwmaDisplayMessage(javax.mail.Message msg,
int number)
number - the number of the message as int| Method Detail |
public javax.mail.Message getMessage()
public java.lang.String getFullHeader()
getFullHeader in interface JwmaMessagepublic int getMessageNumber()
JwmaMessageThis number is the unique identifier for a message within a folder, or -1 in case of a message created for being composed.
getMessageNumber in interface JwmaMessagepublic boolean isReceived()
JwmaMessage
isReceived in interface JwmaMessagepublic boolean isSent()
JwmaMessageNote that this method will always return the opposite of isReceived() (i.e. represents !getReceived()).
isSent in interface JwmaMessagepublic java.util.Date getReceivedDate()
JwmaMessage
getReceivedDate in interface JwmaMessagepublic java.util.Date getSentDate()
JwmaMessage
getSentDate in interface JwmaMessagepublic java.util.Date getDate()
JwmaMessage
getDate in interface JwmaMessagepublic java.lang.String getFrom()
JwmaMessage
getFrom in interface JwmaMessagepublic java.lang.String getReplyTo()
JwmaMessage
getReplyTo in interface JwmaMessagepublic void setReplyTo(java.lang.String replyto)
public java.lang.String getTo()
JwmaMessage
getTo in interface JwmaMessagepublic java.lang.String getCCTo()
JwmaMessage
getCCTo in interface JwmaMessagepublic java.lang.String getBCCTo()
JwmaMessage
getBCCTo in interface JwmaMessagepublic java.lang.String getSubject()
JwmaMessage
getSubject in interface JwmaMessagepublic boolean isSinglepart()
JwmaMessageA singlepart message does not have any attachments.
isSinglepart in interface JwmaMessagepublic boolean isMultipart()
JwmaMessageA multipart message has attachments or is composed out of different parts. Note that this method will always return the opposite of isSinglepart() (i.e. represents !isSinglepart()).
isMultipart in interface JwmaMessagepublic java.lang.String getBody()
JwmaMessageNote that the body will be the (plain text) content of a singlepart message. The method will return an empty String for a multipart message.
A view programmer should base display decisions on the isSinglepart() (or isMultipart() method.
getBody in interface JwmaMessageJwmaMessage.isSinglepart(),
JwmaMessage.isMultipart()public void setBody(java.lang.String body)
body - the text/plain content of the message as
String.
public JwmaMessagePart getMessagePart(int number)
throws JwmaException
number - the number of the requested part as int.
JwmaException - if the part does not exist.public JwmaMessagePart[] getMessageParts()
JwmaMessageIf this message does not contain any parts, then this method returns an empty array. Otherwise it contains one JwmaMessagePart object for each part of this message representing information about the part.
A view programmer should base display decisions on the isSinglepart() (or isMultipart() method.
getMessageParts in interface JwmaMessageJwmaMessagePart,
JwmaMessage.isSinglepart(),
JwmaMessage.isMultipart()
public static JwmaDisplayMessage createJwmaDisplayMessage(JwmaMessageInfoImpl msginfo,
javax.mail.Message msg,
JwmaPreferences prefs)
throws JwmaException
msginfo - the JwmaMessageInfoImpl to create
this instance from.msg - the Message to create this instance from.prefs - the user's preferences.
JwmaException - if it fails to create the new instance.
public static JwmaDisplayMessage createJwmaDisplayMessage(javax.mail.Message msg,
JwmaPreferences prefs)
throws JwmaException
msg - the Message to create this instance from.prefs - the user's preferences.
JwmaException - if it fails to create the new instance.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||