Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.mail
Class AbstractMessage

    java.lang.Object
      |
      +--com.compoze.mail.AbstractMessage

All Implemented Interfaces:
  IMessage, java.io.Serializable

public abstract class AbstractMessage
extends java.lang.Object
implements java.io.Serializable, IMessage

This class provides a skeletal implementation of the `Message` interface, to minimize the effort required to implement the interface.

See Also:
  Serialized Form

Fields inherited from interface com.compoze.mail.IMessage
`MESSAGE_RECIPIENT_BCC, MESSAGE_RECIPIENT_CC, MESSAGE_RECIPIENT_TO`

Constructor Summary
`AbstractMessage()`

Method Summary
`void` | `addAttachment(FileAttachment file)` Adds a file attachment to this message.
`java.lang.String` | `getReceivedDateString(java.text.DateFormat format)` Gets the displayable received date using the specified date format.
`java.lang.String` | `getSentDateString(java.text.DateFormat format)` Gets the displayable sent date using the specified date format.
`java.lang.String` | `getSizeKilos()` Gets the size of this message in kilobytes.
`java.lang.String` | `getSubject(int iLength)` Gets the subject of the message.
`java.lang.String` | `getSubject(java.util.Locale locale)` Gets the subject of this message.
`java.lang.String` | `getSubject(java.util.Locale locale, int iLength)` Gets the subject of the message.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.compoze.mail.IMessage
`addAttachments, addHeader, addRecipients, delete, delete, forward, getAllHeaders, getAttachment, getAttachments, getAttachments, getBcc, getBccString, getBody, getCc, getCcString, getFolderID, getFrom, getFromString, getHeaderValue, getHeaderValues, getID, getReceivedDate, getRecipients, getSentDate, getSize, getSubject, getTo, getToString, hasAttachments, isHighPriority, isUnread, move, removeHeader, removeRecipient, reply, replyAll, saveDraft, send, send, send, setBody, setHeader, setHighPriority, setSubject`

Constructor Detail

### AbstractMessage

    public AbstractMessage()

Method Detail

### getSubject

    public java.lang.String getSubject(int iLength)
                                throws MailException

  Description copied from interface: `IMessage`
  Gets the subject of the message. The subject is truncated after the specified number of characters and "..." is appended to it.
  Specified by:
    `getSubject` in interface `IMessage`
  Following copied from interface: `com.compoze.mail.IMessage`
  Parameters:
    `iLength` - the maximum length of the result (string plus "...")
  Returns:
    the truncated subject of the message

### getSubject

    public java.lang.String getSubject(java.util.Locale locale,
                                       int iLength)
                                throws MailException

  Description copied from interface: `IMessage`
  Gets the subject of the message. The subject is truncated after the specified number of characters and "..." is appended to it.

  The locale is used to determine the `(no subject)` message if the actual message subject is `null` or empty. The `(no subject)` string is configurable in `mail_resources.properties`.

  Specified by:
    `getSubject` in interface `IMessage`
  Following copied from interface: `com.compoze.mail.IMessage`
  Parameters:
    `locale` - the locale to use (may not be `null`)
    `iLength` - the maximum length of the result (string plus "...")
  Returns:
    the truncated subject of the message

### getSubject

    public java.lang.String getSubject(java.util.Locale locale)
                                throws MailException

  Description copied from interface: `IMessage`
  Gets the subject of this message. Returns the `message.no_subject` property from `mail_resources.properties` if the subject is `null` or zero length.

  The locale is used to determine the `(no subject)` message if the actual message subject is `null` or empty. The `(no subject)` string is configurable in `mail_resources.properties`.

  Specified by:
    `getSubject` in interface `IMessage`
  Following copied from interface: `com.compoze.mail.IMessage`
  Parameters:
    `locale` - the locale to use (may not be `null`)
  Returns:
    the subject of this message

### getSentDateString

    public java.lang.String getSentDateString(java.text.DateFormat format)
                                       throws MailException

  Description copied from interface: `IMessage`
  Gets the displayable sent date using the specified date format.
  Specified by:
    `getSentDateString` in interface `IMessage`
  Following copied from interface: `com.compoze.mail.IMessage`
  Parameters:
    `dateFormat` - the date format to use when formating the sent date (may not be `null`)
  Returns:
    the sent date in displayable string form

### getReceivedDateString

    public java.lang.String getReceivedDateString(java.text.DateFormat format)
                                           throws MailException

  Description copied from interface: `IMessage`
  Gets the displayable received date using the specified date format.
  Specified by:
    `getReceivedDateString` in interface `IMessage`
  Following copied from interface: `com.compoze.mail.IMessage`
  Parameters:
    `dateFormat` - the date format to use when formating the received date (may not be `null`)
  Returns:
    the received date in displayable string form

### getSizeKilos

    public java.lang.String getSizeKilos()
                                  throws MailException

  Description copied from interface: `IMessage`
  Gets the size of this message in kilobytes.
  Specified by:
    `getSizeKilos` in interface `IMessage`
  Following copied from interface: `com.compoze.mail.IMessage`
  Returns:
    the size of this message in kilobytes or -1 if the size cannot be determined

### addAttachment

    public void addAttachment(FileAttachment file)
                       throws MailException

  Description copied from interface: `IMessage`
  Adds a file attachment to this message.
  Specified by:
    `addAttachment` in interface `IMessage`
  Following copied from interface: `com.compoze.mail.IMessage`
  Parameters:
    `file` - the file to attach (may not be `null`)
  Throws:
    `MailException` - an error occurs adding the file attachment

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.