|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.syncclient.spds.engine.recovery.AbstractRecovery
public abstract class AbstractRecovery
This class defines recovery method to manage recovery database in slowsync status. From server reads those parameters:
<recovery-details> <source-list>value</source-list> <last>value</last> <uri>value</uri> </recovery-details>
Field Summary | |
---|---|
protected java.lang.String |
last
|
protected java.lang.String |
sourceList
|
protected java.lang.String |
uri
|
Constructor Summary | |
---|---|
AbstractRecovery()
|
Method Summary | |
---|---|
void |
beginSync(int syncMode)
Method implements start sync operations |
void |
commitSync()
Method implements end sync operations |
SyncItem[] |
getAllSyncItems(java.security.Principal principal)
Returns all items in the data store belonging to the given principal. |
SyncItem[] |
getDeletedSyncItems(java.security.Principal principal,
java.util.Date since)
Returns all deleted items belonging to the given principal and deleted after the given point in time. |
java.lang.String |
getLast()
Getter for property last. |
SyncItem[] |
getNewSyncItems(java.security.Principal principal,
java.util.Date since)
Returns all new items belonging to the given principal and created after the given point in time. |
java.lang.String |
getSourceList()
Getter for property sourceList. |
SyncItem[] |
getUpdatedSyncItems(java.security.Principal principal,
java.util.Date since)
Returns all updated items belonging to the given principal and modified after the given point in time. |
java.lang.String |
getUri()
Getter for property uri. |
abstract void |
recovery(java.security.Principal p)
This method manage recovery database in slowsync status |
void |
removeSyncItem(java.security.Principal principal,
SyncItem syncItem)
Removes a SyncItem given its key. |
void |
setLast(java.lang.String last)
Setter for property last. |
void |
setSourceList(java.lang.String sourceList)
Setter for property sourceList. |
SyncItem |
setSyncItem(java.security.Principal principal,
SyncItem syncItem)
Replaces an existing SyncItem or adds a new SyncItem if it does not exist. |
void |
setUri(java.lang.String uri)
Setter for property uri. |
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 |
---|
getName, getSourceURI, getType |
Field Detail |
---|
protected java.lang.String sourceList
protected java.lang.String last
protected java.lang.String uri
Constructor Detail |
---|
public AbstractRecovery()
Method Detail |
---|
public java.lang.String getSourceList()
public void setSourceList(java.lang.String sourceList)
sourceList
- New value of property sourceList.public java.lang.String getLast()
public void setLast(java.lang.String last)
last
- New value of property last.public java.lang.String getUri()
public void setUri(java.lang.String uri)
uri
- New value of property uri.public abstract void recovery(java.security.Principal p)
p
- Principalpublic SyncItem[] getAllSyncItems(java.security.Principal principal) throws SyncException
getAllSyncItems
in interface SyncSource
principal
- the principal for which the data has to be considered
Null means all principals
SyncException
- in case of error (for instance if the
underlying data store runs into problems)public SyncItem[] getDeletedSyncItems(java.security.Principal principal, java.util.Date since) throws SyncException
getDeletedSyncItems
in interface SyncSource
principal
- the principal for which the data has to be considered
Null means all principalssince
- consider the changes since this point in time. Null means
all items regardless when they were changed.
SyncException
- in case of error (for instance if the
underlying data store runs into problems)public SyncItem[] getNewSyncItems(java.security.Principal principal, java.util.Date since) throws SyncException
getNewSyncItems
in interface SyncSource
principal
- the principal for which the data has to be considered
Null means all principalssince
- consider the changes since this point in . Null means
all items regardless when they were changed.
SyncException
- in case of error (for instance if the
underlying data store runs into problems)public SyncItem[] getUpdatedSyncItems(java.security.Principal principal, java.util.Date since) throws SyncException
getUpdatedSyncItems
in interface SyncSource
principal
- the principal for which the data has to be considered
Null means all principalssince
- consider the changes since this point in time. Null means
all items regardless when they were changed.
SyncException
public void removeSyncItem(java.security.Principal principal, SyncItem syncItem) throws SyncException
removeSyncItem
in interface SyncSource
principal
- the entity that wants to do the operationsyncItem
- the item to remove
SyncException
- in case of error (for instance if the
underlying data store runs into problems)public void beginSync(int syncMode) throws SyncException
beginSync
in interface SyncSource
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 commitSync() throws SyncException
commitSync
in interface SyncSource
SyncException
public SyncItem setSyncItem(java.security.Principal principal, SyncItem syncItem) throws SyncException
setSyncItem
in interface SyncSource
principal
- not used, always nullsyncItem
- the item to replace/add
SyncException
- in case of error (for instance if the
underlying data store runs into problems)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |