|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.email.engine.source.EmailGeneric
public abstract class EmailGeneric
This class implements common methods of EmailPOPSyncSource version $Id: EmailGeneric.java,v 1.9 2007/01/26 17:39:55 gbmiglia Exp $
Field Summary | |
---|---|
protected EntityManager |
em
|
protected EmailSyncSource |
ess
|
protected com.funambol.framework.logging.FunambolLogger |
log
|
Constructor Summary | |
---|---|
EmailGeneric()
|
|
EmailGeneric(EmailSyncSourceWrapper _essc)
|
Method Summary | |
---|---|
abstract com.funambol.framework.engine.SyncItem |
addSyncItem(com.funambol.framework.engine.SyncItem syncItem)
|
void |
checkMessageIDforDrafts(java.lang.String sURI,
long pID)
check if in the Drafts folder therse is an item without message-id |
abstract void |
clearServerInfo()
|
protected com.funambol.framework.engine.SyncItem |
createSyncItem(EmailSyncSource ess,
Email email,
char status,
java.util.TimeZone deviceTimeZone,
java.lang.String deviceCharset)
|
protected com.funambol.framework.engine.SyncItem |
createSyncItem(EmailSyncSource ess,
Folder folder,
char status,
java.util.TimeZone deviceTimeZone,
java.lang.String deviceCharset)
|
abstract java.util.HashMap |
getAllSyncItemInfo()
|
abstract com.funambol.framework.engine.SyncItemKey[] |
getAllSyncItemKeys()
|
com.funambol.framework.engine.SyncItemKey[] |
getDeletedSyncItemKeys(java.sql.Timestamp since,
java.sql.Timestamp to)
|
com.funambol.framework.engine.SyncItemKey[] |
getNewSyncItemKeys(java.sql.Timestamp since,
java.sql.Timestamp to)
|
abstract com.funambol.framework.engine.SyncItem |
getSyncItemFromId(com.funambol.framework.engine.SyncItemKey syncItemKey)
|
abstract com.funambol.framework.engine.SyncItemKey[] |
getSyncItemKeysFromTwin(com.funambol.framework.engine.SyncItem syncItem)
|
char |
getSyncItemStateFromId(com.funambol.framework.engine.SyncItemKey syncItemKey)
|
com.funambol.framework.engine.SyncItemKey[] |
getUpdatedSyncItemKeys(java.sql.Timestamp since,
java.sql.Timestamp to)
|
void |
insertDefaultFolder(DefaultFolder df,
EmailFilter filter,
java.lang.String protocol,
java.lang.String sURI,
long pID)
insert the default folder if needed |
protected void |
insertInvalidItem(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)
insert the invalid item in the cache. |
protected boolean |
isEmailFromContent(java.lang.String content)
Returns true if the syncitem is a Mail, false if the sycItem is a Folder |
protected boolean |
isEmailFromKey(java.lang.String parentId,
java.lang.String objectId,
java.lang.String sourceURI,
long principalId)
Returns true if the syncitem is a Mail false if the sycItem is a Folder the key is composed by: parentId/objId (mailid or folderid) The key is created by the connector and it always creates the syncItemKey using parentId and mailId |
abstract boolean |
isSyncItemInFilterClause(com.funambol.framework.engine.SyncItem syncItem)
|
abstract boolean |
isSyncItemInFilterClause(com.funambol.framework.engine.SyncItemKey syncItemKey)
|
protected boolean |
isValidItem(java.lang.String key)
|
abstract void |
removeSyncItem(com.funambol.framework.engine.SyncItemKey syncItemKey,
java.sql.Timestamp s,
boolean engineSoftDelete)
|
void |
setOperationStatus(java.lang.String operation,
int statusCode,
com.funambol.framework.engine.SyncItemKey[] keys)
|
abstract com.funambol.framework.engine.SyncItem |
updateSyncItem(com.funambol.framework.engine.SyncItem syncItem)
|
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 EntityManager em
protected EmailSyncSource ess
Constructor Detail |
---|
public EmailGeneric()
public EmailGeneric(EmailSyncSourceWrapper _essc) throws com.funambol.framework.engine.source.SyncSourceException
com.funambol.framework.engine.source.SyncSourceException
Method Detail |
---|
public abstract boolean isSyncItemInFilterClause(com.funambol.framework.engine.SyncItem syncItem) throws com.funambol.framework.engine.source.SyncSourceException
isSyncItemInFilterClause
in interface IEmailGeneric
com.funambol.framework.engine.source.SyncSourceException
public abstract boolean isSyncItemInFilterClause(com.funambol.framework.engine.SyncItemKey syncItemKey) throws com.funambol.framework.engine.source.SyncSourceException
isSyncItemInFilterClause
in interface IEmailGeneric
com.funambol.framework.engine.source.SyncSourceException
public void setOperationStatus(java.lang.String operation, int statusCode, com.funambol.framework.engine.SyncItemKey[] keys)
setOperationStatus
in interface IEmailGeneric
operation
- StringstatusCode
- intkeys
- SyncItemKey[]public abstract void removeSyncItem(com.funambol.framework.engine.SyncItemKey syncItemKey, java.sql.Timestamp s, boolean engineSoftDelete) throws com.funambol.framework.engine.source.SyncSourceException
removeSyncItem
in interface IEmailGeneric
com.funambol.framework.engine.source.SyncSourceException
public abstract com.funambol.framework.engine.SyncItem getSyncItemFromId(com.funambol.framework.engine.SyncItemKey syncItemKey) throws com.funambol.framework.engine.source.SyncSourceException
getSyncItemFromId
in interface IEmailGeneric
syncItemKey
- SyncItemKey
com.funambol.framework.engine.source.SyncSourceException
SyncSource
public abstract com.funambol.framework.engine.SyncItemKey[] getAllSyncItemKeys() throws com.funambol.framework.engine.source.SyncSourceException
getAllSyncItemKeys
in interface IEmailGeneric
com.funambol.framework.engine.source.SyncSourceException
public abstract java.util.HashMap getAllSyncItemInfo() throws com.funambol.framework.engine.source.SyncSourceException
getAllSyncItemInfo
in interface IEmailGeneric
com.funambol.framework.engine.source.SyncSourceException
public abstract void clearServerInfo() throws com.funambol.framework.engine.source.SyncSourceException
com.funambol.framework.engine.source.SyncSourceException
public abstract com.funambol.framework.engine.SyncItemKey[] getSyncItemKeysFromTwin(com.funambol.framework.engine.SyncItem syncItem) throws com.funambol.framework.engine.source.SyncSourceException
getSyncItemKeysFromTwin
in interface IEmailGeneric
syncItem
- SyncItem
com.funambol.framework.engine.source.SyncSourceException
public abstract com.funambol.framework.engine.SyncItem addSyncItem(com.funambol.framework.engine.SyncItem syncItem) throws com.funambol.framework.engine.source.SyncSourceException
addSyncItem
in interface IEmailGeneric
com.funambol.framework.engine.source.SyncSourceException
public abstract com.funambol.framework.engine.SyncItem updateSyncItem(com.funambol.framework.engine.SyncItem syncItem) throws com.funambol.framework.engine.source.SyncSourceException
updateSyncItem
in interface IEmailGeneric
com.funambol.framework.engine.source.SyncSourceException
public com.funambol.framework.engine.SyncItemKey[] getUpdatedSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp to) throws com.funambol.framework.engine.source.SyncSourceException
getUpdatedSyncItemKeys
in interface IEmailGeneric
com.funambol.framework.engine.source.SyncSourceException
public com.funambol.framework.engine.SyncItemKey[] getNewSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp to) throws com.funambol.framework.engine.source.SyncSourceException
getNewSyncItemKeys
in interface IEmailGeneric
com.funambol.framework.engine.source.SyncSourceException
public com.funambol.framework.engine.SyncItemKey[] getDeletedSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp to) throws com.funambol.framework.engine.source.SyncSourceException
getDeletedSyncItemKeys
in interface IEmailGeneric
com.funambol.framework.engine.source.SyncSourceException
public char getSyncItemStateFromId(com.funambol.framework.engine.SyncItemKey syncItemKey) throws com.funambol.framework.engine.source.SyncSourceException
getSyncItemStateFromId
in interface IEmailGeneric
syncItemKey
- SyncItemKey
com.funambol.framework.engine.source.SyncSourceException
public void checkMessageIDforDrafts(java.lang.String sURI, long pID) throws EntityException
checkMessageIDforDrafts
in interface IEmailGeneric
com.funambol.framework.engine.source.SyncSourceException
EntityException
public void insertDefaultFolder(DefaultFolder df, EmailFilter filter, java.lang.String protocol, java.lang.String sURI, long pID) throws EntityException
insertDefaultFolder
in interface IEmailGeneric
df
- defaulFolder objectsURI
- sourceURIpID
- principal ID
EntityException
protected com.funambol.framework.engine.SyncItem createSyncItem(EmailSyncSource ess, Folder folder, char status, java.util.TimeZone deviceTimeZone, java.lang.String deviceCharset) throws EntityException
folder
- Folderstatus
- char
EntityException
protected com.funambol.framework.engine.SyncItem createSyncItem(EmailSyncSource ess, Email email, char status, java.util.TimeZone deviceTimeZone, java.lang.String deviceCharset) throws EntityException
email
- Emailstatus
- char
EntityException
protected boolean isValidItem(java.lang.String key)
key
- GUID String
protected boolean isEmailFromKey(java.lang.String parentId, java.lang.String objectId, java.lang.String sourceURI, long principalId) throws EntityException
parentId
- StringobjectId
- String
com.funambol.framework.engine.source.SyncSourceException
EntityException
protected boolean isEmailFromContent(java.lang.String content)
content
- String
protected void insertInvalidItem(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) throws EntityException
com.funambol.framework.engine.source.SyncSourceException
EntityException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |