Enhydra-Oyster 2.1-7 API

org.enhydra.oyster.mail
Class MultipartGenerator

java.lang.Object
  extended byorg.enhydra.oyster.mail.MultipartGenerator

public class MultipartGenerator
extends java.lang.Object

Methods from this class are used in creation of specific MimeMultipart objects other than default multipart/mixed.


Constructor Summary
MultipartGenerator()
           
 
Method Summary
static javax.mail.internet.MimeMultipart getHtmlMultipart(java.io.InputStream content0)
          Returns created MimeMultipart for text/html message with html code given through InputStream.
static javax.mail.internet.MimeMultipart getHtmlMultipart(java.io.InputStream content0, java.lang.String externalPlainText0)
          Returns created MimeMultipart for text/html message with html code given through InputStream.
static javax.mail.internet.MimeMultipart getHtmlMultipart(java.io.InputStream content0, java.lang.String path0, java.io.InputStream[] resources0)
          Returns created MimeMultipart for text/html message with html code given through InputStream, path for resolving relative path of resources defined in html code and array of resources given through InputStream.
static javax.mail.internet.MimeMultipart getHtmlMultipart(java.io.InputStream content0, java.lang.String path0, java.io.InputStream[] resources0, java.lang.String externalPlainText0)
          Returns created MimeMultipart for text/html message with html code given through InputStream, path for resolving relative path of resources defined in html code and array of resources given through InputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipartGenerator

public MultipartGenerator()
Method Detail

getHtmlMultipart

public static javax.mail.internet.MimeMultipart getHtmlMultipart(java.io.InputStream content0)
                                                          throws SMIMEException
Returns created MimeMultipart for text/html message with html code given through InputStream. This method creates html content withouth regarding and resolving html code resource references. Returned MimeMultipart has content-type "multipart/alternative". Text plain interpretation of html message, used in "multipart/alternative" MimeMultipart, is generated automatically according to given html code.

Parameters:
content0 - html code in form of InputStream
Returns:
MimeMultipart with Content-Type: "multipart/alternative".
Throws:
SMIMEException - caused by non SMIMEException which is MessagingException

getHtmlMultipart

public static javax.mail.internet.MimeMultipart getHtmlMultipart(java.io.InputStream content0,
                                                                 java.lang.String externalPlainText0)
                                                          throws SMIMEException
Returns created MimeMultipart for text/html message with html code given through InputStream. This method creates html content withouth regarding and resolving html code resource references. Returned MimeMultipart has content-type "multipart/alternative". Text plain interpretation of html message, used in "multipart/alternative" MimeMultipart, is generated according to given external prepared text message (argument externalPlainText0) or automatically according to given html code if argument externalPlainText0 has value null.

Parameters:
content0 - html code in form of InputStream
externalPlainText0 - external plain text message represented as String. If this argument has value null then autogeneration of text/plain message is performed according to passed html code (content0 argument).
Returns:
MimeMultipart with Content-Type: "multipart/alternative".
Throws:
SMIMEException - caused by non SMIMEException which is MessagingException

getHtmlMultipart

public static javax.mail.internet.MimeMultipart getHtmlMultipart(java.io.InputStream content0,
                                                                 java.lang.String path0,
                                                                 java.io.InputStream[] resources0)
                                                          throws SMIMEException
Returns created MimeMultipart for text/html message with html code given through InputStream, path for resolving relative path of resources defined in html code and array of resources given through InputStream. This method creates html content with resolving html code resource references. Returned MimeMultipart has content-type "multipart/related", and inside itself, this MimeMultipart convey BodyParts with embeded resources, and one BodyPart which holds MimeMultipart with Content-Type "multipart/alternative". text/plain interpretation of html message, used in "multipart/alternative" MimeMultipart, is generated automatically according to given html code.

Parameters:
content0 - html code in form of InputStream
path0 - common path for resolving relative referenced resources in html code atributes of type "src" and "background".
resources0 - array of resources given as array of InputStream. For more information refer to setContent methods of classes from package: org.enhydra.oyster.smime
Returns:
MimeMultipart with Content-Type: "multipart/related".
Throws:
SMIMEException - caused by non SMIMEException which is MessagingException

getHtmlMultipart

public static javax.mail.internet.MimeMultipart getHtmlMultipart(java.io.InputStream content0,
                                                                 java.lang.String path0,
                                                                 java.io.InputStream[] resources0,
                                                                 java.lang.String externalPlainText0)
                                                          throws SMIMEException
Returns created MimeMultipart for text/html message with html code given through InputStream, path for resolving relative path of resources defined in html code and array of resources given through InputStream. This method creates html content with resolving html code resource references. Returned MimeMultipart has content-type "multipart/related", and inside itself, this MimeMultipart convey BodyParts with embeded resources, and one BodyPart which holds MimeMultipart with Content-Type "multipart/alternative". Text plain interpretation of html message, used in "multipart/alternative" MimeMultipart, is generated according to given external prepared text message (argument externalPlainText0) or automatically according to given html code if argument externalPlainText0 has value null.

Parameters:
content0 - html code in form of InputStream
path0 - common path for resolving relative referenced resources in html code atributes of type "src" and "background".
resources0 - array of resources given as array of InputStream. For more information refer to setContent methods of classes from package: org.enhydra.oyster.smime
externalPlainText0 - external plain/text message represented as String. If this argument has value null then autogeneration of text/plain message is performed according to passed html code (content0 argument).
Returns:
MimeMultipart with Content-Type: "multipart/related".
Throws:
SMIMEException - caused by non SMIMEException which is MessagingException

Enhydra-Oyster 2.1-7 API