public class

SyncGeodatabaseParameters

extends TaskParameters
java.lang.Object
   ↳ com.esri.core.internal.tasks.TaskParameters
     ↳ com.esri.core.tasks.geodatabase.SyncGeodatabaseParameters

Class Overview

This class is used with the various synchronisation methods in GeodatabaseSyncTask to provide information on the synchronisation process. An instance of this class should be queried from getSyncParameters() and modified if required. The most likely change to be made is to set the sync direction for a geodatabase or for individual layers. If the SyncModel is GEODATABASE, the sync direction can be set for the geodatabase using setSyncDirection(SyncDirection). If the SyncModel is LAYER, the sync direction for individual layers can be set using setSyncLayers(LayerSyncInfos).

This class also allows serialization and de-serialization of the sync parameters. Any modified sync geodatabase parameters will not be stored in the geodatabase.

Summary

Public Methods
boolean equals(Object obj)
static SyncGeodatabaseParameters fromJson(JsonParser jsonParser)
Internal use only.
Map<String, String> generateRequestParams()
Generates the input parameter used by this class
String getGeodatabaseId()
Gets the geodatabase ID.
long getGeodatabaseServerGen()
Gets the geodatabase server generation number.
SyncDirection getSyncDirection()
Gets the sync direction.
LayerSyncInfos getSyncLayers()
Gets the per layer sync information when the SyncModel is LAYER.
SyncModel getSyncModel()
Gets the sync model.
String getUploadId()
Gets the upload ID.
int hashCode()
void setGeodatabaseId(String geodatabaseId)
Sets the geodatabase ID.
void setSyncDirection(SyncDirection syncDirection)
Determines whether to upload, download, or both upload and download on sync.
void setSyncLayers(LayerSyncInfos syncLayers)
Sets the per layer sync information when the SyncModel is LAYER.
void setUploadId(String uploadId)
Sets the upload ID.
String toJson(boolean forRegisterGeodatabase)
Internal use only.
String toString()
boolean validate()
[Expand]
Inherited Methods
From class com.esri.core.internal.tasks.TaskParameters
From class java.lang.Object

Public Methods

public boolean equals (Object obj)

Parameters
obj Object
Returns
boolean

public static SyncGeodatabaseParameters fromJson (JsonParser jsonParser)

Internal use only.

Parameters
jsonParser JsonParser
Returns
SyncGeodatabaseParameters
Throws
Exception

public Map<String, String> generateRequestParams ()

Generates the input parameter used by this class

Returns
Map<String, String> a Map containing the input parameters
Throws
Exception

public String getGeodatabaseId ()

Gets the geodatabase ID.

Returns
String the geodatabase ID

public long getGeodatabaseServerGen ()

Gets the geodatabase server generation number.

Returns
long the geodatabase server generation number

public SyncDirection getSyncDirection ()

Gets the sync direction.

Returns
SyncDirection the sync direction

public LayerSyncInfos getSyncLayers ()

Gets the per layer sync information when the SyncModel is LAYER.

Returns
LayerSyncInfos the per layer sync information

public SyncModel getSyncModel ()

Gets the sync model. This will be either GEODATABASE where all the layers are synced according to the sync direction of the geodatabase (setSyncDirection(SyncDirection)), or LAYER where each individual layer is synced according to the sync direction on each individual layer. The sync direction for an individual layer is controlled by the layer's LayerSyncInfo and these can be set for all the layers in a geodatabase using setSyncLayers(LayerSyncInfos).

Returns
SyncModel the sync model

public String getUploadId ()

Gets the upload ID.

Returns
String the upload ID

public int hashCode ()

Returns
int

public void setGeodatabaseId (String geodatabaseId)

Sets the geodatabase ID.

Parameters
geodatabaseId String: the new geodatabase ID

public void setSyncDirection (SyncDirection syncDirection)

Determines whether to upload, download, or both upload and download on sync. By default, a geodatabase is synchronized bi-directionally (both upload and download). This method is only applicable when the SyncModel is GEODATABASE. If the SyncModel is LAYER, the sync direction for each layer is specified in a LayerSyncInfo object and these can be set for all the layers in a geodatabase using setSyncLayers(LayerSyncInfos).

  • DOWNLOAD: the changes that have taken place on the server since the last download are returned. The client does not need to send any changes. If any changes are sent, the server will ignore them.
  • UPLOAD: the changes submitted by the client are applied, and no changes are downloaded from the server.
  • BIDIRECTIONAL: the changes submitted by the client are applied, and changes on the server are downloaded. This is the default value.

Parameters
syncDirection SyncDirection: the new sync direction

public void setSyncLayers (LayerSyncInfos syncLayers)

Sets the per layer sync information when the SyncModel is LAYER. The LayerSyncInfos passed to this method should have a LayerSyncInfo instance for each layer in the geodatabase. Any that are missing from this collection will default to BIDIRECTIONAL. If you want a layer to be ignored during sync, set the LayerSyncInfo sync direction to NONE.

Parameters
syncLayers LayerSyncInfos: the new sync layers

public void setUploadId (String uploadId)

Sets the upload ID.

Parameters
uploadId String: the new upload ID

public String toJson (boolean forRegisterGeodatabase)

Internal use only.

Parameters
forRegisterGeodatabase boolean
Returns
String
Throws
IOException

public String toString ()

Returns
String

public boolean validate ()

Returns
boolean