|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTrackableSyncSource
com.funambol.common.pim.PIMSyncSource
com.funambol.common.pim.vcard.ContactSyncSource
public class ContactSyncSource
Basic sync source for PIM sync management. This class is the base class for all classes manipulating JSR75 PIM data (such as Contact, Calendar and so on). The class is a TrackableSyncSource, so that the tracking mechanism can be easily customized by clients (default is CacheTracking, based on items finger prints).
Field Summary | |
---|---|
protected static int[] |
SUPPORTED_FIELDS
|
Fields inherited from class com.funambol.common.pim.PIMSyncSource |
---|
globalStatus, list, totalAdded, totalDeleted, totalDeletedSent, totalNewSent, totalUpdated, totalUpdatedSent |
Constructor Summary | |
---|---|
ContactSyncSource(SourceConfig config,
PIMList list,
ChangesTracker tracker)
|
Method Summary | |
---|---|
protected PIMItem |
createItem(java.lang.String content)
Creates a single item in the proper PIMList |
protected boolean |
deleteItem(PIMItem item)
Delete an item from the store |
protected void |
fillItem(PIMItem pitem,
java.lang.String content)
Fills an item according to a textual representation of the same item. |
protected byte[] |
formatItem(PIMItem item)
Formats an item according to the format supported by the sync source. |
protected int[] |
getSupportedFields()
Get the list of supported fields. |
protected int |
getUIDField()
Get the value of the UID field. |
Methods inherited from class com.funambol.common.pim.PIMSyncSource |
---|
addItem, beginSync, clearItem, dataReceived, deleteAllItems, endSync, findItem, getAllItemsKeys, getItemContent, getLuidFromUID, getUID, updateItem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int[] SUPPORTED_FIELDS
Constructor Detail |
---|
public ContactSyncSource(SourceConfig config, PIMList list, ChangesTracker tracker)
Method Detail |
---|
protected PIMItem createItem(java.lang.String content) throws PIMException
createItem
in class PIMSyncSource
content
- is the item in the sync source standard format (could be a
vCard, SIF-C or any other valid format).
PIMException
- if the PIMItem cannot be created (for example if the
textual representation is invalid, or no new items can be added to the
list)protected int[] getSupportedFields()
getSupportedFields
in class PIMSyncSource
protected int getUIDField()
getUIDField
in class PIMSyncSource
protected boolean deleteItem(PIMItem item) throws PIMException
item
- the item to be removed (the key is the only relevant field)
PIMException
- if the item cannot be removedprotected byte[] formatItem(PIMItem item) throws PIMException
formatItem
in class PIMSyncSource
item
- the item (cannot be null)
PIMException
- if the item cannot be formattedprotected void fillItem(PIMItem pitem, java.lang.String content) throws PIMException
fillItem
in class PIMSyncSource
pitem
- is the object to be filledcontent
- is the item textual representation
PIMException
- if the item cannot be parsed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |