Package com.mirth.connect.userutil
Class ImmutableAttachment
java.lang.Object
com.mirth.connect.userutil.ImmutableAttachment
This class represents an message attachment and is used to retrieve details such as the
replacement token or content type.
-
Constructor Summary
ConstructorsConstructorDescriptionImmutableAttachment(com.mirth.connect.donkey.model.message.attachment.Attachment attachment) Instantiates a new ImmutableAttachment object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the unique replacement token for the attachment.byte[]Returns the content of the attachment as a byte array.getId()Returns the unique ID for the attachment.getType()Returns the MIME type of the attachment.booleanReturns a boolean indicating whether the attachment content is encrypted.
-
Constructor Details
-
ImmutableAttachment
public ImmutableAttachment(com.mirth.connect.donkey.model.message.attachment.Attachment attachment) Instantiates a new ImmutableAttachment object.- Parameters:
attachment- The Attachment object that this object will reference for retrieving data.
-
-
Method Details
-
getAttachmentId
Returns the unique replacement token for the attachment. This token should replace the attachment content in the message string, and will be used to re-attach the attachment content in the outbound message before it is sent to a downstream system.- Returns:
- The unique replacement token for the attachment.
-
getId
Returns the unique ID for the attachment.- Returns:
- The unique ID for the attachment.
-
getContent
public byte[] getContent()Returns the content of the attachment as a byte array.- Returns:
- The content of the attachment as a byte array.
-
getType
Returns the MIME type of the attachment.- Returns:
- The MIME type of the attachment.
-
isEncrypted
public boolean isEncrypted()Returns a boolean indicating whether the attachment content is encrypted.- Returns:
- A boolean indicating whether the attachment content is encrypted.
-