public class HtmlContentProcessor extends MessageContentProcessor
A MessageContentProcessor which takes in HTML content and 
 converts it into plain text.  The Message content is set based
 on the values of two properties: sendAsHtml and 
 sendAsText.  If both are true, the Message content
 is set to the multipart (with content type 
 "multipart/alternative") containing both the text and the HTML
 versions.  If only sendAsHtml is true, the Message
 content is set to the HTML version.  If only 
 sendAsText is true, the Message content is set to 
 the plain text version.
MessageMessageContentProcessor.UrlAndMimeType| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
CLASS_VERSION
Class version string 
 | 
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
HtmlContentProcessor()  | 
| Modifier and Type | Method and Description | 
|---|---|
char | 
getHrChar()
Returns the char used by the HTML to text converter when 
 constructing a horizontal rule (an <hr> tag). 
 | 
java.util.List | 
getIgnorableContentTags()
Gets the list of tag names which should have their content ignored 
 | 
int | 
getIndentWidth()
Returns the indentation width used by the HTML to text
 converter. 
 | 
char | 
getLiChar()
Returns the char used by the HTML to text converter when 
 displaying list elements inside a <ul> tag. 
 | 
int | 
getLineWidth()
Returns the line width used by the HTML to text converter. 
 | 
boolean | 
getReplaceATagWithHrefAttribute()
Flag to indicate if we should replace all <a> tag contents with the
 tags href attribute (if available) 
 | 
boolean | 
getSendAsHtml()
Returns the property indicating whether message content 
 should be sent as HTML. 
 | 
boolean | 
getSendAsText()
Returns the property indicating whether message content 
 should be sent as plain text. 
 | 
void | 
setHrChar(char pHrChar)
Sets the char used by the HTML to text converter when 
 constructing a horizontal rule (an <hr> tag). 
 | 
void | 
setIgnorableContentTags(java.util.List pIgnorableContentTags)
Sets the list of tags which should have their content ignored 
 | 
void | 
setIndentWidth(int pIndentWidth)
Sets the indentation width used by the HTML to text
 converter. 
 | 
void | 
setLiChar(char pLiChar)
Returns the char used by the HTML to text converter when 
 displaying list elements inside a <ul> tag. 
 | 
void | 
setLineWidth(int pLineWidth)
Sets the line width used by the HTML to text converter. 
 | 
void | 
setMessageContent(javax.mail.Message pMessage,
                 java.lang.String pContent,
                 java.lang.String pContentType,
                 java.io.File[] pAttachments,
                 boolean pInlineAttachments)
Processes the email message content (assumed to be HTML) and 
 stuffs the resulting content into the Message. 
 | 
void | 
setMessageContents(javax.mail.Message pMessage,
                  java.lang.String[] pContents,
                  java.lang.String[] pContentTypes,
                  java.io.File[] pAttachments,
                  boolean pInlineAttachments)
Processes the email message content (assumed to be HTML) and 
 stuffs the resulting content into the Message. 
 | 
void | 
setReplaceATagWithHrefAttribute(boolean pReplaceATagWithHrefAttribute)
Sets mReplaceATagWithHrefAttribute 
 | 
void | 
setSendAsHtml(boolean pSendAsHtml)
Sets the property indicating whether message content should 
 be sent as HTML. 
 | 
void | 
setSendAsText(boolean pSendAsText)
Sets the property indicating whether message content should 
 be sent as plain text. 
 | 
boolean | 
supportsMultipleContents()
We do support multiple contents. 
 | 
pruneAlternatives, setMessageContent, setMessageContentaddLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService, toStringvlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic boolean getSendAsHtml()
sendAsHtml and 
 sendAsText are true, both versions of the 
 content will be sent in a multipart message.public void setSendAsHtml(boolean pSendAsHtml)
sendAsHtml and 
 sendAsText are true, both versions of the 
 content will be sent in a multipart message.public boolean getSendAsText()
sendAsHtml and sendAsText are true, 
 both versions of the content will be sent in a multipart 
 message.public void setSendAsText(boolean pSendAsText)
sendAsHtml and 
 sendAsText are true, both versions of the 
 content will be sent in a multipart message.public int getLineWidth()
public void setLineWidth(int pLineWidth)
public int getIndentWidth()
public void setIndentWidth(int pIndentWidth)
public char getHrChar()
public void setHrChar(char pHrChar)
public char getLiChar()
public void setLiChar(char pLiChar)
public java.util.List getIgnorableContentTags()
public void setIgnorableContentTags(java.util.List pIgnorableContentTags)
pIgnorableContentTags - The IgnorableContentTags to setpublic boolean getReplaceATagWithHrefAttribute()
true if mReplaceATagWithHrefAttributepublic void setReplaceATagWithHrefAttribute(boolean pReplaceATagWithHrefAttribute)
pReplaceATagWithHrefAttribute - The flag to setpublic void setMessageContent(javax.mail.Message pMessage,
                              java.lang.String pContent,
                              java.lang.String pContentType,
                              java.io.File[] pAttachments,
                              boolean pInlineAttachments)
                       throws TemplateEmailException
sendAsText property is set to true, the content 
 is converted into text, and the text version is sent.  If 
 the sendAsHtml property is also true, the HTML
 version is sent along as well.setMessageContent in class MessageContentProcessorpAttachments - the files to attach to the message, in 
 addition to setting the regular contentpInlineAttachments - if true, the files will be inlined 
 into the message, rather than attachedTemplateEmailException - if the content could not be 
 processed or set in the Messagepublic void setMessageContents(javax.mail.Message pMessage,
                               java.lang.String[] pContents,
                               java.lang.String[] pContentTypes,
                               java.io.File[] pAttachments,
                               boolean pInlineAttachments)
                        throws TemplateEmailException
sendAsText property is set to true, the content 
 is converted into text, and the text version is sent.  If 
 the sendAsHtml property is also true, the HTML
 version is sent along as well.setMessageContents in class MessageContentProcessorpAttachments - the files to attach to the message, in 
 addition to setting the regular contentpInlineAttachments - if true, the files will be inlined 
 into the message, rather than attachedpContents - an array of multi-part-alternative contentspContentTypes - an array of content types which correspond
    to each of the pContents elements.TemplateEmailException - if the content could not be 
 processed or set in the Messagepublic boolean supportsMultipleContents()
supportsMultipleContents in class MessageContentProcessor