|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.email.inboxlistener.msdao.MailboxMSDAOCommon
public abstract class MailboxMSDAOCommon
This class groups some utility methods for Mail Server invoking
Field Summary | |
---|---|
protected com.funambol.framework.logging.FunambolLogger |
log
|
protected MailServerAccount |
msa
|
protected MSTools |
mstools
|
protected boolean |
saveSender
|
protected boolean |
saveSubject
|
Constructor Summary | |
---|---|
MailboxMSDAOCommon()
|
|
MailboxMSDAOCommon(MailServerAccount _msa,
boolean _saveSubject,
boolean _saveSender)
Creates a new MSTools with the given MSAccount |
Method Summary | |
---|---|
void |
closeConnection(IMailServerWrapper mswf)
close the Mail Server Connection |
protected java.lang.String |
createGUID(javax.mail.Message msg)
|
protected SyncItemInfo |
createInfo(javax.mail.Message message,
java.util.HashMap localInfos)
|
protected java.util.ArrayList |
createInfoList(javax.mail.Message[] messages,
java.util.HashMap localInfos)
|
abstract SyncItemInfo[] |
getEmailsFromInbox(IMailServerWrapper mswf,
java.util.HashMap localInfos)
get messages from inbox folder This method returns all the items in the server inbox folder |
int |
getMaxEmailNumber()
|
protected javax.mail.Message[] |
getMessages(int max)
|
protected boolean |
isCorruptedEmail(javax.mail.Message message)
the message can be all the part empty. |
protected boolean |
isMessageIDPresent(java.lang.String messageID,
java.util.List allSyncItemInfo)
|
protected boolean |
isSentEmail(java.lang.String userAddress,
javax.mail.Message message)
the message is a sent email if the userAddress is in the From list and is not in the To list |
void |
setMaxEmailNumber(int _maxEmailNumber)
|
void |
setPassword(java.lang.String _password)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected com.funambol.framework.logging.FunambolLogger log
protected MailServerAccount msa
protected MSTools mstools
protected boolean saveSubject
protected boolean saveSender
Constructor Detail |
---|
public MailboxMSDAOCommon()
public MailboxMSDAOCommon(MailServerAccount _msa, boolean _saveSubject, boolean _saveSender)
_msa
- the DBAccountMethod Detail |
---|
public void setMaxEmailNumber(int _maxEmailNumber)
setMaxEmailNumber
in interface IMailboxMSDAO
public int getMaxEmailNumber()
getMaxEmailNumber
in interface IMailboxMSDAO
public void setPassword(java.lang.String _password)
setPassword
in interface IMailboxMSDAO
public void closeConnection(IMailServerWrapper mswf) throws InboxListenerException
closeConnection
in interface IMailboxMSDAO
InboxListenerException
public abstract SyncItemInfo[] getEmailsFromInbox(IMailServerWrapper mswf, java.util.HashMap localInfos) throws InboxListenerException
getEmailsFromInbox
in interface IMailboxMSDAO
mswf
- IMailServerWrapperlocalInfos
- map with all the loacal CrcSyncItemInfo
EntityException
InboxListenerException
protected java.util.ArrayList createInfoList(javax.mail.Message[] messages, java.util.HashMap localInfos) throws javax.mail.MessagingException
messages
- Message[]localInfos
- map with all the loacal SyncItemInfo
javax.mail.MessagingException
protected SyncItemInfo createInfo(javax.mail.Message message, java.util.HashMap localInfos) throws javax.mail.MessagingException
message
- MessagelocalInfos
- map with all the loacal SyncItemInfo
javax.mail.MessagingException
protected javax.mail.Message[] getMessages(int max) throws javax.mail.MessagingException
javax.mail.MessagingException
protected boolean isSentEmail(java.lang.String userAddress, javax.mail.Message message) throws javax.mail.MessagingException
userAddress
- Stringmessage
- Message
javax.mail.MessagingException
protected boolean isCorruptedEmail(javax.mail.Message message) throws javax.mail.MessagingException
message
- Message
javax.mail.MessagingException
protected java.lang.String createGUID(javax.mail.Message msg) throws javax.mail.MessagingException
javax.mail.MessagingException
protected boolean isMessageIDPresent(java.lang.String messageID, java.util.List allSyncItemInfo)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |