com.webmethods.caf.faces.data.email
Class EmailDeliverer.MessageBodyDataSource

java.lang.Object
  extended by com.webmethods.caf.faces.data.email.EmailDeliverer.MessageBodyDataSource
All Implemented Interfaces:
DataSource
Enclosing class:
EmailDeliverer

protected static class EmailDeliverer.MessageBodyDataSource
extends Object
implements DataSource

Inner class to EmailDeliverer.

Since:
8.0

Field Summary
protected  String body
           
protected  String contentType
           
protected static String DEFAULT_NAME
          The default name of "HtmlMailDataSource" for this message body.
 
Constructor Summary
EmailDeliverer.MessageBodyDataSource(String body, String contentType)
          Constructor for the message body data source.
 
Method Summary
 String getContentType()
          Get the content type for this data source.
 InputStream getInputStream()
          Get an input stream for the data source's body.
 String getName()
          Get the name of this data source.
 OutputStream getOutputStream()
          Get output stream Not an implemented method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAME

protected static final String DEFAULT_NAME
The default name of "HtmlMailDataSource" for this message body.

See Also:
Constant Field Values

body

protected String body

contentType

protected String contentType
Constructor Detail

EmailDeliverer.MessageBodyDataSource

public EmailDeliverer.MessageBodyDataSource(String body,
                                            String contentType)
Constructor for the message body data source.

Parameters:
body - A body of text content for this source.
contentType - The string that represents a type for this data source.
Method Detail

getContentType

public String getContentType()
Get the content type for this data source.

Specified by:
getContentType in interface DataSource
Returns:
String The value that represents a type for this data source.

getInputStream

public InputStream getInputStream()
                           throws IOException
Get an input stream for the data source's body.

Specified by:
getInputStream in interface DataSource
Returns:
InputStream An stream from this body. An empty stream if the body is null.
Throws:
IOException

getName

public String getName()
Get the name of this data source.

Specified by:
getName in interface DataSource
Returns:
Always returns EmailDeliverer.MessageBodyDataSource.DEFAULT_NAME.

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Get output stream Not an implemented method.

Specified by:
getOutputStream in interface DataSource
Throws:
IOException - Not an implemented method.