Class MailBodyCreatorNode


  • public class MailBodyCreatorNode
    extends Node
    This Node tries to create the title page for an email that contains the most important information of the mail header (To, From, CC, subject, ...) and a list of all attachments of this mail (see AttachmentDirectory).

    If possible (i.e. the given stream is plain text oder HTML) the mail body part is merged together with the title page. Else, they occur in different pages.

    Even though this Node is located on client side, it is not recommended to use it directly but via the script EmailConversion.groovy

    Its worker respects PageCountLimits.

    • Field Detail

      • DEFAULT_STYLE_SHEET

        public static final URI DEFAULT_STYLE_SHEET
      • BINARY_BODY_PLACEHOLDER_MIMETYPE

        public static final String BINARY_BODY_PLACEHOLDER_MIMETYPE
        MIME type to signalize that the converted mail has a binary body that cannot be treated by this node.

        See usage in e.g. EmailConversion.groovy

        See Also:
        Constant Field Values
    • Constructor Detail

      • MailBodyCreatorNode

        public MailBodyCreatorNode()
    • Method Detail

      • getWorkerClassName

        public String getWorkerClassName()
        Description copied from class: Node
        Return the node's associated com.levigo.jadice.server.core.NodeWorker full qualified class's name. By default, the worker class name is
        • The same as the node name with the trailing "Node" replaced by "Worker" if the node name ends in "Node"
        • The node class name with an appended "Worker" otherwise.
        The package name of the worker class is the name of the Node's package with an appended ".worker".

        This behavior can be overridden in concrete subclasses.

        Overrides:
        getWorkerClassName in class Node
        Returns:
        the full qualified class name of the worker of this node.
      • getStyleSheet

        public URI getStyleSheet()
        Returns:
        The URI of the style sheet that is used for rendering.
      • setStyleSheet

        public void setStyleSheet​(URI styleSheet)
      • setAttachmentDirectory

        public void setAttachmentDirectory​(AttachmentDirectory attachmentDirectory)
      • getHeaderInformation

        public StreamDescriptor getHeaderInformation()
        Returns:
        A special StreamDescriptor descriptor hat contains the header information, if this property was set. Else null.
      • setHeaderInformation

        public void setHeaderInformation​(StreamDescriptor headerInformation)
        Set a special StreamDescriptor if this one contains the header information that shall be rendered within the mail. If not set the information is taken from the StreamBundles StreamDescriptors.
        Parameters:
        headerInformation - contains the information of the mail header
      • isAllowExternalHTTPResolution

        public boolean isAllowExternalHTTPResolution()
        Get whether to allow the resolution (loading) of external HTTP resources.
        Returns:
        true iff resolution of external HTTP resources is allowed.
      • setAllowExternalHTTPResolution

        public void setAllowExternalHTTPResolution​(boolean allowExternalURLResolution)
        Set whether to allow the resolution (loading) of external HTTP resources.
        Parameters:
        allowExternalURLResolution - true if resolving resources from external URLs shall be allowed. false otherwise
      • isGenerateHyperlinks

        public boolean isGenerateHyperlinks()
      • setGenerateHyperlinks

        public void setGenerateHyperlinks​(boolean generate)
        Determine if the resulting PDF document shall have hyperlinks to external locations (default: true. This setting is only evaluated for e-mails with HTML body.
        Parameters:
        generate - if true hyperlinks will be embedded in the resulting PDF document
        Since:
        jadice server 5.2.3.0
      • setHtmlProcessingMode

        public void setHtmlProcessingMode​(MailBodyCreatorNode.HtmlProcessingMode htmlProcessingMode)
        Determine if the handling of images in the html body of emails should be handled differently. Options can be found in the documentation of MailBodyCreatorNode.HtmlProcessingMode.
        Parameters:
        htmlProcessingMode - the chosen option of how to handle images in the html body when performing email conversions.
        Since:
        jadice server 5.7.0.0