All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.network.mail.base.SummaryHeader

java.lang.Object
   |
   +----com.ibm.network.mail.base.SummaryHeader

public class SummaryHeader
extends Object
implements Serializable
SummaryHeader contains summary information about a message inside a Folder. It contains
  1. Date the message was sent.
  2. Sender's name and e-mail address.
  3. Subject.
  4. Message's status in the folder.
  5. Message's position in the folder.

This class is basically to assist in displaying messages in user interfaces retrieving the message from the folder when requested. It makes the process of retrieving the message and displaying it more efficient. When the folder is deserialized from the persistent stream, it contains a list of SummaryHeaders. Messages are retrieved from the folder file only when user actually wants to see them. Once the message has been retrieved, any subsequent request for displaying the message will be handled by the SummaryHeader directly without having to read it again from the folder file.

Author:
Abdul Majeed Ghadialy
See Also:
Folder

Variable Index

 o DELETED
 o NEW
 o SEEN

Constructor Index

 o SummaryHeader(MimeMessage)
Constructor for SummaryHeader.

Method Index

 o findFlags(SummaryHeader)
Finds Flags corresponding to the 'status' of the message.
 o getDate()
Returns the date the message corresponding to this summary header was sent.
 o getMessage()
Returns the MimeMessage corresponding to this summary header or throws MessageNotReadyException if the message is yet to be retrieved from the Folder.
 o getMsgPointer()
Returns pointer to the beginning of the message in the folder file.
 o getSender()
Returns the name and e-mail address of the sender retrieved from the MimeMessage.
 o getStatus()
Returns the status of the MimeMessage.
 o getSubject()
Returns the subject of the message corresponding to this summary header.
 o isDeleted()
Returns 'true' if the message is marked for deletion in the SummaryHeader.
 o markDeleted(boolean)
Marks the deletion status of the message in the SummaryHeader as specified.
 o setMessage(MimeMessage)
Associates this SummaryHeader with a specified message.
 o setStatus(String)
Sets the status of the message corresponding to this summary header
 o updateStatus()
Updates the status of the SummaryHeader.

Variables

 o DELETED
 public static final String DELETED
 o NEW
 public static final String NEW
 o SEEN
 public static final String SEEN

Constructors

 o SummaryHeader
 public SummaryHeader(MimeMessage msg)
Constructor for SummaryHeader. Creates a SummaryHeader and initializes its fields using the values from msg.

Parameters:
msg - MimeMessage corresponding to this SummaryHeader.

Methods

 o findFlags
 public static Flags findFlags(SummaryHeader hdr)
Finds Flags corresponding to the 'status' of the message.

Parameters:
hdr - SummaryHeader to find Flags.
Returns:
Flags corresponding to hdr.
 o getDate
 public String getDate()
Returns the date the message corresponding to this summary header was sent.

Returns:
the date the message was sent.
 o getMessage
 public MimeMessage getMessage() throws MessageNotReadyException
Returns the MimeMessage corresponding to this summary header or throws MessageNotReadyException if the message is yet to be retrieved from the Folder.

Returns:
MimeMessage associated with this SummaryHeader.
Throws: MessageNotReadyException
if the message is yet to be retrieved from the Folder.
 o getMsgPointer
 public long getMsgPointer()
Returns pointer to the beginning of the message in the folder file.

Returns:
pointer to the beginning of the message in the folder file.
 o getSender
 public String getSender()
Returns the name and e-mail address of the sender retrieved from the MimeMessage.

Returns:
sender's name and e-mail address MimeMessage.
 o getStatus
 public String getStatus()
Returns the status of the MimeMessage. Returns "New and Deleted" if the message is not recent and has been marked as deleted; "New" if the message is not shown to the user atleast once; "" if the message has been shown to the user atleast once;

Returns:
the status of the MimeMessage.
 o getSubject
 public String getSubject()
Returns the subject of the message corresponding to this summary header.

Returns:
subject of the message.
 o isDeleted
 public boolean isDeleted()
Returns 'true' if the message is marked for deletion in the SummaryHeader.

Returns:
deletion status of the message.
 o markDeleted
 public void markDeleted(boolean delete)
Marks the deletion status of the message in the SummaryHeader as specified.

Parameters:
delete - true if message is to be marked for deletion, false otherwise.
 o setMessage
 public void setMessage(MimeMessage message)
Associates this SummaryHeader with a specified message.

Parameters:
message - MimeMessage.
 o setStatus
 public void setStatus(String status)
Sets the status of the message corresponding to this summary header

Parameters:
status - status string which is to be set.
 o updateStatus
 public void updateStatus()
Updates the status of the SummaryHeader.


All Packages  Class Hierarchy  This Package  Previous  Next  Index