|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.email.items.dao.EntityDAO
public class EntityDAO
This class implements methods to access data in Mail Server datastore.
Field Summary | |
---|---|
protected java.lang.String |
jndiDataSourceName
|
protected com.funambol.framework.logging.FunambolLogger |
log
|
protected java.lang.String |
serverType
|
Constructor Summary | |
---|---|
EntityDAO()
|
|
EntityDAO(java.lang.String jndiDataSourceName,
java.lang.String serverType)
|
Method Summary | |
---|---|
void |
checkMessageIDforDrafts(com.sun.mail.imap.IMAPFolder f,
CommonMailServerWrapper cmsw)
|
java.util.HashMap |
getAllEmailsInbox(java.lang.String username,
java.lang.String protocol)
|
javax.mail.Folder |
getDefaultFolder(IMailServerWrapper msw,
java.lang.String fullpath)
check if the Folder is in the mail server |
ItemFolder |
getFolderFromUID(java.lang.String GUID,
java.lang.String source_uri,
long principalId)
serch a folder using the GUID in the local DB |
java.lang.String |
getFullPathFromFID(java.lang.String FID,
java.lang.String source_uri,
long principalId)
gets the folder fullpath from the local DB In the local db the GUID is composed by: parentId + separator + objectId This method look up the item with the GUID = '%/FID' |
java.lang.String |
getFullPathFromGUID(java.lang.String GUID,
java.lang.String source_uri,
long principalId)
gets the folder fullpath from the local DB |
java.lang.String |
getGUIDFromFullPath(java.lang.String fullpath,
java.lang.String source_uri,
long principalId)
gets the Folder id from the local DB |
void |
insertCustomFolder(com.sun.mail.imap.IMAPFolder folder,
java.lang.String defFullpath,
com.funambol.server.tools.id.DBIDGenerator idFolderSpace,
java.lang.String source_uri,
long principalId)
insert a custom folder |
void |
insertDefaultFolderInDB(java.lang.String GUID,
java.lang.String parentId,
java.lang.String fullPath,
java.lang.String source_uri,
long principalId)
This method inserts one of the default folders if needed |
void |
insertDefaultFolderInMailServer(CommonMailServerWrapper cmsw,
java.lang.String folderName)
This method inserts the folder in the MailServer |
java.lang.String |
insertFolder(java.lang.String fullPath,
java.lang.String parentId,
com.funambol.server.tools.id.DBIDGenerator idFolderSpace,
java.lang.String source_uri,
long principalId)
|
void |
insertInvalidItemInCache(java.lang.String GUID,
java.lang.String messageId,
java.util.Date headerDate,
java.util.Date received,
java.lang.String subject,
java.lang.String sender,
java.lang.String isEmail,
java.lang.String source_uri,
long principalId)
This method inserts one of the default folders if needed |
void |
removeEmailFromInbox(java.lang.String username,
java.lang.String protocol,
java.lang.String GUID)
|
void |
removeEmailFromServerItems(java.lang.String GUID,
java.util.HashMap serverItems)
remove the item from the map |
void |
removeFolder(java.lang.String GUID,
java.lang.String source_uri,
long principalId)
|
void |
setDeletedEmailInInbox(java.lang.String username,
java.lang.String protocol,
java.lang.String GUID)
|
void |
updateEmailInDB(long newcrc,
java.lang.String username,
java.lang.String protocol,
java.lang.String guid)
This method update the CRC for an email in the fnbl_email_inbox |
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 java.lang.String jndiDataSourceName
protected java.lang.String serverType
Constructor Detail |
---|
public EntityDAO()
public EntityDAO(java.lang.String jndiDataSourceName, java.lang.String serverType)
jndiDataSourceName
- StringMethod Detail |
---|
public void insertCustomFolder(com.sun.mail.imap.IMAPFolder folder, java.lang.String defFullpath, com.funambol.server.tools.id.DBIDGenerator idFolderSpace, java.lang.String source_uri, long principalId) throws EntityException
folder
- IMAPFolderdefFullpath
- StringidFolderSpace
- IdSpaceGeneratorsource_uri
- StringprincipalId
- long
EntityException
public java.lang.String getFullPathFromGUID(java.lang.String GUID, java.lang.String source_uri, long principalId) throws EntityException
GUID
- folder idsource_uri
- StringprincipalId
- long
EntityException
public java.lang.String getFullPathFromFID(java.lang.String FID, java.lang.String source_uri, long principalId) throws EntityException
FID
- folder idsource_uri
- StringprincipalId
- long
EntityException
public java.lang.String getGUIDFromFullPath(java.lang.String fullpath, java.lang.String source_uri, long principalId) throws EntityException
fullpath
- folder full pathsource_uri
- StringprincipalId
- long
EntityException
public void insertDefaultFolderInMailServer(CommonMailServerWrapper cmsw, java.lang.String folderName) throws EntityException
cmsw
- CommonMailServerWrapperfolderName
- String
EntityException
public ItemFolder getFolderFromUID(java.lang.String GUID, java.lang.String source_uri, long principalId) throws EntityException
GUID
- folder idsource_uri
- StringprincipalId
- long
EntityException
public void checkMessageIDforDrafts(com.sun.mail.imap.IMAPFolder f, CommonMailServerWrapper cmsw) throws EntityException
f
- IMAPFoldercmsw
- CommonMailServerWrapper
EntityException
public java.lang.String insertFolder(java.lang.String fullPath, java.lang.String parentId, com.funambol.server.tools.id.DBIDGenerator idFolderSpace, java.lang.String source_uri, long principalId) throws EntityException
fullPath
- folder full pathparentId
- parent folder ididFolderSpace
- IdSpaceGeneratorsource_uri
- StringprincipalId
- long
EntityException
public javax.mail.Folder getDefaultFolder(IMailServerWrapper msw, java.lang.String fullpath) throws EntityException
msw
- - IMailServerWrapper .fullpath
- - String .
EntityException
public void removeFolder(java.lang.String GUID, java.lang.String source_uri, long principalId) throws EntityException
GUID
- Stringsource_uri
- StringprincipalId
- long
EntityException
public java.util.HashMap getAllEmailsInbox(java.lang.String username, java.lang.String protocol) throws EntityException
username
- String
EntityException
public void removeEmailFromInbox(java.lang.String username, java.lang.String protocol, java.lang.String GUID) throws EntityException
username
- Stringprotocol
- StringGUID
- String
EntityException
public void setDeletedEmailInInbox(java.lang.String username, java.lang.String protocol, java.lang.String GUID) throws EntityException
username
- Stringprotocol
- StringGUID
- String
EntityException
public void removeEmailFromServerItems(java.lang.String GUID, java.util.HashMap serverItems) throws EntityException
GUID
- StringserverItems
- all info in CrcSyncItemInfo
EntityException
public void insertDefaultFolderInDB(java.lang.String GUID, java.lang.String parentId, java.lang.String fullPath, java.lang.String source_uri, long principalId) throws EntityException
GUID
- StringparentId
- StringfullPath
- Stringsource_uri
- StringprincipalId
- long
EntityException
public void updateEmailInDB(long newcrc, java.lang.String username, java.lang.String protocol, java.lang.String guid) throws EntityException
newcrc
- longusername
- Stringprotocol
- Stringguid
- String
EntityException
public void insertInvalidItemInCache(java.lang.String GUID, java.lang.String messageId, java.util.Date headerDate, java.util.Date received, java.lang.String subject, java.lang.String sender, java.lang.String isEmail, java.lang.String source_uri, long principalId) throws EntityException
GUID
- Stringsource_uri
- StringprincipalId
- long
EntityException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |