Package org.faceless.publisher.ext
Interface MailExtension.Message
- All Superinterfaces:
AbstractBlob
,org.faceless.publisher.ext.MailExtension.Part
- Enclosing class:
- MailExtension
public static interface MailExtension.Message
extends org.faceless.publisher.ext.MailExtension.Part
An abstract interface representing a Mail message
-
Method Summary
Modifier and TypeMethodDescriptionReturn the list of headers for this PartReturn a Map containing all the parts of this messageList<? extends org.faceless.publisher.ext.MailExtension.Part>
For multipart parts, return a List ofMailExtension.Part
that are the children of this part, otherwise return nullReturn an InputStream from which the container (the RFC/822 message including headers) can be readlong
Return the length of the container (the RFC/822 message including headers) in bytes.Return the first value for the specified header, or null if its not set on this PArtgetHeaders
(String header) Return all the values for the specified header, or null if it's not set on this PartReturn the Part object that underlies this Part, usually ajavax.mail.internet.Part
orjakarta.mail.internet.Part
Return the Message-ID for this message, or null if none appliesorg.faceless.publisher.ext.MailExtension.Part
Return theMailExtension.Part
that is the parent of thisMailExtension.Part
, or null if it's the mssagegetType()
Return the type of this part: one of "message", "body-html", "body-plain", "inline", "attachment" or "container"boolean
If this part has a filename specified as part of theContent-Disposition
header, return trueJson
toJson()
Output a Json representation of the message which can be passed to an appropriate template object too generate XML/HTML for parsingMethods inherited from interface org.faceless.publisher.type.AbstractBlob
byteLength, getBytes, getCreationDate, getEmbeddedFile, getFilename, getInputSource, getInputStream, getLastModified, getMediaType, getReader, getSource, getString, getURL, isTrusted
-
Method Details
-
getAllParts
Return a Map containing all the parts of this message -
getContainerSize
long getContainerSize()Return the length of the container (the RFC/822 message including headers) in bytes. -
getContainerInputStream
InputStream getContainerInputStream()Return an InputStream from which the container (the RFC/822 message including headers) can be read -
getMessageId
String getMessageId()Return the Message-ID for this message, or null if none applies -
getType
String getType()Return the type of this part: one of "message", "body-html", "body-plain", "inline", "attachment" or "container" -
getAllHeaders
Return the list of headers for this Part -
getHeaders
Return all the values for the specified header, or null if it's not set on this Part -
getHeader
Return the first value for the specified header, or null if its not set on this PArt -
hasFilename
boolean hasFilename()If this part has a filename specified as part of theContent-Disposition
header, return true -
getParent
org.faceless.publisher.ext.MailExtension.Part getParent()Return theMailExtension.Part
that is the parent of thisMailExtension.Part
, or null if it's the mssage -
getChildren
List<? extends org.faceless.publisher.ext.MailExtension.Part> getChildren()For multipart parts, return a List ofMailExtension.Part
that are the children of this part, otherwise return null -
getMailSource
Object getMailSource()Return the Part object that underlies this Part, usually ajavax.mail.internet.Part
orjakarta.mail.internet.Part
-
toJson
Json toJson()Output a Json representation of the message which can be passed to an appropriate template object too generate XML/HTML for parsing- Returns:
- a Json object
-