|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.syncclient.spds.source.DummySyncSource
public class DummySyncSource
This class implements a dummy SyncSource that just displays the calls to its methods
Constructor Summary | |
---|---|
DummySyncSource()
Creates a new instance of AbstractSyncSource |
Method Summary | |
---|---|
void |
beginSync()
|
void |
beginSync(int type)
Called after SyncManager preparation and initialization just before start the synchronization of the SyncSource. |
void |
commitSync()
Called just before committing the synchronization process by the SyncManager. |
void |
endSync()
|
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 |
getName()
Returns the name of the source |
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 |
getSourceURI()
Getter for property uri. |
java.lang.String |
getType()
Returns the type of the source. |
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. |
void |
removeSyncItem(java.security.Principal principal,
SyncItem syncItem)
Removes a SyncItem given its key. |
void |
setName(java.lang.String name)
|
void |
setParam1(java.lang.String value)
Some other initialization parameter |
void |
setSourceURI(java.lang.String sourceURI)
Setter for property uri. |
SyncItem |
setSyncItem(java.security.Principal principal,
SyncItem syncItem)
Replaces an existing SyncItem or adds a new SyncItem if it does not exist. |
void |
setType(java.lang.String type)
|
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DummySyncSource()
Method Detail |
---|
public java.lang.String getName()
SyncSource
getName
in interface SyncSource
public void setName(java.lang.String name)
public java.lang.String getType()
SyncSource
getType
in interface SyncSource
public void setType(java.lang.String type)
public java.lang.String getSourceURI()
getSourceURI
in interface SyncSource
public void setSourceURI(java.lang.String sourceURI)
sourceURI
- New value of property uri.public void setParam1(java.lang.String value)
public java.lang.String toString()
toString
in class java.lang.Object
public void beginSync(int type) throws SyncException
SyncSource
beginSync
in interface SyncSource
type
- the synchronization type: one of the values in
sync4j.framework.core.AlertCode
SyncException
- in case of error. This will stop the sync processpublic void endSync() throws SyncException
SyncException
public SyncItem[] getAllSyncItems(java.security.Principal principal) throws SyncException
SyncSource
getAllSyncItems
in interface SyncSource
principal
- not used, always null
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
SyncSource
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
SyncSource
getNewSyncItems
in interface SyncSource
principal
- not used, always nullsince
- 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
SyncSource
getUpdatedSyncItems
in interface SyncSource
principal
- not used, always nullsince
- 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
SyncSource
removeSyncItem
in interface SyncSource
principal
- not used, always nullsyncItem
- the item to remove
SyncException
- in case of error (for instance if the
underlying data store runs into problems)public SyncItem setSyncItem(java.security.Principal principal, SyncItem syncItem) throws SyncException
SyncSource
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)public void beginSync()
public void commitSync()
SyncSource
commitSync
in interface SyncSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |