com.atlassian.confluence.mail
Class XsltMailContentProcessor

java.lang.Object
  extended by com.atlassian.confluence.mail.XsltMailContentProcessor
All Implemented Interfaces:
MailContentProcessor

public class XsltMailContentProcessor
extends Object
implements MailContentProcessor

Transform email content by applying an XSL transform to it. It should be noted that since e-mail content may actually be a collection of XHTML fragments instead of well formed XHTML this MailContentProcessor will temporarily wrap the content in a root element called "temporaryFragmentRootElement" which is automatically removed after processing. You need to be aware of this element to ensure the XSL template configured for this processor handles (and ignores or passes unchanged) this temporary element.


Constructor Summary
XsltMailContentProcessor(String xslResource, XslTransformer transformer, XMLEntityResolver entityResolver, HtmlToXmlConverter htmlToXmlConverter)
           
 
Method Summary
 String process(String input)
          Take the supplied input data and process it in some fashion, returning the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XsltMailContentProcessor

public XsltMailContentProcessor(String xslResource,
                                XslTransformer transformer,
                                XMLEntityResolver entityResolver,
                                HtmlToXmlConverter htmlToXmlConverter)
Method Detail

process

public String process(String input)
Description copied from interface: MailContentProcessor
Take the supplied input data and process it in some fashion, returning the result. If the processing fails then input should be returned as the result.

Specified by:
process in interface MailContentProcessor
Parameters:
input - the content to be processed.
Returns:
the processed version of the content or the same content if processing failed.


Copyright © 2003-2012 Atlassian. All Rights Reserved.