Geodatabase Sync Task
An object that represents a geodatabase sync task. Use this in conjunction with a feature service to synchronize offline data.
Since
200.1.0
Constructors
Create a geodatabase sync task object using a URL to create an ArcGISFeatureServiceInfo To ensure the service info can be loaded, you must call GeodatabaseSyncTask.featureServiceInfo and set any callbacks.
Types
Properties
The feature service info that represents the feature service to synchronize with. If this sync task was created from a URL, then ensure the ArcGISFeatureServiceInfo instance has callbacks set for requests.
Inherited properties
An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services.
Functions
Creates default parameters for a generate geodatabase. This will populate the parameters with values matching what the service supports. For example if the service does not support SyncModel.Layer then SyncModel.Geodatabase will be used All layers from the service will be included. The output spatial reference will be the spatial reference of the given extent. Attachments are included by default.
Creates default parameters for a sync geodatabase using the given sync direction if it is not null.
Returns a job that when started will generate a geodatabase from a service.
Returns a job to synchronize a geodatabase back to a service. For a successfully completed job the job's result returns an array of SyncLayerResult, typically the array is empty. If individual edits failed then the result array provides these errors grouped by each table using SyncLayerResult instances which in turn contain each edit error.
Returns a job to synchronize a geodatabase back to its service using the given sync direction and rollback on failure boolean value. If the given sync direction is not compatible with the sync task's feature service, the returned job will fail.
Registers a copy of a sync enabled geodatabase with a service to allow the copy to sync changes. This method is typically used as part of services pattern workflow, sometimes known as a pre-planned workflow. A sync enabled geodatabase is generated centrally and not modified or synced. Copies of this original geodatabase are distributed and loaded onto each user's device. The copy must first be registered with the service to allow the server to identify changes in subsequent sync operations. One of the main benefits of this workflow is a reduction in server load to generate geodatabases for many clients. It is important not to sync the copy before registering to ensure the server can maintain consistent state on each copy. This operation is not the opposite of GeodatabaseSyncTask.unregisterGeodatabase(Geodatabase) which is used to remove a geodatabase from the service prior to deletion.
Unregisters a geodatabase from a service removing the service's replica id. This overload uses the geodatabase's sync ID rather than a reference to the geodatabase itself. This method is used to unregister a geodatabase from a service using the sync ID. This is commonly used to enable cleanup of the service after the local geodatabase has already been deleted. See Geodatabase.syncId. After unregistering a geodatabase it can no longer be synced back to the service. This operation is not related to GeodatabaseSyncTask.registerSyncEnabledGeodatabase(Geodatabase), which is for registering copies of a sync enabled geodatabase.
Unregisters a geodatabase from a service removing the services replica id. After unregistering a geodatabase it can no longer be synced back to the service. This is often used prior to deleting a local geodatabase. This operation is not related to GeodatabaseSyncTask.registerSyncEnabledGeodatabase(Geodatabase), which is for registering copies of a sync enabled geodatabase.