Class ImapAttachmentsImpl

java.lang.Object
io.jmix.imap.impl.ImapAttachmentsImpl
All Implemented Interfaces:
ImapAttachments

@Component("imap_ImapAttachments") public class ImapAttachmentsImpl extends Object implements ImapAttachments
  • Field Details

    • imapHelper

      @Autowired protected ImapHelper imapHelper
    • imapDataProvider

      @Autowired protected ImapDataProvider imapDataProvider
    • timeSource

      @Autowired protected TimeSource timeSource
    • metadata

      @Autowired protected Metadata metadata
  • Constructor Details

    • ImapAttachmentsImpl

      public ImapAttachmentsImpl()
  • Method Details

    • fetchAttachments

      public Collection<ImapMessageAttachment> fetchAttachments(ImapMessage message)
      Description copied from interface: ImapAttachments
      Retrieve and cache attachments for message
      Specified by:
      fetchAttachments in interface ImapAttachments
      Parameters:
      message - reference object for IMAP message
      Returns:
      reference objects for message attachments
    • makeAttachments

      protected Collection<ImapMessageAttachment> makeAttachments(com.sun.mail.imap.IMAPMessage msg) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • createImapMessageAttachment

      protected ImapMessageAttachment createImapMessageAttachment(int i, javax.mail.BodyPart bodyPart) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • openStream

      public InputStream openStream(ImapMessageAttachment attachment)
      Description copied from interface: ImapAttachments
      Return an input stream to load a message attachment content
      Specified by:
      openStream in interface ImapAttachments
      Parameters:
      attachment - IMAP message attachment reference object
      Returns:
      input stream, must be closed after use
    • loadFile

      public byte[] loadFile(ImapMessageAttachment attachment)
      Description copied from interface: ImapAttachments
      Load a file message attachment content into byte array.
      Specified by:
      loadFile in interface ImapAttachments
      Parameters:
      attachment - IMAP message attachment reference object
      Returns:
      attachment content