Class MailBodyCreatorWorker
- java.lang.Object
-
- com.levigo.jadice.server.core.NodeWorker<MailBodyCreatorNode>
-
- com.levigo.jadice.server.mail.worker.MailBodyCreatorWorker
-
- All Implemented Interfaces:
QualifiedLogEventReceiver
,WorkerController<MailBodyCreatorNode>
,Runnable
public class MailBodyCreatorWorker extends NodeWorker<MailBodyCreatorNode>
A worker that renders the body part of an email and also creates a title page that contains the most important information of this email (i.e. TO, CC, subject, attachments, ...).It supports plain text, html and pdf as
InputStream
. If that is a pdf then this worker renders title page and body part separately. Else it merges those pages.
-
-
Constructor Summary
Constructors Constructor Description MailBodyCreatorWorker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
assureMimeTypeIsPresent(Stream result)
com.levigo.jadice.server.mail.worker.internal.HTMLEnhancer
getHTMLEnhancer()
StreamResolverFactory
getStreamResolverFactory()
void
setHtmlConversionHandler(HTMLConversionHandler htmlConversionHandler)
void
setHTMLEnhancer(com.levigo.jadice.server.mail.worker.internal.HTMLEnhancer htmlEnhancer)
void
setRtfConversionHandler(RTFConversionHandler rtfConversionHandler)
void
setStreamResolverFactory(StreamResolverFactory streamResolverFactory)
protected void
work()
Implement this method to let the node perform some useful work.-
Methods inherited from class com.levigo.jadice.server.core.NodeWorker
abort, abortNow, addInputBundle, addOutputBundle, doAbort, doAbortNow, error, error, error, fail, fail, fail, getController, getInputBundle, getInputBundles, getJob, getLimitSupport, getNode, getOutputBundle, getOutputBundles, getServerJob, getState, getStreamTransportFactory, getTransportSender, initialize, isAbortRequested, postWork, preWork, run, setDescriptor, setJob, toString, warn, warn, warn
-
-
-
-
Method Detail
-
getHTMLEnhancer
public com.levigo.jadice.server.mail.worker.internal.HTMLEnhancer getHTMLEnhancer()
-
setHTMLEnhancer
public void setHTMLEnhancer(com.levigo.jadice.server.mail.worker.internal.HTMLEnhancer htmlEnhancer)
-
setStreamResolverFactory
public void setStreamResolverFactory(StreamResolverFactory streamResolverFactory)
-
getStreamResolverFactory
public StreamResolverFactory getStreamResolverFactory()
-
work
protected void work() throws Throwable
Description copied from class:NodeWorker
Implement this method to let the node perform some useful work.Implementors are free to throw whatever exception they see fit. If any
Throwable
is thrown from this method, the failure manager is notified about the fatal failure of the whole pipeline.- Specified by:
work
in classNodeWorker<MailBodyCreatorNode>
- Throws:
Throwable
- in case of processing failure
-
assureMimeTypeIsPresent
protected void assureMimeTypeIsPresent(Stream result)
-
setRtfConversionHandler
public void setRtfConversionHandler(RTFConversionHandler rtfConversionHandler)
-
setHtmlConversionHandler
public void setHtmlConversionHandler(HTMLConversionHandler htmlConversionHandler)
-
-