deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.framework.mail
Interface MailMessage

All Known Implementing Classes:
EMailMessage

public interface MailMessage

Interface of a email message.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 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 java.lang.String PLAIN_TEXT
          MIME type text/plain
static java.lang.String TEXT_HTML
          MIME type text/html
static java.lang.String TEXT_XML
          MIME type text/xml
 
Method Summary
 java.lang.String getHeader()
          Return mail header including sender, receiver and subject.
 java.lang.String getMessageBody()
          Returns the message body
 java.lang.String getMimeType()
          Returns the MIME type of the message body.
 java.lang.String getReceiver()
          Returns the receiver mail address
 java.lang.String getSender()
          Returns the sender
 java.lang.String getSubject()
          Returns the subject.
 boolean isValid()
          Validates the message.
 void setMessageBody(java.lang.String message)
          Sets the message body
 void setMimeType(java.lang.String mimeType)
          Sets the MIME type of the message
 void setReceiver(java.lang.String to)
          Sets the receiver mail address
 void setSender(java.lang.String from)
          Sets the sender mail address.
 void setSubject(java.lang.String title)
          Sets the subject.
 

Field Detail

PLAIN_TEXT

static final java.lang.String PLAIN_TEXT
MIME type text/plain

See Also:
Constant Field Values

TEXT_HTML

static final java.lang.String TEXT_HTML
MIME type text/html

See Also:
Constant Field Values

TEXT_XML

static final java.lang.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

java.lang.String getSubject()
Returns the subject.

Returns:
the subjec string

getSender

java.lang.String getSender()
Returns the sender

Returns:
the sender mail address

getMessageBody

java.lang.String getMessageBody()
Returns the message body

Returns:
string representation of the message body

getReceiver

java.lang.String getReceiver()
Returns the receiver mail address

Returns:
the mail address of the receiver

setReceiver

void setReceiver(java.lang.String to)
Sets the receiver mail address

Parameters:
to - the receiver mail address

setMessageBody

void setMessageBody(java.lang.String message)
Sets the message body

Parameters:
message - the string representation of the message body

setSender

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

Parameters:
from - the sender mail address

setSubject

void setSubject(java.lang.String title)
Sets the subject.

Parameters:
title - the message subject

getHeader

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

Returns:
string with sender, receiver and subject

setMimeType

void setMimeType(java.lang.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

java.lang.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 2.5 (2011/06/29 09:44 build-8-official)

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