public class AttachmentDetails
extends java.lang.Object
Constructor and Description |
---|
AttachmentDetails(MessageFile messageFile,
java.lang.String contentType)
Create a new AttachmentDetails object for the given filename, content type and transfer encoding
|
AttachmentDetails(java.lang.String textContent)
Create a new AttachmentDetails object for a String
|
AttachmentDetails(java.lang.String fileName,
java.lang.String contentType)
Create a new AttachmentDetails object for the given filename, content type and transfer encoding
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentTransferEncoding()
The content transfer encoding of the attachment
|
java.lang.String |
getContentType()
The content type of the attachment
|
java.lang.String |
getFileName()
The name of the file holding the attachment or null
|
MessageFile |
getMessageFile()
Return the MessageFile containing the payload, or null if none have been used
|
java.lang.String |
getOriginalFileName()
The original name of the file (not the path) which contained the attachment
|
java.lang.String |
getPayloadHeader(java.lang.String key) |
java.lang.String |
getTextContent()
The text content of the attachment, if the attachment is a String and not a file
|
boolean |
isText()
Is the attachment a String and not a file?
|
void |
setOriginalFileName(java.lang.String originalFileName)
Set the original name of the file containing the attachment
|
java.lang.String |
toString() |
public AttachmentDetails(MessageFile messageFile, java.lang.String contentType)
messageFile
- a MessageFile from a file cache containing the payloadcontentType
- content type of the attachment filepublic AttachmentDetails(java.lang.String fileName, java.lang.String contentType)
fileName
- the complete file name for the attachmentcontentType
- content type of the attachment filepublic AttachmentDetails(java.lang.String textContent)
textContent
- the String holding the input for the attachmentpublic MessageFile getMessageFile()
public java.lang.String getFileName()
public java.lang.String getContentType()
public java.lang.String getContentTransferEncoding()
public java.lang.String getTextContent()
public boolean isText()
public java.lang.String getOriginalFileName()
public void setOriginalFileName(java.lang.String originalFileName)
originalFileName
- the original name of the file containing the attachmentpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getPayloadHeader(java.lang.String key)