com.funambol.syncclient.spds.source
Class SIFFileSystemSyncSource
java.lang.Object
com.funambol.syncclient.spds.source.FileSystemSyncSource
com.funambol.syncclient.spds.source.SIFFileSystemSyncSource
- All Implemented Interfaces:
- SyncSource
public class SIFFileSystemSyncSource
- extends FileSystemSyncSource
- implements SyncSource
This class implements a SyncSource that extends a FileSystemSyncSource
and it's able to receive and send items in the following formats:
- SIF-C
- SIF-E
- text
- vCard
- vCalendar
The clientContentType and the serverContentType specify the format of
which the client and the server send the items and would receive the returned.
- Version:
- $Id: SIFFileSystemSyncSource.java,v 1.3 2007-12-22 18:09:17 nichele Exp $
Methods inherited from class com.funambol.syncclient.spds.source.FileSystemSyncSource |
beginSync, commitSync, emptyDataStore, endSync, getAllSyncItems, getDeletedSyncItems, getExistingFiles, getName, getNewSyncItems, getSourceDirectory, getSourceURI, getType, getUniqueFileName, getUpdatedSyncItems, isEncode, lastModifiedFromStateString, readFileContent, removeState, removeSyncItem, restoreSyncDB, roundTime, roundTimeEXT3, roundTimeFAT32, setEncode, setEncode, setName, setSourceURI, setState, setType, stateFromStateString, updateSyncDatabase |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SIFFileSystemSyncSource
public SIFFileSystemSyncSource()
- Creates a new instance of AbstractSyncSource
setSourceDrive
public void setSourceDrive(java.lang.String sourceDrive)
- Overrides:
setSourceDrive
in class FileSystemSyncSource
getSourceDrive
public java.lang.String getSourceDrive()
- Overrides:
getSourceDrive
in class FileSystemSyncSource
setSourceDirectory
public void setSourceDirectory(java.lang.String sourceDirectory)
- Overrides:
setSourceDirectory
in class FileSystemSyncSource
setCharset
public void setCharset(java.lang.String charset)
getCharset
public java.lang.String getCharset()
getClientContentType
public java.lang.String getClientContentType()
setClientContentType
public void setClientContentType(java.lang.String clientContentType)
getServerContentType
public java.lang.String getServerContentType()
setServerContentType
public void setServerContentType(java.lang.String serverContentType)
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 nullsyncItem
- 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)
throws SyncException
- 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 anysince
- last sync timestamp. null neans since everstate
- the state to use as filter
- Returns:
- an array of SyncItem objects whose state is equal to the given
state.
- Throws:
SyncException
Copyright © 2010 Funambol. All Rights Reserved.