|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dtw.webmail.model.JwmaMessageInfoImpl
Class implementing the JwmaMessageInfo model. It is designed to wrap the minimum information of a mail message necessary to be listed in a list view.
Method Summary | |
static JwmaMessageInfoImpl |
createJwmaMessageInfoImpl(javax.mail.Message msg)
Factoy method that creates a new JwmaMessageInfoImpl instance. |
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. |
int |
getMessageNumber()
Returns an int representing the number of this message. |
java.lang.Integer |
getNumberForSort()
Returns the message's number as Integer. |
java.util.Date |
getReceivedDate()
Returns a Date representing the date when the message was received. |
java.util.Date |
getSentDate()
Returns a Date representing the date when the message was sent. |
int |
getSize()
Returns the size of the message in bytes. |
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. |
java.lang.String |
getWho()
Convenience method that returns a String representing the sender's or receiver's address of the message. |
boolean |
isAnswered()
Tests if the message was answered. |
boolean |
isDeleted()
Tests if the message was marked for deletion. |
boolean |
isDraft()
Tests if the message is a draft. |
boolean |
isMultipart()
Tests if the message is multipart. |
boolean |
isNew()
Tests if the message is new. |
boolean |
isRead()
Tests if the message was already read. |
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 |
setMessageNumber(int num)
Sets the message number of this MessageInfo. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public int getMessageNumber()
JwmaMessageInfo
This number is the unique identifier for a message within a folder, and should be used on subsequent display, move or delete actions.
getMessageNumber
in interface JwmaMessageInfo
public java.lang.Integer getNumberForSort()
MessageSortingUtil.NUMBER_NUMERICAL
,
MessageSortingUtil.NUMBER_REVERSE_NUMERICAL
public void setMessageNumber(int num)
num
- the number as int.JwmaMessageInfoListImpl.renumber()
public boolean isRead()
JwmaMessageInfo
isRead
in interface JwmaMessageInfo
public boolean isDraft()
JwmaMessageInfo
isDraft
in interface JwmaMessageInfo
public boolean isAnswered()
JwmaMessageInfo
isAnswered
in interface JwmaMessageInfo
public boolean isDeleted()
JwmaMessageInfo
isDeleted
in interface JwmaMessageInfo
public boolean isNew()
JwmaMessageInfo
isNew
in interface JwmaMessageInfo
public boolean isReceived()
JwmaMessageInfo
isReceived
in interface JwmaMessageInfo
public boolean isSent()
JwmaMessageInfo
Note that this method will always return the opposite of isReceived() (i.e. represents !getReceived()).
isSent
in interface JwmaMessageInfo
public java.util.Date getDate()
JwmaMessageInfo
getDate
in interface JwmaMessageInfo
public java.util.Date getReceivedDate()
JwmaMessageInfo
getReceivedDate
in interface JwmaMessageInfo
public java.util.Date getSentDate()
JwmaMessageInfo
getSentDate
in interface JwmaMessageInfo
public java.lang.String getWho()
JwmaMessageInfo
getWho
in interface JwmaMessageInfo
public java.lang.String getFrom()
JwmaMessageInfo
getFrom
in interface JwmaMessageInfo
public java.lang.String getTo()
JwmaMessageInfo
getTo
in interface JwmaMessageInfo
public java.lang.String getSubject()
JwmaMessageInfo
getSubject
in interface JwmaMessageInfo
public boolean isSinglepart()
JwmaMessageInfo
A singlepart message does not have any attachments.
isSinglepart
in interface JwmaMessageInfo
public boolean isMultipart()
JwmaMessageInfo
A 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 JwmaMessageInfo
public int getSize()
JwmaMessageInfo
getSize
in interface JwmaMessageInfo
public static JwmaMessageInfoImpl createJwmaMessageInfoImpl(javax.mail.Message msg) throws JwmaException
msg
- the message to be wrapped as javax.mail.Message.
JwmaException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |