|
|||||||||
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.ImapEntityDAO
public class ImapEntityDAO
This class implements methods to access data in Mail Server datastore.
Field Summary | |
---|---|
static ImapSemaphore |
uid_has_been_set
|
Fields inherited from class com.funambol.email.items.dao.EntityDAO |
---|
dataSource, jndiDataSourceName, log |
Constructor Summary | |
---|---|
ImapEntityDAO()
|
|
ImapEntityDAO(java.lang.String jndiDataSourceName)
|
Method Summary | |
---|---|
long |
addEmail(java.lang.String FID,
com.sun.mail.imap.IMAPFolder f,
javax.mail.Message msg)
|
java.lang.String |
addFolder(java.lang.String fullPath,
java.lang.String parentId,
javax.mail.Folder folderToInsert,
int type,
com.funambol.server.tools.IdSpaceGenerator idFolderSpace,
java.lang.String source_uri,
long principalId)
This method inserts the folder in the MailServer and the path in the Local DB. |
java.lang.String[] |
getAllDefaultFolders(java.lang.String idFilter,
java.util.Date timeFilter)
gets all default Folder |
ItemFolder[] |
getAllDefaultFoldersInfo(java.lang.String idFilter,
java.util.Date timeFilter)
gets all default folder infos |
javax.mail.Message[] |
getAllEmails(com.sun.mail.imap.IMAPFolder f,
EmailFilter filter)
gets all Messages |
java.lang.String[] |
getAllFolders(EmailFilter filter,
com.sun.mail.imap.IMAPFolder folder,
java.lang.String defFullpath,
java.lang.String source_uri,
long principalId)
gets all Folder |
ItemFolder[] |
getAllFoldersInfo(EmailFilter filter,
com.sun.mail.imap.IMAPFolder folder,
ItemFolder defFolder,
java.lang.String source_uri,
long principalId)
gets all folder infos |
java.lang.String |
getEmailFromMessageID(com.sun.mail.imap.IMAPFolder f,
java.lang.String FID,
java.lang.String message_id)
serch a document using the header Message-ID |
javax.mail.Message |
getEmailFromUID(com.sun.mail.imap.IMAPFolder f,
java.lang.String FID,
long uid)
serch a document using UID for IMAP4 protocol UID is long |
void |
removeAllEmail(com.sun.mail.imap.IMAPFolder f)
|
void |
removeEmail(com.sun.mail.imap.IMAPFolder f,
long uid)
|
void |
removeFolderInServer(com.sun.mail.imap.IMAPFolder f)
|
void |
searchSubFolderFullNames(com.sun.mail.imap.IMAPFolder folder,
java.util.ArrayList fs)
|
long |
updateEmail(java.lang.String FID,
java.lang.String FMID,
com.sun.mail.imap.IMAPFolder f,
javax.mail.Message msgNew,
boolean read,
boolean forwarded,
boolean replied)
This method handles the update procedure of an email. |
Methods inherited from class com.funambol.email.items.dao.EntityDAO |
---|
checkMessageIDforDrafts, getDefaultFolder, getFolderFromUID, getFullPathFromFID, getFullPathFromGUID, getGUIDFromFullPath, insertCustomFolder, insertDefaultFolderInDB, insertDefaultFolderInMailServer, insertFolder, lookupDataSource, removeFolder, removeImapOutboxItem, removePopOutboxItem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static ImapSemaphore uid_has_been_set
Constructor Detail |
---|
public ImapEntityDAO()
public ImapEntityDAO(java.lang.String jndiDataSourceName)
jndiDataSourceName
- StringMethod Detail |
---|
public javax.mail.Message[] getAllEmails(com.sun.mail.imap.IMAPFolder f, EmailFilter filter) throws EntityException
f
- IMAPFolderfilter
- EmailFilter
EntityException
public ItemFolder[] getAllDefaultFoldersInfo(java.lang.String idFilter, java.util.Date timeFilter) throws EntityException
idFilter
- StringtimeFilter
- Date
EntityException
public ItemFolder[] getAllFoldersInfo(EmailFilter filter, com.sun.mail.imap.IMAPFolder folder, ItemFolder defFolder, java.lang.String source_uri, long principalId) throws EntityException
filter
- EmailFilterfolder
- IMAPFolderdefFolder
- ItemFoldersource_uri
- StringprincipalId
- long
EntityException
public java.lang.String[] getAllDefaultFolders(java.lang.String idFilter, java.util.Date timeFilter) throws EntityException
idFilter
- StringtimeFilter
- Date
EntityException
public java.lang.String[] getAllFolders(EmailFilter filter, com.sun.mail.imap.IMAPFolder folder, java.lang.String defFullpath, java.lang.String source_uri, long principalId) throws EntityException
filter
- EmailFilterfolder
- IMAPFolderdefFullpath
- Stringsource_uri
- StringprincipalId
- long
EntityException
public java.lang.String getEmailFromMessageID(com.sun.mail.imap.IMAPFolder f, java.lang.String FID, java.lang.String message_id) throws EntityException
f
- IMAPFolderFID
- Stringmessage_id
- String
EntityException
public void removeEmail(com.sun.mail.imap.IMAPFolder f, long uid) throws EntityException
f
- IMAPFolderuid
- long
EntityException
public void removeAllEmail(com.sun.mail.imap.IMAPFolder f) throws EntityException
f
- IMAPFolder
EntityException
public void removeFolderInServer(com.sun.mail.imap.IMAPFolder f) throws EntityException
f
- IMAPFolder
EntityException
public long updateEmail(java.lang.String FID, java.lang.String FMID, com.sun.mail.imap.IMAPFolder f, javax.mail.Message msgNew, boolean read, boolean forwarded, boolean replied) throws EntityException
FID
- StringFMID
- Stringf
- IMAPFoldermsgNew
- Messageread
- Stringforwarded
- Stringreplied
- String
EntityException
public long addEmail(java.lang.String FID, com.sun.mail.imap.IMAPFolder f, javax.mail.Message msg) throws EntityException
FID
- Stringf
- IMAPFoldermsg
- Message
EntityException
public java.lang.String addFolder(java.lang.String fullPath, java.lang.String parentId, javax.mail.Folder folderToInsert, int type, com.funambol.server.tools.IdSpaceGenerator idFolderSpace, java.lang.String source_uri, long principalId) throws EntityException
fullPath
- StringparentId
- StringfolderToInsert
- Foldertype
- intidFolderSpace
- IdSpaceGeneratorsource_uri
- StringprincipalId
- long
EntityException
public javax.mail.Message getEmailFromUID(com.sun.mail.imap.IMAPFolder f, java.lang.String FID, long uid) throws EntityException
f
- IMAP Folderuid
- email imap id
EntityException
public void searchSubFolderFullNames(com.sun.mail.imap.IMAPFolder folder, java.util.ArrayList fs) throws javax.mail.MessagingException
folder
- starting folderfs
- all folders container
javax.mail.MessagingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |