Class SyncGeodatabaseParameters

java.lang.Object
com.esri.arcgisruntime.tasks.geodatabase.SyncGeodatabaseParameters

public final class SyncGeodatabaseParameters extends Object
Represents parameters that are used with GeodatabaseSyncTask.syncGeodatabase(SyncGeodatabaseParameters, Geodatabase) to synchronize geodatabases.

Consider using the convenience method GeodatabaseSyncTask.createDefaultSyncGeodatabaseParametersAsync(Geodatabase) to get a properly initialized instance of this class with appropriate default values which take into account the capabilities supported by the ArcGIS feature service and the data it contains.

Since:
100.0.0
See Also:
  • Constructor Details

    • SyncGeodatabaseParameters

      public SyncGeodatabaseParameters()
      Constructs a new SyncGeodatabaseParameters instance. Use this constructor if you are setting all of its properties yourself. Consider using the convenience method GeodatabaseSyncTask.createDefaultSyncGeodatabaseParametersAsync(Geodatabase) rather than this constructor to get an initialized instance of this class with properties already set which take into account the capabilities supported by the ArcGIS feature service.
      Since:
      100.0.0
  • Method Details

    • getLayerOptions

      public List<SyncLayerOption> getLayerOptions()
      Gets a mutable list of SyncLayerOption objects which specify how to synchronize features on a layer-by-layer basis. If not previously set, this method will return an empty list to which you can add SyncLayerOption objects.

      Note, these layer options are only applicable to geodatabases using the sync model of SyncModel.PER_LAYER.

      Returns:
      the list of SyncLayerOption objects
      Since:
      100.0.0
    • isRollbackOnFailure

      public boolean isRollbackOnFailure()
      Gets the value of the rollbackOnFailure flag. This determines the behavior when there are failures while importing edits on the server during synchronization. It only applies in cases where clients are uploading edits to the server.
      Returns:
      true if all edits are rolled back (not applied) if a failure occurs while importing edits on the server; false if failed edits are skipped and other edits still applied
      Since:
      100.0.0
    • setRollbackOnFailure

      public void setRollbackOnFailure(boolean rollbackOnFailure)
      Sets the value of the rollbackOnFailure flag. This determines the behavior when there are failures while importing edits on the server during synchronization. It only applies in cases where clients are uploading edits to the server. The default value is false.
      Parameters:
      rollbackOnFailure - true if all edits are rolled back (not applied) if a failure occurs while importing edits on the server; false if failed edits are skipped and other edits still applied
      Since:
      100.0.0
    • getSyncDirection

      public SyncGeodatabaseParameters.SyncDirection getSyncDirection()
      Gets the geodatabase synchronization direction. This is used only if the Geodatabase has a sync model of SyncModel.PER_GEODATABASE, it is ignored for SyncModel.PER_LAYER.
      Returns:
      the geodatabase synchronization direction
      Since:
      100.0.0
      See Also:
    • setSyncDirection

      public void setSyncDirection(SyncGeodatabaseParameters.SyncDirection syncDirection)
      Sets the geodatabase synchronization direction. This is used only if the Geodatabase has a sync model of SyncModel.PER_GEODATABASE, it is ignored for SyncModel.PER_LAYER. The default value is SyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL.
      Parameters:
      syncDirection - the geodatabase synchronization direction
      Throws:
      IllegalArgumentException - if syncDirection is null
      Since:
      100.0.0
      See Also:
    • isKeepGeodatabaseDeltas

      public boolean isKeepGeodatabaseDeltas()
      Indicates whether or not the uploaded or downloaded server delta geodatabases will be removed at the end of the sync job.

      A delta geodatabase is a file that contains the changes that have occurred since a mobile replica Geodatabase was last synchronized with its feature service. See Synchronize Replica for an overview of the delta files used in synchronization. There are two types of delta geodatabase:

      • Local edits, performed on the user's device, are exported as an "upload" delta that is applied to the originating feature service.
      • Online edits, performed by other users, are requested as a "download" delta which is then applied to the local replica geodatabase.
      Delta geodatabases allow you to troubleshoot sync problems. For example, you can inspect the geodatabase changes or you could send the file to the administrator of the feature service.

      You can choose to retain both the uploaded and downloaded delta geodatabases once the sync job has completed. Set to true to retain both delta geodatabases and set to false to have them deleted at the end of the sync job. Deltas will be retained regardless of whether the job succeeds or fails. Note that when this property is set to true, the upload delta geodatabase will only be available if there are changes to upload and the sync direction is SyncGeodatabaseParameters.SyncDirection.UPLOAD or SyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL. The download delta geodatabase will only be available when there are changes to download and the sync direction is SyncGeodatabaseParameters.SyncDirection.DOWNLOAD or SyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL. The default value is false.

      Returns:
      indicates whether or not the upload or downloaded server delta geodatabases will be removed at the end of the sync job
      Since:
      100.10.0
      See Also:
    • setKeepGeodatabaseDeltas

      public void setKeepGeodatabaseDeltas(boolean keepGeodatabaseDeltas)
      Sets whether or not the uploaded or downloaded server delta geodatabases will be removed at the end of the sync job.

      A delta geodatabase is a file that contains the changes that have occurred since a mobile replica Geodatabase was last synchronized with its feature service. See https://developers.arcgis.com/rest/services-reference/synchronize-replica.htm for an overview of the delta files used in synchronization. There are two types of delta geodatabase:

      • Local edits, performed on the user's device, are exported as an "upload" delta delta that is applied to the originating feature service.
      • Online edits, performed by other users are requested as a "download" delta which is then applied to the local replica geodatabase.
      Delta geodatabases allow you to troubleshoot sync problems. For example, you can inspect the geodatabase changes or you could send the file to the administrator of the feature service.

      You can choose to retain both the uploaded and downloaded delta geodatabases once the sync job has completed. Set to true to retain both delta geodatabases and set to false to have them deleted at the end of the sync job. Deltas will be retained regardless of whether the job succeeds or fails. Note that when this property is set to true, the upload delta geodatabase will only be available if there are changes to upload and the sync direction is SyncGeodatabaseParameters.SyncDirection.UPLOAD or SyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL. The download delta geodatabase will only be available when there are changes to download and the sync direction is SyncGeodatabaseParameters.SyncDirection.DOWNLOAD or SyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL. The default value is false.

      Parameters:
      keepGeodatabaseDeltas - indicates whether or not the upload or downloaded server delta geodatabases will be removed at the end of the sync job
      Since:
      100.10.0
      See Also: