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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EmailAccountDAO
getAccountDao()
EmailCacheManager
getCacheManager()
String
getDefaultOwner()
com.logicaldoc.core.document.dao.DocumentDAO
getDocumentDao()
com.logicaldoc.core.document.dao.DocumentHistoryDAO
getDocumentHistoryDao()
com.logicaldoc.core.document.dao.DocumentLinkDAO
getDocumentLinkDao()
com.logicaldoc.core.folder.FolderDAO
getFolderDao()
static javax.mail.Session
getSession()
com.logicaldoc.core.store.Storer
getStorer()
boolean
isConcurrent()
boolean
isIndeterminate()
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
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 Detail
-
NAME
public static String NAME
-
-
Method Detail
-
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
public EmailCacheManager getCacheManager()
-
setCacheManager
public void setCacheManager(EmailCacheManager cacheManager)
-
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
public EmailAccountDAO getAccountDao()
-
setAccountDao
public void setAccountDao(EmailAccountDAO accountDao)
-
getDefaultOwner
public String getDefaultOwner()
-
setDefaultOwner
public void setDefaultOwner(String defaultOwner)
-
processEmails
public void processEmails(String owner)
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
-
receive
public void receive(EmailAccount account, String username) throws javax.mail.MessagingException, IOException
- Throws:
javax.mail.MessagingException
IOException
-
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
-
-