Package com.jalios.jcms.mail
Class MailAccount
java.lang.Object
com.jalios.jcms.mail.MailAccount
- Author:
- Jean-Philippe Encausse
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Memberprotected booleanprotected booleanprotected intprotected longprotected Stringprotected Stringprotected Stringprotected JPropertiesprotected AbstractMailProviderprotected static final Stringprotected Stringprotected Workspace -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMailAccount(String name, String label, Member author, Workspace ws, AbstractMailProvider provider, String mbox, String schedule, boolean expunge) -
Method Summary
Modifier and TypeMethodDescriptionvoidendFetchTransaction(FetchMailTransaction mailTransaction) voidexpunge(FetchMailTransaction mailTransaction) fetch(FetchMailTransaction mailTransaction) intReturns the count of DBMailMessage stored in DataBase for this accountgetLabel()intReturns the number of mail fetched on latest fetch with this accountReturns Date of latest fetch with this accountstatic MailAccountgetMailAccount(String label, String name, LangProperties props, Map<String, AbstractMailProvider> providerMap) getMbox()getName()protected FilebooleanRetuns true if this account is enablebooleanprotected voidprotected voidvoidvoidsetExpunge(boolean expunge) voidvoidvoidvoidsetSchedule(String schedule) voidtoString()
-
Field Details
-
PROVIDER_NAME
- See Also:
-
name
-
label
-
provider
-
mbox
-
schedule
-
enabled
protected boolean enabled -
expunge
protected boolean expunge -
author
-
ws
-
expungeSet
-
properties
-
fetchDate
protected long fetchDate -
fetchCount
protected int fetchCount
-
-
Constructor Details
-
MailAccount
public MailAccount() -
MailAccount
-
-
Method Details
-
getMailAccount
public static MailAccount getMailAccount(String label, String name, LangProperties props, Map<String, AbstractMailProvider> providerMap) -
getPropertyFile
-
loadProperties
protected void loadProperties() -
saveProperties
protected void saveProperties() -
fetch
- Throws:
ServiceException
-
expunge
- Throws:
ServiceException
-
startFetchTransaction
- Throws:
ServiceException
-
endFetchTransaction
- Throws:
ServiceException
-
toString
-
isEnabled
public boolean isEnabled()Retuns true if this account is enable- Returns:
- boolean
-
getDBMailMessageCount
public int getDBMailMessageCount()Returns the count of DBMailMessage stored in DataBase for this account- Returns:
- int DB count
-
getLastFetchDate
Returns Date of latest fetch with this account- Returns:
- Date last fetch
-
getLastFetchCount
public int getLastFetchCount()Returns the number of mail fetched on latest fetch with this account- Returns:
- int fetch count
-
getName
-
setName
-
getLabel
-
setLabel
-
getAuthor
-
setAuthor
-
getWorkspace
-
setWorkspace
-
getMbox
-
setMbox
-
getSchedule
-
setSchedule
-
isExpunged
public boolean isExpunged() -
setExpunge
public void setExpunge(boolean expunge) -
getProviderName
-
getProvider
-