Class OfflineMapSyncParameters

java.lang.Object
com.esri.arcgisruntime.tasks.offlinemap.OfflineMapSyncParameters

public final class OfflineMapSyncParameters extends Object
Represents the parameters that are used to create an OfflineMapSyncJob.
Since:
100.1.0
See Also:
  • Constructor Details

    • OfflineMapSyncParameters

      public OfflineMapSyncParameters()
      Constructs a new OfflineMapSyncParameters instance.
      Since:
      100.1.0
  • Method Details

    • isKeepGeodatabaseDeltas

      public boolean isKeepGeodatabaseDeltas()
      Indicates whether or not the uploaded or downloaded delta geodatabases should 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.
      Returns:
      indicates whether or not the upload or downloaded delta geodatabases should be removed at the end of the sync job
      Since:
      100.10.0
    • setKeepGeodatabaseDeltas

      public void setKeepGeodatabaseDeltas(boolean keepGeodatabaseDeltas)
      Sets whether or not the uploaded or downloaded delta geodatabases should 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 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.

      No geodatabase deltas will be retained if your geodatabase uses a scheduled updates workflow.

      Parameters:
      keepGeodatabaseDeltas - indicates whether or not the upload or downloaded delta geodatabases should be removed at the end of the sync job
      Since:
      100.10.0
    • getPreplannedScheduledUpdatesOption

      public PreplannedScheduledUpdatesOption getPreplannedScheduledUpdatesOption()
      Gets the PreplannedScheduledUpdatesOption that determines whether update packages will be downloaded from an online map area and applied to the map's data.
      Returns:
      the PreplannedScheduledUpdatesOption
      Since:
      100.6.0
    • setPreplannedScheduledUpdatesOption

      public void setPreplannedScheduledUpdatesOption(PreplannedScheduledUpdatesOption preplannedScheduledUpdatesOption)
      Sets the PreplannedScheduledUpdatesOption that determines whether update packages will be downloaded from an online map area and applied to the map's data.

      If your map was taken offline with a DownloadPreplannedOfflineMapParameters.getUpdateMode() of PreplannedUpdateMode.DOWNLOAD_SCHEDULED_UPDATES or PreplannedUpdateMode.DOWNLOAD_SCHEDULED_UPDATES_AND_UPLOAD_NEW_FEATURES then you can set this property to PreplannedScheduledUpdatesOption.DOWNLOAD_ALL_UPDATES to download and apply update packages to your offline geodatabases.

      The default value is PreplannedScheduledUpdatesOption.DOWNLOAD_ALL_UPDATES.

      Parameters:
      preplannedScheduledUpdatesOption - the PreplannedScheduledUpdatesOption to use
      Throws:
      IllegalArgumentException - if preplannedScheduledUpdatesOption is null
      Since:
      100.6.0
    • isRollbackOnFailure

      public boolean isRollbackOnFailure()
      Indicates if geodatabase synchronization should roll back on a failure.
      Returns:
      true if geodatabase synchronization should rollback on failure, false otherwise
      Since:
      100.1.0
      See Also:
    • setRollbackOnFailure

      public void setRollbackOnFailure(boolean rollbackOnFailure)
      Sets whether or not geodatabase synchronization should roll back on a failure. The default is false (no rollback on failure).
      Parameters:
      rollbackOnFailure - true to rollback on failure, false otherwise
      Since:
      100.1.0
    • getSyncDirection

      public SyncGeodatabaseParameters.SyncDirection getSyncDirection()
      Gets the geodatabase synchronization direction.
      Returns:
      the geodatabase synchronization direction
      Since:
      100.1.0
      See Also:
    • setSyncDirection

      public void setSyncDirection(SyncGeodatabaseParameters.SyncDirection syncDirection)
      Sets the synchronization direction for geodatabases registered with feature services. This method applies to any geodatabasees that are registered for feature services synchronization. It does not apply to geodatabases that use scheduled updates.

      The default value is SyncGeodatabaseParameters.SyncDirection.BIDIRECTIONAL.

      If you select SyncGeodatabaseParameters.SyncDirection.UPLOAD, any download-only geodatabases (e.g., for which FeatureServiceCapabilities.isSupportsUpdate() returns false)) will not be updated and you will receive a mappingSyncDirectionUploadNotSupported error. OfflineMapSyncResult.getLayerResults() returns a dictionary of key-value pairs, in which the value is of type OfflineMapSyncLayerResult; you can find the error by calling OfflineMapSyncLayerResult.getError().

      Parameters:
      syncDirection - the geodatabase synchronization direction
      Throws:
      IllegalArgumentException - if syncDirection is null
      Since:
      100.1.0