|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.syncml.client.BaseSyncSource
com.funambol.syncml.client.TrackableSyncSource
com.funambol.syncml.client.ConfigSyncSource
public class ConfigSyncSource
An implementation of TrackableSyncSource, providing the ability to sync Funambol's client configuration
Field Summary |
---|
Fields inherited from class com.funambol.syncml.client.TrackableSyncSource |
---|
tracker |
Fields inherited from class com.funambol.syncml.client.BaseSyncSource |
---|
allIndex, allItems, config, delIndex, delItems, filter, globalStatus, newIndex, newItems, syncMode, updIndex, updItems |
Fields inherited from interface com.funambol.syncml.spds.SyncSource |
---|
ENCODING_B64, ENCODING_NONE, STATUS_CONNECTION_ERROR, STATUS_RECV_ERROR, STATUS_SEND_ERROR, STATUS_SERVER_ERROR, STATUS_SUCCESS |
Constructor Summary | |
---|---|
ConfigSyncSource(SourceConfig config,
ChangesTracker tracker,
StringKeyValueStore store)
ConfigSyncSource constructor |
Method Summary | |
---|---|
int |
addItem(SyncItem item)
Add a new SyncItem to this source backend. |
void |
beginSync(int syncMode)
Called after SyncManager preparation and initialization just before start the synchronization of the SyncSource. |
int |
deleteItem(java.lang.String key)
Delete a SyncItem stored in the source backend. |
void |
endSync()
Called just before committing the synchronization process by the SyncManager. |
protected java.util.Enumeration |
getAllItemsKeys()
|
protected SyncItem |
getItemContent(SyncItem item)
This function gets the item content in the backend database and returns a complete item. |
int |
updateItem(SyncItem item)
Update a given SyncItem stored in the source backend. |
Methods inherited from class com.funambol.syncml.client.TrackableSyncSource |
---|
initAllItems, initChangedItems, initDelItems, initNewItems, initUpdItems, setItemStatus |
Methods inherited from class com.funambol.syncml.client.BaseSyncSource |
---|
dataReceived, getClientAddNumber, getClientDeleteNumber, getClientItemsNumber, getClientReplaceNumber, getConfig, getEncoding, getFilter, getLastAnchor, getListener, getName, getNextAnchor, getNextDeletedItem, getNextItem, getNextNewItem, getNextUpdatedItem, getServerItemsNumber, getSourceUri, getStatus, getSyncMode, getType, setConfig, setFilter, setLastAnchor, setListener, setNextAnchor, setServerItemsNumber |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigSyncSource(SourceConfig config, ChangesTracker tracker, StringKeyValueStore store)
Method Detail |
---|
public void beginSync(int syncMode) throws SyncException
BaseSyncSource
beginSync
in interface SyncSource
beginSync
in class TrackableSyncSource
syncMode
- the synchronization type: one of the values in
sync4j.framework.core.AlertCode
SyncException
- in case of error. This will stop the sync processpublic void endSync() throws SyncException
BaseSyncSource
endSync
in interface SyncSource
endSync
in class TrackableSyncSource
SyncException
- in case of error, to stop the commit.protected java.util.Enumeration getAllItemsKeys() throws SyncException
getAllItemsKeys
in class TrackableSyncSource
SyncException
public int addItem(SyncItem item) throws SyncException
BaseSyncSource
addItem
in interface SyncSource
addItem
in class BaseSyncSource
item
- the SyncItem to add, with the GUID sent by the server.
The source is resposible to set it to the LUID before
returning a successful status code.
SyncException
- if an unrecoverable error occur, to stop the syncpublic int updateItem(SyncItem item) throws SyncException
BaseSyncSource
updateItem
in interface SyncSource
updateItem
in class BaseSyncSource
item
- the SyncItem to update. The key of the item is already
the LUID.
SyncException
- if an unrecoverable error occur, to stop the syncpublic int deleteItem(java.lang.String key) throws SyncException
BaseSyncSource
deleteItem
in interface SyncSource
deleteItem
in class BaseSyncSource
key
- The key of the item to delete.
SyncException
- if an unrecoverable error occur, to stop the syncprotected SyncItem getItemContent(SyncItem item) throws SyncException
BaseSyncSource
The content of the item depends also from the encoding of this SyncSource:
getItemContent
in class BaseSyncSource
SyncException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |