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.dao.DocumentDAO
com.logicaldoc.core.document.dao.DocumentHistoryDAO
com.logicaldoc.core.document.dao.DocumentLinkDAO
com.logicaldoc.core.folder.FolderDAO
static javax.mail.Session
static javax.mail.Store
getStore
(EmailAccount account, javax.mail.Session session) 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.dao.DocumentDAO documentDao) void
setDocumentHistoryDao
(com.logicaldoc.core.document.dao.DocumentHistoryDAO documentHistoryDAO) void
setDocumentLinkDao
(com.logicaldoc.core.document.dao.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, setConfig, setLockManager, setReportRecipients, setSendActivityReport, setSender, setSize, setSystemLoadMonitor, setUserDao
-
Field Details
-
NAME
- See Also:
-
COUNTER_SEQUENCE
- See Also:
-
-
Method Details
-
getDocumentDao
public com.logicaldoc.core.document.dao.DocumentDAO getDocumentDao() -
setDocumentDao
public void setDocumentDao(com.logicaldoc.core.document.dao.DocumentDAO documentDao) -
getDocumentLinkDao
public com.logicaldoc.core.document.dao.DocumentLinkDAO getDocumentLinkDao() -
setDocumentLinkDao
public void setDocumentLinkDao(com.logicaldoc.core.document.dao.DocumentLinkDAO documentLinkDao) -
getCacheManager
-
setCacheManager
-
getDocumentHistoryDao
public com.logicaldoc.core.document.dao.DocumentHistoryDAO getDocumentHistoryDao() -
setDocumentHistoryDao
public void setDocumentHistoryDao(com.logicaldoc.core.document.dao.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, javax.mail.Session session) throws javax.mail.NoSuchProviderException - Throws:
javax.mail.NoSuchProviderException
-
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) -
getSession
public static javax.mail.Session getSession() -
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
-