Class IMAPImportService


  • public class IMAPImportService
    extends Object
    The EmailImportAdapter scans a IMAP account

    The method creates for each email in the INBOX a workitem based on the configuration defined by the import source.

    After the message was imported successfully, the message will be moved form the INBOX into an archive folder. If the archive folder does not exist, the method creates the folder. The folder name can be configured by the property 'archive.folder'. The default name is 'imixs-archive'

    The email message can be converted into HTML or PDF in case the option 'detach.mode' is set to ALL. To generate the message in PDF format a gotenberg service is expected to convert HTML to PDF. The gotenberg service endpoint can be defined by the option 'gotenberg.service'

    To access a mail store the IMAPImportService injects IMAPAuthenticator's. These authenticator classes can be used to authenticate against a Mail Store. The authenticator to be used can be defined in the optional property imap.authenticator. If not defined, the service defaults to the IMAPBaasicAuthenticator implementation.

    Version:
    1.0
    Author:
    rsoika
    • Constructor Detail

      • IMAPImportService

        public IMAPImportService()
    • Method Detail

      • onEvent

        public void onEvent​(@Observes
                            DocumentImportEvent event)
        This method reacts on a CDI ImportEvent and reads documents form a IMAP server.

        Depending on the DETACH_MODE the method will detach file attachments form the email.

      • createWorkitem

        public org.imixs.workflow.ItemCollection createWorkitem​(org.imixs.workflow.ItemCollection source)
                                                         throws org.imixs.workflow.exceptions.AccessDeniedException,
                                                                org.imixs.workflow.exceptions.ProcessingErrorException,
                                                                org.imixs.workflow.exceptions.PluginException,
                                                                org.imixs.workflow.exceptions.ModelException
        Creates and processes a new workitem with a given filedata
        Returns:
        Throws:
        org.imixs.workflow.exceptions.ModelException
        org.imixs.workflow.exceptions.PluginException
        org.imixs.workflow.exceptions.ProcessingErrorException
        org.imixs.workflow.exceptions.AccessDeniedException