deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.commons.mail
Interface MailMessage

All Known Implementing Classes:
EMailMessage

public interface MailMessage

Interface of a email message.

Version:
$Revision: 18171 $, $Date: 2009-06-17 16:00:07 +0200 (Mi, 17 Jun 2009) $
Author:
Torsten Friebe, last edited by: $Author: mschneider $

Field Summary
static short PART_INLINE
          HTML mulitpart message with inline elements
static short PART_REF
          Mulitpart message with references
static String PLAIN_TEXT
          MIME type text/plain
static String TEXT_HTML
          MIME type text/html
static String TEXT_XML
          MIME type text/xml
 
Method Summary
 String getHeader()
          Return mail header including sender, receiver and subject.
 String getMessageBody()
          Returns the message body
 String getMimeType()
          Returns the MIME type of the message body.
 String getReceiver()
          Returns the receiver mail address
 String getSender()
          Returns the sender
 String getSubject()
          Returns the subject.
 boolean isValid()
          Validates the message.
 void setMessageBody(String message)
          Sets the message body
 void setMimeType(String mimeType)
          Sets the MIME type of the message
 void setReceiver(String to)
          Sets the receiver mail address
 void setSender(String from)
          Sets the sender mail address.
 void setSubject(String title)
          Sets the subject.
 

Field Detail

PLAIN_TEXT

static final String PLAIN_TEXT
MIME type text/plain

See Also:
Constant Field Values

TEXT_HTML

static final String TEXT_HTML
MIME type text/html

See Also:
Constant Field Values

TEXT_XML

static final String TEXT_XML
MIME type text/xml

See Also:
Constant Field Values

PART_INLINE

static final short PART_INLINE
HTML mulitpart message with inline elements

See Also:
Part, Constant Field Values

PART_REF

static final short PART_REF
Mulitpart message with references

See Also:
Part, Constant Field Values
Method Detail

getSubject

String getSubject()
Returns the subject.

Returns:
the subjec string

getSender

String getSender()
Returns the sender

Returns:
the sender mail address

getMessageBody

String getMessageBody()
Returns the message body

Returns:
string representation of the message body

getReceiver

String getReceiver()
Returns the receiver mail address

Returns:
the mail address of the receiver

setReceiver

void setReceiver(String to)
Sets the receiver mail address

Parameters:
to - the receiver mail address

setMessageBody

void setMessageBody(String message)
Sets the message body

Parameters:
message - the string representation of the message body

setSender

void setSender(String from)
Sets the sender mail address.

Parameters:
from - the sender mail address

setSubject

void setSubject(String title)
Sets the subject.

Parameters:
title - the message subject

getHeader

String getHeader()
Return mail header including sender, receiver and subject.

Returns:
string with sender, receiver and subject

setMimeType

void setMimeType(String mimeType)
                 throws UnknownMimeTypeException
Sets the MIME type of the message

Parameters:
mimeType - the MIME type as string
Throws:
UnknownMimeTypeException
See Also:
PLAIN_TEXT, TEXT_HTML, IETF MIME RFC, Part.setContent(java.lang.Object, java.lang.String), Part.setText(java.lang.String)

getMimeType

String getMimeType()
Returns the MIME type of the message body.

Returns:
the MIME type as a string
See Also:
Part.getContentType()

isValid

boolean isValid()
Validates the message.

Returns:
true - if the message is complete, otherwise false.

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>