Class IMAPImportService
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected jakarta.enterprise.inject.Instance<IMAPAuthenticator>static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.imixs.workflow.ItemCollectioncreateWorkitem(org.imixs.workflow.ItemCollection source) Creates and processes a new workitem with a given filedatavoidonEvent(DocumentImportEvent event) This method reacts on a CDI ImportEvent and reads documents form a IMAP server.
-
Field Details
-
OPTION_DEBUG
- See Also:
-
OPTION_ARCHIVE_FOLDER
- See Also:
-
OPTION_SUBJECT_REGEX
- See Also:
-
OPTION_IMAP_AUTHENTICATOR
- See Also:
-
OPTION_DETACH_MODE
- See Also:
-
OPTION_PRESERVE_ORIGIN
- See Also:
-
OPTION_GOTENBERG_SERVICE
- See Also:
-
DETACH_MODE_PDF
- See Also:
-
DETACH_MODE_ALL
- See Also:
-
DETACH_MODE_NONE
- See Also:
-
ARCHIVE_DEFAULT_NAME
- See Also:
-
DEFAULT_NO_SUBJECT
- See Also:
-
imapAuthenticators
-
-
Constructor Details
-
IMAPImportService
public IMAPImportService()
-
-
Method Details
-
onEvent
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.ModelExceptionorg.imixs.workflow.exceptions.PluginExceptionorg.imixs.workflow.exceptions.ProcessingErrorExceptionorg.imixs.workflow.exceptions.AccessDeniedException
-