Class AttachmentCoverCreator
- java.lang.Object
-
- com.levigo.jadice.server.mail.worker.AttachmentCoverCreator
-
public class AttachmentCoverCreator extends Object
Creates cover pages for single email attachments.As this is no "single shot" action there is no way to do that in a node–worker construction.
-
-
Constructor Summary
Constructors Constructor Description AttachmentCoverCreator(NodeWorker<?> context, URI stylesheet, String targetMimeType)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream
createCover(StreamDescriptor separatorInformation)
Create a single cover page for a givenStreamDescriptor
.
-
-
-
Constructor Detail
-
AttachmentCoverCreator
public AttachmentCoverCreator(NodeWorker<?> context, URI stylesheet, String targetMimeType)
Constructor. As this class will be calling subworkers, you must provide the context in which it works.- Parameters:
context
- TheNodeWorker
that calls this classstylesheet
- The location of the stylesheet how to layout the cover pagetargetMimeType
- The MIME type of the result (supported: application/pdf and image/tiff
-
-
Method Detail
-
createCover
public Stream createCover(StreamDescriptor separatorInformation) throws Throwable
Create a single cover page for a givenStreamDescriptor
.- Parameters:
separatorInformation
- The information that will appear on the cover page- Returns:
- a cover page as with the specified target MIME types
- Throws:
Throwable
- if the creation fails
-
-