public class IMAPImportService extends Object
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'
| Modifier and Type | Field and Description |
|---|---|
static String |
ARCHIVE_DEFAULT_NAME |
static String |
DETACH_MODE_ALL |
static String |
DETACH_MODE_NONE |
static String |
DETACH_MODE_PDF |
static String |
OPTION_ARCHIVE_FOLDER |
static String |
OPTION_DETACH_MODE |
static String |
OPTION_GOTENBERG_SERVICE |
static String |
OPTION_PRESERVE_ORIGIN |
static String |
OPTION_SUBJECT_REGEX |
| Constructor and Description |
|---|
IMAPImportService() |
| Modifier and Type | Method and Description |
|---|---|
org.imixs.workflow.ItemCollection |
createWorkitem(org.imixs.workflow.ItemCollection source)
Creates and processes a new workitem with a given filedata
|
void |
onEvent(DocumentImportEvent event)
This method reacts on a CDI ImportEvent and reads documents form a IMAP
server.
|
public static final String OPTION_ARCHIVE_FOLDER
public static final String OPTION_SUBJECT_REGEX
public static final String OPTION_DETACH_MODE
public static final String OPTION_PRESERVE_ORIGIN
public static final String OPTION_GOTENBERG_SERVICE
public static final String DETACH_MODE_PDF
public static final String DETACH_MODE_ALL
public static final String DETACH_MODE_NONE
public static final String ARCHIVE_DEFAULT_NAME
public void onEvent(@Observes
DocumentImportEvent event)
Depending on the DETACH_MODE the method will detach file attachments form the email.
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
org.imixs.workflow.exceptions.ModelExceptionorg.imixs.workflow.exceptions.PluginExceptionorg.imixs.workflow.exceptions.ProcessingErrorExceptionorg.imixs.workflow.exceptions.AccessDeniedExceptionCopyright © 2016–2021 Imixs Software Solutions GmbH. All rights reserved.