Class SendMessageMessageAttachmentData
java.lang.Object
de.xima.fc.form_record.api.message.SendMessageMessageAttachmentData
- All Implemented Interfaces:
IFileData, ISendMessageAttachmentData, Serializable
Default POJO implementation of
ISendMessageAttachmentData- Since:
- 8.4.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]content()Required.Required.fileName()Required.static ISendMessageAttachmentDataofBinaryContent(byte[] content, String fileName, String contentType) Creates a new POJO for form record message attachment with the given binary content.static ISendMessageAttachmentDataCreates a new POJO for an attachment of a form record message, using the given file.
-
Constructor Details
-
SendMessageMessageAttachmentData
-
-
Method Details
-
content
-
fileName
-
contentType
Description copied from interface:IFileDataRequired. The MIME type of the file.- Specified by:
contentTypein interfaceIFileData- Returns:
- The MIME type of the file.
-
ofBinaryContent
public static ISendMessageAttachmentData ofBinaryContent(byte[] content, String fileName, String contentType) Creates a new POJO for form record message attachment with the given binary content.- Parameters:
content- The binary content of the form record message attachment. null is treated as an empty array.fileName- The name of the attachment.contentType- The MIME type of the attachment.- Returns:
- A new POJO for the data of an attachment.
-
ofFile
public static ISendMessageAttachmentData ofFile(Path file, String fileName, String mimeType) throws IOException Creates a new POJO for an attachment of a form record message, using the given file.- Parameters:
file- The attachment file. null is treated as an empty file.fileName- The name of the attachment file.mimeType- The MIME type of the attachment.- Returns:
- A new POJO for data of a attachment.
- Throws:
IOException- When the data of the given attachment could not be read.
-