com.funambol.ws.engine.source
Class WebServiceSyncSource

java.lang.Object
  extended bycom.funambol.framework.engine.source.AbstractSyncSource
      extended bycom.funambol.ws.engine.source.WebServiceSyncSource
All Implemented Interfaces:
com.funambol.framework.engine.source.MergeableSyncSource, java.io.Serializable, com.funambol.framework.engine.source.SyncSource

public class WebServiceSyncSource
extends com.funambol.framework.engine.source.AbstractSyncSource
implements com.funambol.framework.engine.source.MergeableSyncSource, java.io.Serializable

SyncSource to sync with an web service. See design document for the detail.

See Also:
Serialized Form

Field Summary
protected  java.util.logging.Logger log
           
protected static java.lang.String LOGGER_NAME
           
protected static java.lang.String PRODUCT_NAME
           
 
Fields inherited from class com.funambol.framework.engine.source.AbstractSyncSource
howManyAdded, howManyDeleted, howManyUpdated, info, LOG_NAME, name, sourceQuery, sourceURI, type
 
Constructor Summary
WebServiceSyncSource()
           
 
Method Summary
 com.funambol.framework.engine.SyncItem addSyncItem(com.funambol.framework.engine.SyncItem syncItem)
           
 void beginSync(com.funambol.framework.engine.source.SyncContext context)
           
 void endSync()
           
 com.funambol.framework.engine.SyncItemKey[] getAllSyncItemKeys()
           
 com.funambol.framework.engine.SyncItemKey[] getDeletedSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp until)
           
 com.funambol.framework.engine.SyncItemKey[] getNewSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp until)
           
 com.funambol.framework.engine.SyncItem getSyncItemFromId(com.funambol.framework.engine.SyncItemKey syncItemKey)
           
 com.funambol.framework.engine.SyncItemKey[] getSyncItemKeysFromTwin(com.funambol.framework.engine.SyncItem syncItem)
           
 char getSyncItemStateFromId(com.funambol.framework.engine.SyncItemKey key)
           
 com.funambol.framework.engine.SyncItemKey[] getUpdatedSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp until)
           
 java.lang.String getWebServiceUrl()
           
 boolean isFilter()
           
 boolean isSyncItemInFilterClause(com.funambol.framework.engine.SyncItem item)
           
 boolean isSyncItemInFilterClause(com.funambol.framework.engine.SyncItemKey key)
           
 boolean mergeSyncItems(com.funambol.framework.engine.SyncItemKey serverKey, com.funambol.framework.engine.SyncItem clientItem)
           
 void removeSyncItem(com.funambol.framework.engine.SyncItemKey itemKey, java.sql.Timestamp timestamp, boolean softDeletion)
           
 void setFilter(boolean filter)
           
 void setOperationStatus(java.lang.String operation, int statusCode, com.funambol.framework.engine.SyncItemKey[] keys)
           
 void setWebServiceUrl(java.lang.String webServiceUrl)
           
 java.lang.String toString()
          Returns a string representation of this object.
 com.funambol.framework.engine.SyncItem updateSyncItem(com.funambol.framework.engine.SyncItem syncItem)
           
 
Methods inherited from class com.funambol.framework.engine.source.AbstractSyncSource
commitSync, getInfo, getName, getSourceQuery, getSourceURI, getType, setInfo, setName, setSourceURI, setType
 
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.SyncSource
commitSync, getInfo, getName, getSourceURI, getType
 

Field Detail

LOGGER_NAME

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

PRODUCT_NAME

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

log

protected transient java.util.logging.Logger log
Constructor Detail

WebServiceSyncSource

public WebServiceSyncSource()
Method Detail

getWebServiceUrl

public java.lang.String getWebServiceUrl()

setWebServiceUrl

public void setWebServiceUrl(java.lang.String webServiceUrl)

isFilter

public boolean isFilter()

setFilter

public void setFilter(boolean filter)

toString

public java.lang.String toString()
Returns a string representation of this object.

Returns:
a string representation of this object.

beginSync

public void beginSync(com.funambol.framework.engine.source.SyncContext context)
               throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
beginSync 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

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

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

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

addSyncItem

public com.funambol.framework.engine.SyncItem addSyncItem(com.funambol.framework.engine.SyncItem syncItem)
                                                   throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
addSyncItem in interface com.funambol.framework.engine.source.SyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException

updateSyncItem

public com.funambol.framework.engine.SyncItem updateSyncItem(com.funambol.framework.engine.SyncItem syncItem)
                                                      throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
updateSyncItem in interface com.funambol.framework.engine.source.SyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException

removeSyncItem

public void removeSyncItem(com.funambol.framework.engine.SyncItemKey itemKey,
                           java.sql.Timestamp timestamp,
                           boolean softDeletion)
                    throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
removeSyncItem in interface com.funambol.framework.engine.source.SyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException

getSyncItemFromId

public com.funambol.framework.engine.SyncItem getSyncItemFromId(com.funambol.framework.engine.SyncItemKey syncItemKey)
                                                         throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getSyncItemFromId in interface com.funambol.framework.engine.source.SyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException

mergeSyncItems

public boolean mergeSyncItems(com.funambol.framework.engine.SyncItemKey serverKey,
                              com.funambol.framework.engine.SyncItem clientItem)
                       throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
mergeSyncItems in interface com.funambol.framework.engine.source.MergeableSyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException
See Also:
com.funambol.framework.engine.source

getSyncItemKeysFromTwin

public com.funambol.framework.engine.SyncItemKey[] getSyncItemKeysFromTwin(com.funambol.framework.engine.SyncItem syncItem)
                                                                    throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
getSyncItemKeysFromTwin in interface com.funambol.framework.engine.source.SyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException

endSync

public void endSync()
             throws com.funambol.framework.engine.source.SyncSourceException
Specified by:
endSync in interface com.funambol.framework.engine.source.SyncSource
Throws:
com.funambol.framework.engine.source.SyncSourceException

isSyncItemInFilterClause

public boolean isSyncItemInFilterClause(com.funambol.framework.engine.SyncItem item)
                                 throws com.funambol.framework.engine.source.SyncSourceException
Throws:
com.funambol.framework.engine.source.SyncSourceException

isSyncItemInFilterClause

public boolean isSyncItemInFilterClause(com.funambol.framework.engine.SyncItemKey key)
                                 throws com.funambol.framework.engine.source.SyncSourceException
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
See Also:
com.funambol.framework.engine.source

getSyncItemStateFromId

public char getSyncItemStateFromId(com.funambol.framework.engine.SyncItemKey key)
                            throws com.funambol.framework.engine.source.SyncSourceException
Throws:
com.funambol.framework.engine.source.SyncSourceException


Copyright © 2005-2006 Funambol.