|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.framework.engine.source.AbstractSyncSource
com.funambol.exchange.engine.cache.ExchangeCachedSyncSource
This class represents a SyncSource that read and store the state of the items in a support table.
Field Summary | |
protected java.lang.String |
credentials
|
protected java.lang.String |
exchangeFolder
Property exchange folder |
protected java.lang.String |
exchangeHost
Property Exchange host |
protected java.lang.String |
host
Property SECC host |
protected java.util.logging.Logger |
log
|
protected int |
port
Property SECC Port |
protected long |
principalId
|
protected int |
syncMode
|
protected java.lang.String |
username
|
Fields inherited from class com.funambol.framework.engine.source.AbstractSyncSource |
howManyAdded, howManyDeleted, howManyUpdated, info, LOG_NAME, name, sourceQuery, sourceURI, type |
Constructor Summary | |
ExchangeCachedSyncSource()
|
Method Summary | |
protected void |
addInExchangeItemsKeys(java.lang.String id)
Add SyncItemKey with id to exchangeItemsKeys arrayList |
protected void |
addToCacheSyncItems(com.funambol.framework.engine.SyncItem[] syncItems)
Add SyncItem array to cacheSyncItems arrayList |
void |
beginSync(com.funambol.framework.engine.source.SyncContext context)
Method by the server at the begining of the sync process. |
abstract void |
deleteAll()
deletes all Items from the Exchange server |
void |
endSync()
|
com.funambol.framework.engine.SyncItemKey[] |
getAllSyncItemKeys()
|
protected java.util.List |
getCachedSyncItems()
Gets the list of cached items to be used in the package's classes and the subclasses. |
protected com.funambol.framework.engine.SyncItemKey[] |
getCacheSyncItemsKeys()
find SyncItemKey array about cacheSyncItemsKeys |
com.funambol.framework.engine.SyncItemKey[] |
getDeletedSyncItemKeys(java.sql.Timestamp since,
java.sql.Timestamp until)
|
java.lang.String |
getExchangeFolder()
Getter for property exchange folder. |
abstract Item[] |
getExchangeItems(java.lang.String username,
java.lang.String credentials,
java.lang.String exchangeFolder,
java.lang.String[] ids,
boolean isBeginSync)
|
protected java.lang.String |
getHref(java.lang.String id,
long principal)
Return href (webdav resource name) of item |
com.funambol.framework.engine.SyncItemKey[] |
getNewSyncItemKeys(java.sql.Timestamp since,
java.sql.Timestamp until)
|
protected com.funambol.framework.engine.SyncItem |
getSyncItemById(java.lang.String id)
find SyncItem in cacheSyncItems by id |
protected java.util.ArrayList |
getSyncItemKeysArrayListFromItems(Item[] items)
return SyncItemKey ArrayList array about items |
protected com.funambol.framework.engine.SyncItemKey[] |
getSyncItemKeysFromItems(Item[] items)
find SyncItemKey array about items |
abstract com.funambol.framework.engine.SyncItem[] |
getSyncItems(java.lang.String username,
java.lang.String credentials,
java.lang.String[] ids,
java.lang.String exchangeFolder)
|
char |
getSyncItemStateFromId(com.funambol.framework.engine.SyncItemKey syncItemKey)
|
protected char |
getSyncItemStatus(java.lang.String key)
Return SyncItem status |
com.funambol.framework.engine.SyncItemKey[] |
getUpdatedSyncItemKeys(java.sql.Timestamp since,
java.sql.Timestamp until)
|
abstract void |
initManager()
init manager |
protected void |
removeInExchangeItemsKeys(java.lang.String id)
Remove SyncItemKey with id from exchangeItemsKeys arrayList |
void |
setExchangeFolder(java.lang.String exchangeFolder)
Setter for property exchange folder. |
protected void |
toSyncErrorNewItems(java.lang.String id)
Add item to error new items array list |
protected void |
toSyncErrorRemoveItems(java.lang.String id)
Add item to error remove items array list |
protected void |
toSyncErrorUpdateItems(java.lang.String id)
Add item to error update items array list |
protected void |
toSyncNewItems(java.lang.String id,
long crc,
java.util.Date lastUpdate)
Add item to new items array list |
protected void |
toSyncRemoveItems(java.lang.String id)
Add item to remove items array list |
protected void |
toSyncUpdateItems(java.lang.String id,
long crc,
java.util.Date lastUpdate)
Add item to update items array list |
Methods inherited from class com.funambol.framework.engine.source.AbstractSyncSource |
addSyncItem, commitSync, getInfo, getName, getSourceQuery, getSourceURI, getSyncItemFromId, getSyncItemKeysFromTwin, getType, removeSyncItem, setInfo, setName, setOperationStatus, setSourceURI, setType, toString, updateSyncItem |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.logging.Logger log
protected long principalId
protected java.lang.String username
protected java.lang.String credentials
protected int syncMode
protected java.lang.String exchangeFolder
protected java.lang.String host
protected int port
protected java.lang.String exchangeHost
Constructor Detail |
public ExchangeCachedSyncSource()
Method Detail |
public java.lang.String getExchangeFolder()
public void setExchangeFolder(java.lang.String exchangeFolder)
exchangeFolder
- New value of property exchange folder.public void beginSync(com.funambol.framework.engine.source.SyncContext context) throws com.funambol.framework.engine.source.SyncSourceException
Method by the server at the begining of the sync process.
beginSync
in interface com.funambol.framework.engine.source.SyncSource
context
- the context of the sync
com.funambol.framework.engine.source.SyncSourceException
- if an error occursSyncSource
public abstract void deleteAll() throws com.funambol.framework.engine.source.SyncSourceException
com.funambol.framework.engine.source.SyncSourceException
public void endSync() throws com.funambol.framework.engine.source.SyncSourceException
endSync
in interface com.funambol.framework.engine.source.SyncSource
com.funambol.framework.engine.source.SyncSourceException
SyncSource
public com.funambol.framework.engine.SyncItemKey[] getNewSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp until) throws com.funambol.framework.engine.source.SyncSourceException
getNewSyncItemKeys
in interface com.funambol.framework.engine.source.SyncSource
com.funambol.framework.engine.source.SyncSourceException
SyncSource
public com.funambol.framework.engine.SyncItemKey[] getUpdatedSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp until) throws com.funambol.framework.engine.source.SyncSourceException
getUpdatedSyncItemKeys
in interface com.funambol.framework.engine.source.SyncSource
com.funambol.framework.engine.source.SyncSourceException
SyncSource
public com.funambol.framework.engine.SyncItemKey[] getDeletedSyncItemKeys(java.sql.Timestamp since, java.sql.Timestamp until) throws com.funambol.framework.engine.source.SyncSourceException
getDeletedSyncItemKeys
in interface com.funambol.framework.engine.source.SyncSource
com.funambol.framework.engine.source.SyncSourceException
SyncSource
public com.funambol.framework.engine.SyncItemKey[] getAllSyncItemKeys() throws com.funambol.framework.engine.source.SyncSourceException
getAllSyncItemKeys
in interface com.funambol.framework.engine.source.SyncSource
com.funambol.framework.engine.source.SyncSourceException
SyncSource
public char getSyncItemStateFromId(com.funambol.framework.engine.SyncItemKey syncItemKey) throws com.funambol.framework.engine.source.SyncSourceException
com.funambol.framework.engine.source.SyncSourceException
SyncSource
public abstract Item[] getExchangeItems(java.lang.String username, java.lang.String credentials, java.lang.String exchangeFolder, java.lang.String[] ids, boolean isBeginSync) throws com.funambol.framework.engine.source.SyncSourceException
username
- credentials
- exchangeFolder
- ids
- isBeginSync
-
com.funambol.framework.engine.source.SyncSourceException
public abstract com.funambol.framework.engine.SyncItem[] getSyncItems(java.lang.String username, java.lang.String credentials, java.lang.String[] ids, java.lang.String exchangeFolder) throws com.funambol.framework.engine.source.SyncSourceException
ids
-
com.funambol.framework.engine.source.SyncSourceException
public abstract void initManager() throws com.funambol.framework.engine.source.SyncSourceException
com.funambol.framework.engine.source.SyncSourceException
protected char getSyncItemStatus(java.lang.String key)
key
- SyncItem keyprotected java.lang.String getHref(java.lang.String id, long principal) throws com.funambol.framework.engine.source.SyncSourceException
id
- id of item to findprincipal
-
null
if item not foundcom.funambol.framework.engine.source.SyncSourceException
protected void toSyncNewItems(java.lang.String id, long crc, java.util.Date lastUpdate)
id
- crc
- lastUpdate
- protected void toSyncUpdateItems(java.lang.String id, long crc, java.util.Date lastUpdate)
id
- crc
- lastUpdate
- protected void toSyncRemoveItems(java.lang.String id)
id
- protected void toSyncErrorNewItems(java.lang.String id)
id
- protected void toSyncErrorUpdateItems(java.lang.String id)
id
- protected void toSyncErrorRemoveItems(java.lang.String id)
id
- protected void addToCacheSyncItems(com.funambol.framework.engine.SyncItem[] syncItems)
syncItems
- protected void addInExchangeItemsKeys(java.lang.String id)
id
- protected void removeInExchangeItemsKeys(java.lang.String id)
id
- protected com.funambol.framework.engine.SyncItem getSyncItemById(java.lang.String id)
id
- protected com.funambol.framework.engine.SyncItemKey[] getCacheSyncItemsKeys()
protected com.funambol.framework.engine.SyncItemKey[] getSyncItemKeysFromItems(Item[] items)
items
- protected java.util.ArrayList getSyncItemKeysArrayListFromItems(Item[] items)
items
- protected java.util.List getCachedSyncItems()
Gets the list of cached items to be used in the package's classes and the subclasses.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |