Jwma

dtw.webmail.model
Interface JwmaMessageInfo

All Known Implementing Classes:
JwmaMessageInfoImpl

public interface JwmaMessageInfo

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

The JwmaMessageInfo allows a view programmer to obtain enough information about a message to show it in a list of messages. It could be considered as a lightweight proxy interface, concentrated on providing information for lists of messages.

Version:
0.9.7 07/02/2003
Author:
Dieter Wimberger
See Also:
JwmaFolder

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

Method Detail

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, and should be used on subsequent display, move or delete actions.

Returns:
the number of this message.

isRead

public boolean isRead()
Tests if the message was already read.

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

isAnswered

public boolean isAnswered()
Tests if the message was answered.

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

isDeleted

public boolean isDeleted()
Tests if the message was marked for deletion.

Returns:
true if the message was marked for deletion, false otherwise.

isNew

public boolean isNew()
Tests if the message is new.

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

isDraft

public boolean isDraft()
Tests if the message is a draft.

Returns:
true if the message is a draft, false otherwise.

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.

getWho

public java.lang.String getWho()
Convenience method that returns a String representing the sender's or receiver's address of the message. (Depending on whether it was sent or received).

Returns:
the sender's or receiver's address of the message.

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.

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.

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.

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.

getSize

public int getSize()
Returns the size of the message in bytes.

Returns:
size of message in bytes as int.

Jwma

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