|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dtw.webmail.model.JwmaComposeMessage
Class implementing the JwmaComposeMessage model. *
* This implementation is specialized to wrap a * javax.mail.Message for composing. * * @author Dieter Wimberger * @version 0.9.7 07/02/2003
Field Summary | |
static java.lang.String |
X_MAILER_STRING
Defines the X-MAILER set by jwma. |
Method Summary | |
void |
addAttachments(javax.mail.internet.MimeMultipart mmp)
Adds attachments to this JwmaComposeMessage. |
void |
appendBody(java.lang.String str)
Appends to the body of the message. |
void |
closeDraft(JwmaStoreImpl store)
|
static JwmaComposeMessage |
createDraft(javax.mail.Message msg)
|
static JwmaComposeMessage |
createForward(javax.mail.Session ses,
JwmaDisplayMessage msg,
java.lang.String to,
JwmaPreferences prefs,
boolean togglequote,
boolean attfwd)
Creates a JwmaComposeMessage instance. |
static JwmaComposeMessage |
createJwmaComposeMessage(javax.mail.Session ses)
Creates a JwmaComposeMessage instance. |
static JwmaComposeMessage |
createReply(JwmaDisplayMessage msg,
boolean toall,
JwmaPreferences prefs,
boolean togglequote)
Creates a JwmaComposeMessage 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()
Returns the Message instance associated * with this JwmaComposeMessage. |
int |
getMessageNumber()
Returns an int representing the number of this message. |
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 |
isDraft()
|
boolean |
isInvisibleToList()
|
boolean |
isMultipart()
Tests if the message is multipart. |
boolean |
isReceived()
Tests if the message was received. |
boolean |
isReply()
Tests if the message is a reply. |
boolean |
isSent()
Tests if the message was sent. |
boolean |
isSinglepart()
Tests if the message is singlepart. |
void |
openDraft(JwmaStoreImpl store)
|
void |
send(JwmaSession ses)
Sends this instance via the standard convenience Transport.send(). |
void |
setBCCTo(java.lang.String bccto)
Sets the blind carbon copy receiver's address(es) of the message. |
void |
setBody(java.lang.String body)
Sets the body of the message. |
void |
setCCTo(java.lang.String ccto)
Sets the carbon copy receiver's address(es) of the message. |
void |
setFrom(java.lang.String from)
Set the sender(s) address of the message. |
void |
setInvisibleToList(boolean invisibleToList)
|
void |
setReplyTo(java.lang.String from)
Set the Reply-To address(es) of the message. |
void |
setSubject(java.lang.String subject)
Sets the subject of the message. |
void |
setTo(java.lang.String to)
Sets the receiver's address(es) of the message as * String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String X_MAILER_STRING
Method Detail |
public java.lang.String getFullHeader()
JwmaMessage
getFullHeader
in interface JwmaMessage
public int getMessageNumber()
JwmaMessage
This 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 JwmaMessage
public java.util.Date getReceivedDate()
JwmaMessage
getReceivedDate
in interface JwmaMessage
public java.util.Date getSentDate()
JwmaMessage
getSentDate
in interface JwmaMessage
public java.util.Date getDate()
JwmaMessage
getDate
in interface JwmaMessage
public boolean isSent()
JwmaMessage
Note that this method will always return the opposite of isReceived() (i.e. represents !getReceived()).
isSent
in interface JwmaMessage
public boolean isReceived()
JwmaMessage
isReceived
in interface JwmaMessage
public boolean isReply()
public boolean isDraft()
public java.lang.String getFrom()
JwmaMessage
getFrom
in interface JwmaMessage
public void setFrom(java.lang.String from)
public java.lang.String getReplyTo()
JwmaMessage
getReplyTo
in interface JwmaMessage
public void setReplyTo(java.lang.String from)
public java.lang.String getTo()
JwmaMessage
getTo
in interface JwmaMessage
public void setTo(java.lang.String to) throws javax.mail.MessagingException
javax.mail.MessagingException
public boolean isInvisibleToList()
public void setInvisibleToList(boolean invisibleToList)
public java.lang.String getCCTo()
JwmaMessage
getCCTo
in interface JwmaMessage
public void setCCTo(java.lang.String ccto) throws javax.mail.MessagingException
javax.mail.MessagingException
public java.lang.String getBCCTo()
JwmaMessage
getBCCTo
in interface JwmaMessage
public void setBCCTo(java.lang.String bccto) throws javax.mail.MessagingException
javax.mail.MessagingException
public java.lang.String getSubject()
JwmaMessage
getSubject
in interface JwmaMessage
public void setSubject(java.lang.String subject) throws JwmaException
JwmaException
public java.lang.String getBody()
JwmaMessage
Note 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 JwmaMessage
JwmaMessage.isSinglepart()
,
JwmaMessage.isMultipart()
public void setBody(java.lang.String body)
* Note that the body will be the text/plain content of * a singlepart message, and attached as text/plain part to * a multipart message. * * @param body the text/plain content of the message as * String.
public void appendBody(java.lang.String str)
public void addAttachments(javax.mail.internet.MimeMultipart mmp)
public boolean isSinglepart()
JwmaMessage
A singlepart message does not have any attachments.
isSinglepart
in interface JwmaMessage
public boolean isMultipart()
JwmaMessage
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 JwmaMessage
public JwmaMessagePart[] getMessageParts()
JwmaMessage
If 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 JwmaMessage
JwmaMessagePart
,
JwmaMessage.isSinglepart()
,
JwmaMessage.isMultipart()
public javax.mail.Message getMessage()
public void send(JwmaSession ses) throws JwmaException
* Asserts that a sender is set, and creates either a multipart * or a singlepart Message from the data stored * in this instance. * * @throws JwmaException If there is no sender, or if sending fails.
JwmaException
public void openDraft(JwmaStoreImpl store) throws JwmaException
JwmaException
public void closeDraft(JwmaStoreImpl store) throws JwmaException
JwmaException
public static JwmaComposeMessage createJwmaComposeMessage(javax.mail.Session ses)
This factory method should be used to create new instances * of JwmaComposeMessage, which are not a reply to * an already existing message. * * @param ses the mail Session the message is created within. * @return the newly created instance.
public static JwmaComposeMessage createReply(JwmaDisplayMessage msg, boolean toall, JwmaPreferences prefs, boolean togglequote) throws JwmaException
This factory method should be used to create new instances * of JwmaComposeMessage, which are a reply to * an already existing message. *
The reply will address the sender, and if flagged, also all * recipients of the original Message. * * * @param msg the Message to be replied. * @param toall a flag determining wheter the reply should address also all * recipients of the original Message. * @return the newly created instance. * @throws JwmaException if it fails to create the new instance.
JwmaException
public static JwmaComposeMessage createForward(javax.mail.Session ses, JwmaDisplayMessage msg, java.lang.String to, JwmaPreferences prefs, boolean togglequote, boolean attfwd) throws JwmaException
This factory method should be used to create new instances * of JwmaComposeMessage, which are a reply to * an already existing message. *
The reply will address the sender, and if flagged, also all * recipients of the original Message. * * * @param msg the Message to be replied. * @param toall a flag determining wheter the reply should address also all * recipients of the original Message. * @return the newly created instance. * @throws JwmaException if it fails to create the new instance.
JwmaException
public static JwmaComposeMessage createDraft(javax.mail.Message msg) throws JwmaException
JwmaException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |