Class ImmutableAttachment

java.lang.Object
com.mirth.connect.userutil.ImmutableAttachment

public class ImmutableAttachment extends Object
This class represents an message attachment and is used to retrieve details such as the replacement token or content type.
  • 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

      public String 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

      public String 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

      public String 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.