Package com.levigo.jadice.server.mail
Class MailBodyCreatorNode
- java.lang.Object
-
- com.levigo.jadice.server.internal.NodeInternal
-
- com.levigo.jadice.server.Node
-
- com.levigo.jadice.server.mail.MailBodyCreatorNode
-
public class MailBodyCreatorNode extends Node
ThisNodetries 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 (seeAttachmentDirectory).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
Nodeis located on client side, it is not recommended to use it directly but via the scriptEmailConversion.groovyIts worker respects
PageCountLimits.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMailBodyCreatorNode.HtmlProcessingModeThe possible options to handle images in the html body when performing email conversions.-
Nested classes/interfaces inherited from class com.levigo.jadice.server.Node
Node.Cardinality
-
-
Field Summary
Fields Modifier and Type Field Description static StringBINARY_BODY_PLACEHOLDER_MIMETYPEMIME type to signalize that the converted mail has a binary body that cannot be treated by this node.static URIDEFAULT_STYLE_SHEET
-
Constructor Summary
Constructors Constructor Description MailBodyCreatorNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttachmentDirectorygetAttachmentDirectory()StreamDescriptorgetHeaderInformation()MailBodyCreatorNode.HtmlProcessingModegetHtmlProcessingMode()URIgetStyleSheet()StringgetWorkerClassName()Return the node's associatedcom.levigo.jadice.server.core.NodeWorkerfull qualified class's name.booleanisAllowExternalHTTPResolution()Get whether to allow the resolution (loading) of external HTTP resources.booleanisGenerateHyperlinks()voidsetAllowExternalHTTPResolution(boolean allowExternalURLResolution)Set whether to allow the resolution (loading) of external HTTP resources.voidsetAttachmentDirectory(AttachmentDirectory attachmentDirectory)voidsetGenerateHyperlinks(boolean generate)Determine if the resulting PDF document shall have hyperlinks to external locations (default:true.voidsetHeaderInformation(StreamDescriptor headerInformation)Set a specialStreamDescriptorif this one contains the header information that shall be rendered within the mail.voidsetHtmlProcessingMode(MailBodyCreatorNode.HtmlProcessingMode htmlProcessingMode)Determine if the handling of images in the html body of emails should be handled differently.voidsetStyleSheet(URI styleSheet)protected voidvalidateConfiguration()-
Methods inherited from class com.levigo.jadice.server.Node
addTransportReceiver, appendSuccessor, apply, equals, getInputCardinality, getJob, getOutputCardinality, getPredecessors, getSubsidiaryNodes, getSuccessors, getTransportSender, getUUID, hashCode, initialize, prependPredecessor, remove
-
-
-
-
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
-
-
Method Detail
-
getWorkerClassName
public String getWorkerClassName()
Description copied from class:NodeReturn the node's associatedcom.levigo.jadice.server.core.NodeWorkerfull 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.
This behavior can be overridden in concrete subclasses.
- Overrides:
getWorkerClassNamein classNode- 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)
-
getAttachmentDirectory
public AttachmentDirectory getAttachmentDirectory()
- Returns:
- An
AttachmentDirectorythat lists all attachment of the email to render
-
setAttachmentDirectory
public void setAttachmentDirectory(AttachmentDirectory attachmentDirectory)
-
getHeaderInformation
public StreamDescriptor getHeaderInformation()
- Returns:
- A special
StreamDescriptordescriptor hat contains the header information, if this property was set. Else null.
-
setHeaderInformation
public void setHeaderInformation(StreamDescriptor headerInformation)
Set a specialStreamDescriptorif this one contains the header information that shall be rendered within the mail. If not set the information is taken from theStreamBundlesStreamDescriptors.- 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:
trueiff 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-trueif resolving resources from external URLs shall be allowed.falseotherwise
-
validateConfiguration
protected void validateConfiguration() throws ConfigurationException- Overrides:
validateConfigurationin classNode- Throws:
ConfigurationException
-
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- iftruehyperlinks will be embedded in the resulting PDF document- Since:
- jadice server 5.2.3.0
-
getHtmlProcessingMode
public MailBodyCreatorNode.HtmlProcessingMode getHtmlProcessingMode()
-
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 ofMailBodyCreatorNode.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
-
-