Snapshots.OpenSnapshotResult

public static interface Snapshots.OpenSnapshotResult implements Result

This interface was deprecated.
SnapshotsClient.DataOrConflict is returned instead in the SnapshotsClient.

Result delivered when a snapshot has been opened.

Possible status codes include:

Public Method Summary

abstract String
getConflictId()
Retrieves the ID of the conflict to resolve, if any.
abstract Snapshot
getConflictingSnapshot()
Retrieves the modified version of this snapshot in the case of a conflict.
abstract SnapshotContents
getResolutionSnapshotContents()
Retrieve the SnapshotContents object used to update the data in case of a conflict.
abstract Snapshot
getSnapshot()
Retrieves the snapshot that was opened.

Inherited Method Summary

Public Methods

public abstract String getConflictId ()

Retrieves the ID of the conflict to resolve, if any. Pass this to resolveConflict(GoogleApiClient, String, Snapshot) when resolving the conflict. Will return null if the status of this operation is not STATUS_SNAPSHOT_CONFLICT.

Returns
  • The ID of the conflict to resolve, or null if there was no conflict.

public abstract Snapshot getConflictingSnapshot ()

Retrieves the modified version of this snapshot in the case of a conflict. This version may differ from the values returned in getSnapshot(), and may need to be merged. Will return null if the status of this operation is not STATUS_SNAPSHOT_CONFLICT.

Returns
  • The modified snapshot data, or null if there was no conflict.

public abstract SnapshotContents getResolutionSnapshotContents ()

Retrieve the SnapshotContents object used to update the data in case of a conflict. Pass this to resolveConflict(GoogleApiClient, String, String, SnapshotMetadataChange, SnapshotContents) to resolve this conflict.

Will return null if the status of this operation is not STATUS_SNAPSHOT_CONFLICT.

Returns
  • A SnapshotContents object to use to write resolved snapshot data, or null if there was no conflict.

public abstract Snapshot getSnapshot ()

Retrieves the snapshot that was opened. This is always the device's most up-to-date view of the snapshot data. If getStatus() is STATUS_SNAPSHOT_CONFLICT, the return value here represents the state of the snapshot on the server.

Returns
  • The snapshot that was opened, if any. This will be null if the open operation did not succeed.