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
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
Fields inherited from class com.logicaldoc.core.task.Task
STATUS_IDLE, STATUS_RUNNING, STATUS_STOPPING
-
Method Summary
Modifier and TypeMethodDescriptioncom.logicaldoc.core.document.DocumentDAO
com.logicaldoc.core.document.DocumentHistoryDAO
com.logicaldoc.core.document.DocumentLinkDAO
com.logicaldoc.core.folder.FolderDAO
static javax.mail.Store
getStore
(EmailAccount account) com.logicaldoc.core.store.Storer
boolean
boolean
void
processEmails
(String owner) Downloads all new mails from all accounts.void
receive
(EmailAccount account, String username) void
setAccountDao
(EmailAccountDAO accountDao) void
setCacheManager
(EmailCacheManager cacheManager) void
setDefaultOwner
(String defaultOwner) void
setDocumentDao
(com.logicaldoc.core.document.DocumentDAO documentDao) void
setDocumentHistoryDao
(com.logicaldoc.core.document.DocumentHistoryDAO documentHistoryDAO) void
setDocumentLinkDao
(com.logicaldoc.core.document.DocumentLinkDAO documentLinkDao) void
setFolderDao
(com.logicaldoc.core.folder.FolderDAO folderDao) void
setSequenceDao
(com.logicaldoc.core.sequence.SequenceDAO sequenceDao) void
setStorer
(com.logicaldoc.core.store.Storer storer) void
setTemplateDao
(com.logicaldoc.core.metadata.TemplateDAO templateDao) 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
-
getDocumentDao
public com.logicaldoc.core.document.DocumentDAO getDocumentDao() -
setDocumentDao
public void setDocumentDao(com.logicaldoc.core.document.DocumentDAO documentDao) -
getDocumentLinkDao
public com.logicaldoc.core.document.DocumentLinkDAO getDocumentLinkDao() -
setDocumentLinkDao
public void setDocumentLinkDao(com.logicaldoc.core.document.DocumentLinkDAO documentLinkDao) -
getCacheManager
-
setCacheManager
-
getDocumentHistoryDao
public com.logicaldoc.core.document.DocumentHistoryDAO getDocumentHistoryDao() -
setDocumentHistoryDao
public void setDocumentHistoryDao(com.logicaldoc.core.document.DocumentHistoryDAO documentHistoryDAO) -
getFolderDao
public com.logicaldoc.core.folder.FolderDAO getFolderDao() -
setFolderDao
public void setFolderDao(com.logicaldoc.core.folder.FolderDAO folderDao) -
getStorer
public com.logicaldoc.core.store.Storer getStorer() -
setStorer
public void setStorer(com.logicaldoc.core.store.Storer storer) -
setTemplateDao
public void setTemplateDao(com.logicaldoc.core.metadata.TemplateDAO templateDao) -
getAccountDao
-
setAccountDao
-
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.MessagingException
IOException
-
receive
public void receive(EmailAccount account, String username) throws javax.mail.MessagingException, IOException - Throws:
javax.mail.MessagingException
IOException
-
setSequenceDao
public void setSequenceDao(com.logicaldoc.core.sequence.SequenceDAO sequenceDao) -
isIndeterminate
public boolean isIndeterminate()- Specified by:
isIndeterminate
in classcom.logicaldoc.core.task.Task
-
isConcurrent
public boolean isConcurrent()- Specified by:
isConcurrent
in classcom.logicaldoc.core.task.Task
-