com.funambol.syncclient.spds.source
Class SIFSyncSource

java.lang.Object
  extended by com.funambol.syncclient.spds.source.FileSystemSyncSource
      extended by com.funambol.syncclient.spds.source.SIFSyncSource
All Implemented Interfaces:
SyncSource

public class SIFSyncSource
extends FileSystemSyncSource
implements SyncSource

This class implements a dummy SyncSource that just displays the calls to its methods

Version:
$Id: SIFSyncSource.java,v 1.3 2007-12-22 18:09:17 nichele Exp $

Field Summary
 
Fields inherited from class com.funambol.syncclient.spds.source.FileSystemSyncSource
counter, DATABASE_FILE_NAME, DATABASE_HEADER, FORMAT_BASE64, isEXT3, isFAT32
 
Constructor Summary
SIFSyncSource()
          Creates a new instance of AbstractSyncSource
 
Method Summary
protected  SyncItem[] filterSyncItems(java.security.Principal principal, java.util.Date since, char state)
          Filters the SyncItems in the synchronization database (after a refresh) based on the given principal, last sync timestamp and state (see SyncItemState).
 SyncItem setSyncItem(java.security.Principal principal, SyncItem syncItem)
          Replaces an existing SyncItem or adds a new SyncItem if it does not exist.
 
Methods inherited from class com.funambol.syncclient.spds.source.FileSystemSyncSource
beginSync, commitSync, emptyDataStore, endSync, getAllSyncItems, getDeletedSyncItems, getExistingFiles, getName, getNewSyncItems, getSourceDirectory, getSourceDrive, getSourceURI, getType, getUniqueFileName, getUpdatedSyncItems, isEncode, lastModifiedFromStateString, readFileContent, removeState, removeSyncItem, restoreSyncDB, roundTime, roundTimeEXT3, roundTimeFAT32, setEncode, setEncode, setName, setSourceDirectory, setSourceDrive, setSourceURI, setState, setType, stateFromStateString, updateSyncDatabase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.funambol.syncclient.spds.engine.SyncSource
beginSync, commitSync, getAllSyncItems, getDeletedSyncItems, getName, getNewSyncItems, getSourceURI, getType, getUpdatedSyncItems, removeSyncItem
 

Constructor Detail

SIFSyncSource

public SIFSyncSource()
Creates a new instance of AbstractSyncSource

Method Detail

setSyncItem

public SyncItem setSyncItem(java.security.Principal principal,
                            SyncItem syncItem)
                     throws SyncException
Description copied from interface: SyncSource
Replaces an existing SyncItem or adds a new SyncItem if it does not exist. The item is also returned giving the opportunity to the source to modify its content and return the updated item (i.e. updating the id to the GUID).

Specified by:
setSyncItem in interface SyncSource
Overrides:
setSyncItem in class FileSystemSyncSource
Parameters:
principal - not used, always null
syncItem - the item to replace/add
Returns:
the inserted/updated item
Throws:
SyncException - in case of error (for instance if the underlying data store runs into problems)

filterSyncItems

protected SyncItem[] filterSyncItems(java.security.Principal principal,
                                     java.util.Date since,
                                     char state)
Filters the SyncItems in the synchronization database (after a refresh) based on the given principal, last sync timestamp and state (see SyncItemState). If state is equals to UNKNOWN all items are returned.
Note that the current implementation ignores the principal: data do not depend on users.

Overrides:
filterSyncItems in class FileSystemSyncSource
Parameters:
principal - principal. null means any
since - last sync timestamp. null neans since ever
state - the state to use as filter
Returns:
an array of SyncItem objects whose state is equal to the given state.


Copyright © 2010 Funambol. All Rights Reserved.