com.funambol.domino.engine.cache
Class CachedSyncSource

java.lang.Object
  extended bycom.funambol.framework.engine.source.AbstractSyncSource
      extended bycom.funambol.domino.engine.cache.CachedSyncSource
All Implemented Interfaces:
com.funambol.framework.tools.beans.LazyInitBean, com.funambol.framework.engine.source.MergeableSyncSource, java.io.Serializable, com.funambol.framework.engine.source.SyncSource
Direct Known Subclasses:
DominoSyncSource, ExampleSyncSource

public abstract class CachedSyncSource
extends com.funambol.framework.engine.source.AbstractSyncSource
implements com.funambol.framework.engine.source.MergeableSyncSource, 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
protected  java.security.Principal principal
           
protected static java.lang.String PRODUCT_NAME
           
protected  int syncMode
           
 
Fields inherited from class com.funambol.framework.engine.source.AbstractSyncSource
howManyAdded, howManyDeleted, howManyUpdated, info, LOG_NAME, name, sourceQuery, sourceURI, type
 
Constructor Summary
CachedSyncSource()
           
 
Method Summary
 void beginSync(com.funambol.framework.engine.source.SyncContext context)
          BeginSync
 void endSync()
          EndSync
abstract  SyncItemInfo[] getAllSyncItemInfo()
           
 com.funambol.framework.engine.SyncItemKey[] getAllSyncItemKeys()
           
 com.funambol.framework.engine.SyncItemKey[] getDeletedSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp until)
           
 java.lang.String getJndiDataSourceName()
           
 com.funambol.framework.engine.SyncItemKey[] getNewSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp until)
           
 com.funambol.framework.engine.SyncItemKey[] getUpdatedSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp until)
           
 void init()
          Init the syncSource
protected abstract  void removeAllItems()
           
 void setJndiDataSourceName(java.lang.String jndiDataSourceName)
           
 void setOperationStatus(java.lang.String operation, int statusCode, com.funambol.framework.engine.SyncItemKey[] keys)
           
 
Methods inherited from class com.funambol.framework.engine.source.AbstractSyncSource
addSyncItem, commitSync, getInfo, getName, getSourceQuery, getSourceURI, getSyncItemFromId, getSyncItemKeysFromTwin, getType, removeSyncItem, setInfo, setName, 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.MergeableSyncSource
mergeSyncItems
 
Methods inherited from interface com.funambol.framework.engine.source.SyncSource
addSyncItem, commitSync, getInfo, getName, getSourceURI, getSyncItemFromId, getSyncItemKeysFromTwin, getType, removeSyncItem, updateSyncItem
 

Field Detail

PRODUCT_NAME

protected static final java.lang.String PRODUCT_NAME
See Also:
Constant Field Values

principal

protected java.security.Principal principal

syncMode

protected int syncMode
Constructor Detail

CachedSyncSource

public CachedSyncSource()
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

setJndiDataSourceName

public void setJndiDataSourceName(java.lang.String jndiDataSourceName)
Parameters:
jndiDataSourceName - String

getJndiDataSourceName

public java.lang.String getJndiDataSourceName()
Returns:
String

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 - SyncContext
Throws:
com.funambol.framework.engine.source.SyncSourceException

endSync

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

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

getAllSyncItemKeys

public com.funambol.framework.engine.SyncItemKey[] getAllSyncItemKeys()
                                                               throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getAllSyncItemKeys 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 until)
                                                                   throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getUpdatedSyncItemKeys in interface com.funambol.framework.engine.source.SyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException

getNewSyncItemKeys

public com.funambol.framework.engine.SyncItemKey[] getNewSyncItemKeys(java.sql.Timestamp since,
                                                                      java.sql.Timestamp until)
                                                               throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getNewSyncItemKeys in interface com.funambol.framework.engine.source.SyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException

getDeletedSyncItemKeys

public com.funambol.framework.engine.SyncItemKey[] getDeletedSyncItemKeys(java.sql.Timestamp since,
                                                                          java.sql.Timestamp until)
                                                                   throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getDeletedSyncItemKeys in interface com.funambol.framework.engine.source.SyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException

setOperationStatus

public void setOperationStatus(java.lang.String operation,
                               int statusCode,
                               com.funambol.framework.engine.SyncItemKey[] keys)
Specified by:
setOperationStatus in interface com.funambol.framework.engine.source.SyncSource

getAllSyncItemInfo

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

removeAllItems

protected abstract void removeAllItems()
                                throws com.funambol.framework.engine.source.SyncSourceException
Throws:
com.funambol.framework.engine.source.SyncSourceException


Copyright © 2003-2006 Funambol.