OpMath

com.opmath.mail
Class SendRequest

java.lang.Object
  |
  +--com.opmath.mail.SendRequest

public class SendRequest
extends Object

A model of the object returned by the HTML mail compose form to the SendServlet.

Copyright: (c) 2002 The Open Math Company Limited

The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.

Since:
J2SE 1.3
Version:
1.0
Author:
Bruno Beloff bruno.beloff@opmath.com

Field Summary
protected static String BCC_PDFLT
          The default initialisation value for the 'BCC' value.
protected static String BCC_PNAME
          The name of the HTTP request parameter carrying the 'BCC' value.
protected static String BODY_PDFLT
          The default initialisation value for the body text value.
protected static String BODY_PNAME
          The name of the HTTP request parameter carrying the body text value.
protected static String CC_PDFLT
          The default initialisation value for the 'CC' value.
protected static String CC_PNAME
          The name of the HTTP request parameter carrying the 'CC' value.
protected static String SUBJECT_PDFLT
          The default initialisation value for the Subject value.
protected static String SUBJECT_PNAME
          The name of the HTTP request parameter carrying the Subject value.
protected static String TO_PNAME
          The name of the HTTP request parameter carrying the 'To' value.
 
Constructor Summary
SendRequest(HttpServletRequest request)
          Create a new SendRequest object.
 
Method Summary
 String getBCC()
          Returns the 'BCC' field of this SendRequest object.
 String getBody()
          Returns the message body of this SendRequest object.
 String getCC()
          Returns the 'CC' field of this SendRequest object.
 String getSubject()
          Returns the Subject field of this SendRequest object.
 String getTo()
          Returns the 'To' field of this SendRequest object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TO_PNAME

protected static final String TO_PNAME

The name of the HTTP request parameter carrying the 'To' value. Set to to.

Since:
J2SE 1.3

CC_PNAME

protected static final String CC_PNAME

The name of the HTTP request parameter carrying the 'CC' value. Set to cc.

Since:
J2SE 1.3

CC_PDFLT

protected static final String CC_PDFLT

The default initialisation value for the 'CC' value. Set to null.

Since:
J2SE 1.3

BCC_PNAME

protected static final String BCC_PNAME

The name of the HTTP request parameter carrying the 'BCC' value. Set to bcc.

Since:
J2SE 1.3

BCC_PDFLT

protected static final String BCC_PDFLT

The default initialisation value for the 'BCC' value. Set to null.

Since:
J2SE 1.3

SUBJECT_PNAME

protected static final String SUBJECT_PNAME

The name of the HTTP request parameter carrying the Subject value. Set to subj.

Since:
J2SE 1.3

SUBJECT_PDFLT

protected static final String SUBJECT_PDFLT

The default initialisation value for the Subject value. Set to "".

Since:
J2SE 1.3

BODY_PNAME

protected static final String BODY_PNAME

The name of the HTTP request parameter carrying the body text value. Set to body.

Since:
J2SE 1.3

BODY_PDFLT

protected static final String BODY_PDFLT

The default initialisation value for the body text value. Set to "".

Since:
J2SE 1.3
Constructor Detail

SendRequest

public SendRequest(HttpServletRequest request)
            throws ParameterFormatException

Create a new SendRequest object. The constructor attempts to instantiate all of the instance variables from the HTTP request parameters.

NOTE 1: If an exception is thrown, some of the instance variables may not have been assigned to any value, and will therefore carry their default Java value, which may be null.

NOTE 2: Only the first parameter name / value pair for each parameter name is used. Any subsequent duplicates are ignored.

NOTE 3: Any parameter name / value pairs whose names do not match any of the instance variables are also ignored.

Parameters:
request - a com.opmath.util.http.HttpServletRequest carrying the request.
Throws:
ParameterFormatException - if a parameter value could not be parsed.
Since:
J2SE 1.3
Method Detail

getTo

public String getTo()

Returns the 'To' field of this SendRequest object.

Returns:
A String carrying the 'To' field value.
Since:
J2SE 1.3

getCC

public String getCC()

Returns the 'CC' field of this SendRequest object.

Returns:
A String carrying the 'CC' field value.
Since:
J2SE 1.3

getBCC

public String getBCC()

Returns the 'BCC' field of this SendRequest object.

Returns:
A String carrying the 'BCC' field value.
Since:
J2SE 1.3

getSubject

public String getSubject()

Returns the Subject field of this SendRequest object.

Returns:
A String carrying the Subject field value.
Since:
J2SE 1.3

getBody

public String getBody()

Returns the message body of this SendRequest object.

Returns:
A String carrying the message body value.
Since:
J2SE 1.3

OpMath

Submit a bug or feature to Open Math
Copyright © 2002 Open Math Company Limited, Brighton, UK