Class DriveItemVersion

java.lang.Object
com.amilesend.onedrive.resource.item.DriveItemVersion

public class DriveItemVersion extends Object
Represents a specific version of a drive item.

API Documentation.

See Also:
  • Method Details

    • download

      public void download(Path folderPath)
      Downloads a specific drive item version.

      API Documentation.

      Parameters:
      folderPath - the path of the folder to download the drive item version content to
    • download

      public void download(@NonNull Path folderPath, @NonNull com.amilesend.client.connection.file.TransferProgressCallback callback)
      Downloads a specific drive item version and reports transfer progress to the specified TransferProgressCallback.

      API Documentation.

      Parameters:
      folderPath - the path of the folder to download the drive item version content to
      callback - the callback be notified of transfer progress
    • downloadAsync

      public DriveFileDownloadExecution downloadAsync(Path folderPath)
      Downloads a specific drive item version asynchronously.
      Parameters:
      folderPath - the folder to download the file to
      Returns:
      the asynchronous execution that contains the number of bytes downloaded
      See Also:
    • downloadAsync

      public DriveFileDownloadExecution downloadAsync(@NonNull Path folderPath, @NonNull com.amilesend.client.connection.file.TransferProgressCallback callback)
      Downloads a specific drive item version asynchronously and reports transfer progress to the specified TransferProgressCallback. Consumers can block on transfer completion by invoking DriveFileDownloadExecution.get().
      Parameters:
      folderPath - the folder to download the file to
      callback - the callback be notified of transfer progress
      Returns:
      the asynchronous execution that contains the number of bytes downloaded
      See Also:
    • restore

      public boolean restore()
      Restores this version as the primary drive item version.

      API Documentation.

      Returns:
      true if successful; else, false
    • builder

    • getId

      public String getId()
      The version identifier.
    • getLastModifiedBy

      public IdentitySet getLastModifiedBy()
      The identity of whom last modified the version.
    • getLastModifiedDateTime

      public String getLastModifiedDateTime()
      The date and time of when the version was last modified.
    • getPublication

      public PublicationFacet getPublication()
      Describes the published status of the version.
    • getSize

      public long getSize()
      The size in bytes of the version.
    • getName

      public String getName()
      The name of the item associated with the version.
    • getDriveItemId

      public String getDriveItemId()
      The associated item identifier for the version.
    • getConnection

      public OneDriveConnection getConnection()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object