|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.email.items.dao.EntityDAO
com.funambol.email.items.dao.PopEntityDAO
public class PopEntityDAO
This class implements methods to access data in Mail Server datastore.
Field Summary |
---|
Fields inherited from class com.funambol.email.items.dao.EntityDAO |
---|
jndiDataSourceName, log, serverType |
Constructor Summary | |
---|---|
PopEntityDAO()
|
|
PopEntityDAO(java.lang.String jndiDataSourceName,
java.lang.String serverType)
|
Method Summary | |
---|---|
java.lang.String |
addSentEmail(java.lang.String FID,
java.lang.String messageID,
javax.mail.Message msg,
com.funambol.server.tools.id.DBIDGenerator idSentSpace,
java.lang.String source_uri,
long principalId)
insert an email in the fnbl_email_sentpop table |
javax.mail.Message[] |
getAllEmailsInbox(com.sun.mail.pop3.POP3Folder f)
gets all Messages NOTE: in the pop protocol this feature doesn't work SearchTerm st = new ReceivedDateTerm(ComparisonTerm.GE, filter.getTime()); messages = f.search(st); so we have to use a manual filter |
javax.mail.Message[] |
getAllEmailsInbox(com.sun.mail.pop3.POP3Folder f,
EmailFilter filter,
java.util.Locale loc)
gets all Messages NOTE: in the pop protocol this feature doesn't work SearchTerm st = new ReceivedDateTerm(ComparisonTerm.GE, filter.getTime()); messages = f.search(st); so we have to use a manual filter |
java.lang.String[] |
getAllEmailsSent(EmailFilter filter,
java.lang.String source_uri,
long principalId)
|
ItemMessage |
getEmailFromMessageID(java.lang.String message_id,
javax.mail.Session s,
java.lang.String source_uri,
long principalId)
serch a document using the header Message-ID |
javax.mail.Message |
getEmailInboxFromUID(com.sun.mail.pop3.POP3Folder f,
javax.mail.Message[] messages,
java.lang.String uid)
serch a document using UID; for POP3 protocol UID is String I have to use a custome getMessageByUID because there is not a folder.getMessageByUID method like in the imap protocol |
javax.mail.Message |
getEmailSentFromUID(java.lang.String GUID,
javax.mail.Session s,
java.lang.String source_uri,
long principalId)
|
void |
removeAllEmail(com.sun.mail.pop3.POP3Folder f)
|
void |
removeEmail(javax.mail.Message msg)
|
void |
removeEmail(com.sun.mail.pop3.POP3Folder f,
java.lang.String uid)
|
void |
removeEmail(java.lang.String GUID,
java.lang.String source_uri,
long principalId)
|
Methods inherited from class com.funambol.email.items.dao.EntityDAO |
---|
checkMessageIDforDrafts, getAllEmailsInbox, getDefaultFolder, getFolderFromUID, getFullPathFromFID, getFullPathFromGUID, getGUIDFromFullPath, getTimeFilteredItems, insertCustomFolder, insertDefaultFolderInDB, insertDefaultFolderInMailServer, insertFolder, insertInvalidItemInCache, removeEmailFromInbox, removeEmailFromServerItems, removeFolder, setDeletedEmailInInbox |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PopEntityDAO()
public PopEntityDAO(java.lang.String jndiDataSourceName, java.lang.String serverType)
jndiDataSourceName
- StringMethod Detail |
---|
public java.lang.String addSentEmail(java.lang.String FID, java.lang.String messageID, javax.mail.Message msg, com.funambol.server.tools.id.DBIDGenerator idSentSpace, java.lang.String source_uri, long principalId) throws EntityException
FID
- IMAPFolder IDmessageID
- header Message-IDmsg
- MessageidSentSpace
- The GUID generatorsource_uri
- The SyncSource URI.principalId
- The principal ID.
EntityException
public javax.mail.Message[] getAllEmailsInbox(com.sun.mail.pop3.POP3Folder f, EmailFilter filter, java.util.Locale loc) throws EntityException
f
- POP3Folderfilter
- EmailFilterloc
- Locale
EntityException
public javax.mail.Message[] getAllEmailsInbox(com.sun.mail.pop3.POP3Folder f) throws EntityException
f
- POP3Folder
EntityException
public java.lang.String[] getAllEmailsSent(EmailFilter filter, java.lang.String source_uri, long principalId) throws EntityException
filter
- source_uri
- the SyncSource URI.principalId
- The principal ID.
EntityException
public void removeEmail(javax.mail.Message msg) throws EntityException
msg
- Message
EntityException
public void removeEmail(com.sun.mail.pop3.POP3Folder f, java.lang.String uid) throws EntityException
f
- IMAPFolderuid
- long
EntityException
public void removeAllEmail(com.sun.mail.pop3.POP3Folder f) throws EntityException
f
- POP3Folder
EntityException
public javax.mail.Message getEmailInboxFromUID(com.sun.mail.pop3.POP3Folder f, javax.mail.Message[] messages, java.lang.String uid) throws EntityException
f
- POP3Folderuid
- String
EntityException
public javax.mail.Message getEmailSentFromUID(java.lang.String GUID, javax.mail.Session s, java.lang.String source_uri, long principalId) throws EntityException
GUID
- the Global Unique ID.s
- The session info to the backend.source_uri
- the SyncSource URI.principalId
- The principal ID.
EntityException
public void removeEmail(java.lang.String GUID, java.lang.String source_uri, long principalId) throws EntityException
GUID
- the Global Unique ID.source_uri
- the SyncSource URI.principalId
- The principal ID.
EntityException
public ItemMessage getEmailFromMessageID(java.lang.String message_id, javax.mail.Session s, java.lang.String source_uri, long principalId) throws EntityException
message_id
- Strings
- Sessionsource_uri
- StringprincipalId
- long
EntityException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |