|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.syncclient.spap.AssetSyncSource
public class AssetSyncSource
This class implements a SyncSource that handle the Asset
store on a device.
Retrieves the list of the Assets and their state using the AssetDAO
that manages the memorization of the Assets using the Device Management
as database.
This SyncSource maps a Asset into properties of the corresponding SyncItem.
A asset has transformed in XML using the
com.funambol.syncclient.framework.provisioning.XMLHashMapParser
class and the xml as gotten is store in the property SyncItem.PROPERTY_BINARY_CONTENT.
Constructor Summary | |
---|---|
AssetSyncSource()
Constructs a AssetSyncSource |
Method Summary | |
---|---|
void |
beginSync()
|
void |
beginSync(int syncMode)
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. |
SyncItem[] |
getAllSyncItems(java.security.Principal principal)
Returns a list of the assets except those with state 'D' |
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 property name |
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()
Returns property sourceURI |
java.lang.String |
getType()
Returns property type |
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 Asset given its key. |
void |
setName(java.lang.String name)
Sets property name |
void |
setSourceURI(java.lang.String sourceURI)
Sets property sourceURI |
SyncItem |
setSyncItem(java.security.Principal principal,
SyncItem syncItem)
Replaces an existing Asset or adds a new Asset if it does not exist. |
void |
setType(java.lang.String type)
Sets property type |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssetSyncSource()
Method Detail |
---|
public void setSourceURI(java.lang.String sourceURI)
sourceURI
- description: uri of the SyncSource
displayName: sourceURIpublic java.lang.String getSourceURI()
getSourceURI
in interface SyncSource
public void setType(java.lang.String type)
type
- description: type of the SyncSource
displayName: typepublic java.lang.String getType()
getType
in interface SyncSource
public void setName(java.lang.String name)
name
- description: name of the SyncSource
displayName: namepublic java.lang.String getName()
getName
in interface SyncSource
public SyncItem[] getAllSyncItems(java.security.Principal principal)
getAllSyncItems
in interface SyncSource
principal
- the principal for which the data has to be considered.
public SyncItem[] getDeletedSyncItems(java.security.Principal principal, java.util.Date since)
SyncSource
getDeletedSyncItems
in interface SyncSource
principal
- since
-
public SyncItem[] getNewSyncItems(java.security.Principal principal, java.util.Date since)
SyncSource
getNewSyncItems
in interface SyncSource
principal
- since
-
public SyncItem[] getUpdatedSyncItems(java.security.Principal principal, java.util.Date since)
SyncSource
getUpdatedSyncItems
in interface SyncSource
principal
- since
-
public SyncItem setSyncItem(java.security.Principal principal, SyncItem syncItem) throws SyncException
setSyncItem
in interface SyncSource
principal
- syncItem
-
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 errorpublic void beginSync(int syncMode)
SyncSource
beginSync
in interface SyncSource
syncMode
- the synchronization type: one of the values in
sync4j.framework.core.AlertCodepublic 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 |