|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.mail.MailAccount
public class MailAccount
Field Summary | |
---|---|
protected Member |
author
|
protected boolean |
enabled
|
protected boolean |
expunge
|
protected Set<String> |
expungeSet
|
protected int |
fetchCount
|
protected long |
fetchDate
|
protected String |
host
|
protected boolean |
imapssl
|
protected String |
label
|
protected String |
login
|
protected String |
mbox
|
protected String |
name
|
protected String |
password
|
protected int |
port
|
protected JProperties |
properties
|
protected String |
protocol
|
static String |
REVISION
|
protected String |
schedule
|
protected Workspace |
ws
|
Constructor Summary | |
---|---|
MailAccount()
|
|
MailAccount(String name,
String label,
Member author,
Workspace ws,
String host,
int port,
String protocol,
String login,
String password,
String mbox,
String schedule,
boolean expunge,
boolean imapssl)
|
Method Summary | |
---|---|
void |
closeQuietly(javax.mail.Folder folder,
boolean expunge)
Close the given folder catching exceptions |
javax.mail.Store |
connect()
|
javax.mail.Folder |
connect(int mode)
Connect to the account, open the store and retrieve the folder. |
protected List<javax.mail.Message> |
doFetch(javax.mail.Folder folder)
|
protected boolean |
expunged(javax.mail.Message msg,
String msgId)
Flags the message to remove when the folder is closed Performs additional tasks. |
List<javax.mail.Message> |
fetch(javax.mail.Folder folder)
Fetch message from the given folder. |
Member |
getAuthor()
|
int |
getDBMailMessageCount()
Returns the count of DBMailMessage stored in DataBase for this account |
String |
getHost()
|
String |
getLabel()
|
int |
getLastFetchCount()
Returns the number of mail fetched on latest fetch with this account |
Date |
getLastFetchDate()
Returns Date of latest fetch with this account |
String |
getLogin()
|
static MailAccount |
getMailAccount(String label,
String name,
LangProperties props)
|
String |
getMbox()
|
String |
getName()
|
Properties |
getPorperties()
|
int |
getPort()
|
protected File |
getPropertyFile()
|
String |
getProtocol()
|
String |
getSchedule()
|
javax.mail.Session |
getSession()
|
Workspace |
getWorkspace()
|
boolean |
isEnabled()
Retuns true if this account is enable |
boolean |
isExpunged()
|
boolean |
isImapSSL()
|
protected void |
loadProperties()
|
void |
markAsExpunge(Set<String> msgIdSet)
Mark given msg Ids as expunge on next fetch |
protected void |
saveProperties()
|
void |
setAuthor(Member author)
|
void |
setExpunge(boolean expunge)
|
void |
setHost(String host)
|
void |
setImapSSL(boolean imapssl)
|
void |
setLabel(String label)
|
void |
setLogin(String login)
|
void |
setMbox(String mbox)
|
void |
setName(String name)
|
void |
setPassword(String password)
|
void |
setPort(int port)
|
void |
setProtocol(String protocol)
|
void |
setSchedule(String schedule)
|
void |
setWorkspace(Workspace ws)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
protected String name
protected String label
protected String host
protected int port
protected String protocol
protected String login
protected String password
protected String mbox
protected String schedule
protected boolean enabled
protected boolean expunge
protected boolean imapssl
protected Member author
protected Workspace ws
protected JProperties properties
protected long fetchDate
protected int fetchCount
protected Set<String> expungeSet
Constructor Detail |
---|
public MailAccount()
public MailAccount(String name, String label, Member author, Workspace ws, String host, int port, String protocol, String login, String password, String mbox, String schedule, boolean expunge, boolean imapssl)
Method Detail |
---|
public static MailAccount getMailAccount(String label, String name, LangProperties props)
protected File getPropertyFile()
protected void loadProperties()
protected void saveProperties()
public List<javax.mail.Message> fetch(javax.mail.Folder folder) throws javax.mail.MessagingException
folder
- the FOlder to fetch
javax.mail.MessagingException
protected List<javax.mail.Message> doFetch(javax.mail.Folder folder) throws javax.mail.MessagingException
javax.mail.MessagingException
public Properties getPorperties()
public javax.mail.Session getSession()
public javax.mail.Store connect() throws javax.mail.NoSuchProviderException, javax.mail.MessagingException
javax.mail.NoSuchProviderException
javax.mail.MessagingException
public javax.mail.Folder connect(int mode) throws javax.mail.NoSuchProviderException, javax.mail.MessagingException
mode
- the open mode Folder.READ_ONLY or Folder.READ_WRITE
javax.mail.NoSuchProviderException
javax.mail.MessagingException
public void closeQuietly(javax.mail.Folder folder, boolean expunge)
folder
- the Folderexpunge
- Expunge (permanently remove) messages marked DELETED.protected boolean expunged(javax.mail.Message msg, String msgId)
msg
- the MessagemsgId
- the Message Idpublic void markAsExpunge(Set<String> msgIdSet)
msgIdSet
- Set of msgIdpublic String toString()
toString
in class Object
public boolean isEnabled()
public int getDBMailMessageCount()
public Date getLastFetchDate()
public int getLastFetchCount()
public String getName()
public void setName(String name)
public String getLabel()
public void setLabel(String label)
public Member getAuthor()
public void setAuthor(Member author)
public Workspace getWorkspace()
public void setWorkspace(Workspace ws)
public String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public String getProtocol()
public void setProtocol(String protocol)
public String getLogin()
public void setLogin(String login)
public void setPassword(String password)
public String getMbox()
public void setMbox(String mbox)
public String getSchedule()
public void setSchedule(String schedule)
public boolean isExpunged()
public void setExpunge(boolean expunge)
public boolean isImapSSL()
public void setImapSSL(boolean imapssl)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |