Package com.logicaldoc.email
Class EmailCrawler
java.lang.Object
com.logicaldoc.core.task.Task
com.logicaldoc.email.EmailCrawler
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
VIAEmailCrawler
@Component("emailCrawler")
public class EmailCrawler
extends com.logicaldoc.core.task.Task
This component downloads new e-mails from one or more e-mail accounts
- Since:
- 4.0
- Author:
- Matteo Caruso - LogicalDOC
-
Field Summary
FieldsFields inherited from class com.logicaldoc.core.task.Task
STATUS_IDLE, STATUS_RUNNING, STATUS_STOPPING -
Method Summary
Modifier and TypeMethodDescriptionstatic javax.mail.StoregetStore(EmailAccount account) booleanbooleanvoidprocessEmails(String owner) Downloads all new mails from all accounts.voidreceive(EmailAccount account, String username) voidsetDefaultOwner(String defaultOwner) Methods inherited from class com.logicaldoc.core.task.Task
addTaskListener, getCompletionPercentage, getConfig, getName, getProgress, getReportRecipients, getScheduling, getSize, getStatus, interrupt, isInterrupted, isInterruptRequested, isRunning, isSendActivityReport, notifyReport, removeTaskListener, run, save, saveWork, setReportRecipients, setSendActivityReport, setSize
-
Field Details
-
NAME
- See Also:
-
COUNTER_SEQUENCE
- See Also:
-
-
Method Details
-
getDefaultOwner
-
setDefaultOwner
-
processEmails
Downloads all new mails from all accounts. The stored document will be owned by the specified username- Parameters:
owner- the username of the owner of the downloaded messages
-
getStore
public static javax.mail.Store getStore(EmailAccount account) throws javax.mail.MessagingException, IOException - Throws:
javax.mail.MessagingExceptionIOException
-
receive
public void receive(EmailAccount account, String username) throws javax.mail.MessagingException, IOException - Throws:
javax.mail.MessagingExceptionIOException
-
isIndeterminate
public boolean isIndeterminate()- Specified by:
isIndeterminatein classcom.logicaldoc.core.task.Task
-
isConcurrent
public boolean isConcurrent()- Specified by:
isConcurrentin classcom.logicaldoc.core.task.Task
-