Class 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 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 - The NodeWorker that calls this class
        stylesheet - The location of the stylesheet how to layout the cover page
        targetMimeType - 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 given StreamDescriptor.
        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