Jwma

dtw.webmail.model
Interface JwmaMessage

All Known Implementing Classes:
JwmaComposeMessage, JwmaDisplayMessage

public interface JwmaMessage

An interface defining the contract for interaction with the JwmaMessage model.

The JwmaMessage allows a view programmer to obtain information about a message to display it for reading or composing.

Version:
0.9.7 07/02/2003
Author:
Dieter Wimberger

Method Summary
 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.
 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 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.
 

Method Detail

getFullHeader

public java.lang.String getFullHeader()
Returns the full message header as String.

Returns:
the full message header as String.

getMessageNumber

public int getMessageNumber()
Returns an int representing the number of this message.

This number is the unique identifier for a message within a folder, or -1 in case of a message created for being composed.

Returns:
the number of this message, or -1 if newly created for composing.

isReceived

public boolean isReceived()
Tests if the message was received.

Returns:
true if the message was received, false otherwise.

isSent

public boolean isSent()
Tests if the message was sent.

Note that this method will always return the opposite of isReceived() (i.e. represents !getReceived()).

Returns:
true if the message was sent, false otherwise.

getFrom

public java.lang.String getFrom()
Returns a String representing the sender(s) of the message.

Returns:
the sender(s) of the message as String.

getReplyTo

public java.lang.String getReplyTo()
Returns a String representing the Reply-To address(es) of the message.

Returns:
the Reply-To address(es) of the message as String.

getTo

public java.lang.String getTo()
Returns a String representing the receivers(s) of the message.

Returns:
the receiver(s) of the message as String.

getCCTo

public java.lang.String getCCTo()
Returns a String representing the carbon copy receivers(s) of the message.

Returns:
the carbon copy receiver(s) of the message as String.

getBCCTo

public java.lang.String getBCCTo()
Returns a String representing the blind carbon copy receivers(s) of the message.

Returns:
the blind carbon copy receiver(s) of the message as String.

getDate

public java.util.Date getDate()
Convenience method that returns a Date representing the received or sent date of the message. (Depending on whether it was sent or received).

Returns:
the received or sent date of the message.

getReceivedDate

public java.util.Date getReceivedDate()
Returns a Date representing the date when the message was received.

Returns:
the received date of the message.

getSentDate

public java.util.Date getSentDate()
Returns a Date representing the date when the message was sent.

Returns:
the sent date of the message.

getSubject

public java.lang.String getSubject()
Returns a String representing the subject of the message.

Returns:
the subject of the message as String.

getBody

public java.lang.String getBody()
Returns a String representing the body of the message.

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.

Returns:
the content of the message as String.
See Also:
isSinglepart(), isMultipart()

getMessageParts

public JwmaMessagePart[] getMessageParts()
Returns an array of JwmaMessagePart objects.

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.

Returns:
an array of JwmaMessagePart objects each representing information about a part of this message. The array will be empty if this message has no parts.
See Also:
JwmaMessagePart, isSinglepart(), isMultipart()

isSinglepart

public boolean isSinglepart()
Tests if the message is singlepart.

A singlepart message does not have any attachments.

Returns:
true if the message is singlepart, false otherwise.

isMultipart

public boolean isMultipart()
Tests if the message is multipart.

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()).

Returns:
true if the message is multipart, false otherwise.

Jwma

Copyright © 2000-2003 jwma team (All Rights Reserved.)