com.funambol.email.engine.cache
Class CrcCachedSyncSource

java.lang.Object
  extended bycom.funambol.framework.engine.source.AbstractSyncSource
      extended bycom.funambol.email.engine.cache.CrcCachedSyncSource
All Implemented Interfaces:
com.funambol.framework.engine.source.FilterableSyncSource, com.funambol.framework.tools.beans.LazyInitBean, java.io.Serializable, com.funambol.framework.engine.source.SyncSource
Direct Known Subclasses:
EmailSyncSource

public abstract class CrcCachedSyncSource
extends com.funambol.framework.engine.source.AbstractSyncSource
implements com.funambol.framework.engine.source.FilterableSyncSource, java.io.Serializable, com.funambol.framework.tools.beans.LazyInitBean

This class represents a SyncSource that read and store the state of the items in a support table.

See Also:
Serialized Form

Field Summary
 java.util.ArrayList itemsSent
          keep the items id and the result of send operation
 java.lang.String jndiDataSourceName
           
 
Fields inherited from class com.funambol.framework.engine.source.AbstractSyncSource
howManyAdded, howManyDeleted, howManyUpdated, info, LOG_NAME, name, sourceQuery, sourceURI, type
 
Constructor Summary
CrcCachedSyncSource()
           
 
Method Summary
 void beginSync(com.funambol.framework.engine.source.SyncContext context)
          BeginSync
abstract  void clearServerInfo()
           
 void endSync()
          EndSync Method
abstract  CrcSyncItemInfo[] getAllSyncItemInfo()
           
 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)
           
 char getSyncItemStateFromId(com.funambol.framework.engine.SyncItemKey syncItemKey)
           
 com.funambol.framework.engine.SyncItemKey[] getUpdatedSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp to)
           
 void init()
          Init the syncSource
 
Methods inherited from class com.funambol.framework.engine.source.AbstractSyncSource
addSyncItem, commitSync, getAllSyncItemKeys, getInfo, getName, getSourceQuery, getSourceURI, getSyncItemFromId, getSyncItemKeysFromTwin, getType, removeSyncItem, setInfo, setName, setOperationStatus, setSourceURI, setType, toString, updateSyncItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.funambol.framework.engine.source.FilterableSyncSource
isSyncItemInFilterClause, isSyncItemInFilterClause
 
Methods inherited from interface com.funambol.framework.engine.source.SyncSource
addSyncItem, commitSync, getAllSyncItemKeys, getInfo, getName, getSourceURI, getSyncItemFromId, getSyncItemKeysFromTwin, getType, removeSyncItem, setOperationStatus, updateSyncItem
 

Field Detail

jndiDataSourceName

public java.lang.String jndiDataSourceName

itemsSent

public java.util.ArrayList itemsSent
keep the items id and the result of send operation

Constructor Detail

CrcCachedSyncSource

public CrcCachedSyncSource()
Method Detail

init

public void init()
          throws com.funambol.framework.tools.beans.BeanInitializationException
Init the syncSource

Specified by:
init in interface com.funambol.framework.tools.beans.LazyInitBean
Throws:
com.funambol.framework.tools.beans.BeanInitializationException

beginSync

public void beginSync(com.funambol.framework.engine.source.SyncContext context)
               throws com.funambol.framework.engine.source.SyncSourceException
BeginSync

Specified by:
beginSync in interface com.funambol.framework.engine.source.SyncSource
Parameters:
context - The sync context that includes the principal, sync mode and filter clause.
Throws:
com.funambol.framework.engine.source.SyncSourceException

endSync

public void endSync()
             throws com.funambol.framework.engine.source.SyncSourceException
EndSync Method

Specified by:
endSync in interface com.funambol.framework.engine.source.SyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException

getUpdatedSyncItemKeys

public com.funambol.framework.engine.SyncItemKey[] getUpdatedSyncItemKeys(java.sql.Timestamp since,
                                                                          java.sql.Timestamp to)
                                                                   throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getUpdatedSyncItemKeys in interface com.funambol.framework.engine.source.SyncSource
Parameters:
since - Timestamp
to - Timestamp
Returns:
SyncItemKey[]
Throws:
com.funambol.framework.engine.source.SyncSourceException
See Also:
SyncSource

getNewSyncItemKeys

public com.funambol.framework.engine.SyncItemKey[] getNewSyncItemKeys(java.sql.Timestamp since,
                                                                      java.sql.Timestamp to)
                                                               throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getNewSyncItemKeys in interface com.funambol.framework.engine.source.SyncSource
Parameters:
since - Timestamp
to - Timestamp
Returns:
SyncItemKey[]
Throws:
com.funambol.framework.engine.source.SyncSourceException
See Also:
SyncSource

getDeletedSyncItemKeys

public com.funambol.framework.engine.SyncItemKey[] getDeletedSyncItemKeys(java.sql.Timestamp since,
                                                                          java.sql.Timestamp to)
                                                                   throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getDeletedSyncItemKeys in interface com.funambol.framework.engine.source.SyncSource
Parameters:
since - Timestamp
to - Timestamp
Returns:
SyncItemKey[]
Throws:
com.funambol.framework.engine.source.SyncSourceException
See Also:
SyncSource

getAllSyncItemInfo

public abstract CrcSyncItemInfo[] getAllSyncItemInfo()
                                              throws com.funambol.framework.engine.source.SyncSourceException
Returns:
CrcSyncItemInfo[]
Throws:
com.funambol.framework.engine.source.SyncSourceException

clearServerInfo

public abstract void clearServerInfo()
                              throws com.funambol.framework.engine.source.SyncSourceException
Throws:
com.funambol.framework.engine.source.SyncSourceException

getSyncItemStateFromId

public char getSyncItemStateFromId(com.funambol.framework.engine.SyncItemKey syncItemKey)
                            throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getSyncItemStateFromId in interface com.funambol.framework.engine.source.FilterableSyncSource
Parameters:
syncItemKey - SyncItemKey
Returns:
char
Throws:
com.funambol.framework.engine.source.SyncSourceException


Copyright © 2003-2006 Funambol.