public class MailMessagePart
extends javax.mail.internet.MimeBodyPart
Modifier and Type | Class and Description |
---|---|
static class |
MailMessagePart.SpecifiedMimeTypeMap
Extension of FileTypeMap to allow a specify mime-type specified
in the XML description to override whatever FileTypeMap would return
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
encoding |
protected java.lang.String |
filename |
protected java.lang.String |
language |
protected java.lang.String |
m_sMailTemplateDN |
protected java.lang.String |
m_sTemplateAttr |
protected java.lang.String |
mimeType |
protected org.w3c.dom.Document |
replacementData |
protected java.util.Vector |
resourceList |
protected java.lang.String |
stylesheetName |
protected java.lang.String |
templateData |
Constructor and Description |
---|
MailMessagePart(org.w3c.dom.Element message,
StylesheetSource stylesheets,
MailMessage parent)
Construct the message part based on an XML description.
|
Modifier and Type | Method and Description |
---|---|
static org.w3c.dom.Node |
cloneSubtree(org.w3c.dom.Document targetDoc,
org.w3c.dom.Node sourceRoot)
Clone a subtree, possibly into another document.
|
protected void |
construct(StylesheetSource stylesheets)
Construct the message part after parsing the XML description.
|
protected void |
parse(org.w3c.dom.Element message,
StylesheetSource stylesheets)
Parse the XML describing the message part.
|
void |
setFileName(java.lang.String filename)
Set the filename associated with this message part.
|
addHeader, addHeaderLine, attachFile, attachFile, attachFile, attachFile, getAllHeaderLines, getAllHeaders, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getSize, isMimeType, removeHeader, saveFile, saveFile, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setHeader, setText, setText, setText, updateHeaders, writeTo
protected java.lang.String mimeType
protected java.lang.String language
protected java.lang.String stylesheetName
protected java.lang.String templateData
protected org.w3c.dom.Document replacementData
protected java.util.Vector resourceList
protected java.lang.String filename
protected java.lang.String m_sMailTemplateDN
protected java.lang.String m_sTemplateAttr
protected java.lang.String encoding
public MailMessagePart(org.w3c.dom.Element message, StylesheetSource stylesheets, MailMessage parent) throws HandlerException, java.io.FileNotFoundException
message
- <message> or <attachment> elementstylesheets
- A StylesheetSource object from which to load stylesheets, xml
documents, and other files referenced in the describing XML.
is being sent.parent
- MailMessage of which this MailMessagePart of a part of.HandlerException
java.io.FileNotFoundException
protected void parse(org.w3c.dom.Element message, StylesheetSource stylesheets) throws HandlerException, java.io.FileNotFoundException
message
- <message> or <attachment> elementstylesheets
- Source for any files, XML documents, or XSLT stylesheets references in the
mail XML description.
supplied to stylesheets used in construction of message parts.HandlerException
java.io.FileNotFoundException
protected void construct(StylesheetSource stylesheets) throws HandlerException
stylesheets
- Source for any files, XML documents, or XSLT stylesheets references in the
mail XML description.HandlerException
public void setFileName(java.lang.String filename) throws javax.mail.MessagingException
setFileName
in interface javax.mail.Part
setFileName
in class javax.mail.internet.MimeBodyPart
filename
- unnormalized filenamejavax.mail.MessagingException
public static org.w3c.dom.Node cloneSubtree(org.w3c.dom.Document targetDoc, org.w3c.dom.Node sourceRoot)
targetDoc
- target document for the cloned documentsourceRoot
- root of subtree to clone