com.funambol.email.inboxlistener.msdao
Class MailboxMSDAOCommon
java.lang.Object
com.funambol.email.inboxlistener.msdao.MailboxMSDAOCommon
- All Implemented Interfaces:
- IMailboxMSDAO
- Direct Known Subclasses:
- MailboxMSDAO, MailboxMSDAOGmail
public abstract class MailboxMSDAOCommon
- extends java.lang.Object
- implements IMailboxMSDAO
This class groups some utility methods for Mail Server invoking
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected com.funambol.framework.logging.FunambolLogger log
msa
protected MailServerAccount msa
mstools
protected MSTools mstools
saveSubject
protected boolean saveSubject
saveSender
protected boolean saveSender
MailboxMSDAOCommon
public MailboxMSDAOCommon()
MailboxMSDAOCommon
public MailboxMSDAOCommon(MailServerAccount _msa,
boolean _saveSubject,
boolean _saveSender)
- Creates a new MSTools with the given MSAccount
- Parameters:
_msa
- the DBAccount
setMaxEmailNumber
public void setMaxEmailNumber(int _maxEmailNumber)
- Specified by:
setMaxEmailNumber
in interface IMailboxMSDAO
getMaxEmailNumber
public int getMaxEmailNumber()
- Specified by:
getMaxEmailNumber
in interface IMailboxMSDAO
setPassword
public void setPassword(java.lang.String _password)
- Specified by:
setPassword
in interface IMailboxMSDAO
closeConnection
public void closeConnection(IMailServerWrapper mswf)
throws InboxListenerException
- close the Mail Server Connection
- Specified by:
closeConnection
in interface IMailboxMSDAO
- Throws:
InboxListenerException
getEmailsFromInbox
public abstract SyncItemInfo[] getEmailsFromInbox(IMailServerWrapper mswf,
java.util.HashMap localInfos)
throws InboxListenerException
- get messages from inbox folder
This method returns all the items in the server
inbox folder
- Specified by:
getEmailsFromInbox
in interface IMailboxMSDAO
- Parameters:
mswf
- IMailServerWrapperlocalInfos
- map with all the loacal CrcSyncItemInfo
- Returns:
- CrcSyncItemInfo[]
- Throws:
EntityException
InboxListenerException
createInfoList
protected java.util.ArrayList createInfoList(javax.mail.Message[] messages,
java.util.HashMap localInfos)
throws javax.mail.MessagingException
- Parameters:
messages
- Message[]localInfos
- map with all the loacal SyncItemInfo
- Returns:
- list with all the server SyncItemInfo
- Throws:
javax.mail.MessagingException
createInfo
protected abstract SyncItemInfo createInfo(javax.mail.Message message,
java.util.HashMap localInfos)
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
getMessages
protected javax.mail.Message[] getMessages(int max)
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
createGUID
protected java.lang.String createGUID(javax.mail.Message msg)
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
isMessageIDPresent
protected boolean isMessageIDPresent(java.lang.String messageID,
java.util.List allSyncItemInfo)
Copyright © 2005-2006 Funambol.