java.lang.Object
com.amilesend.onedrive.resource.item.BaseItem
com.amilesend.onedrive.resource.drive.Drive

public class Drive extends BaseItem
Top-level object that represents a user's OneDrive or SharePoint document library.

API Documentation.

  • Field Details

  • Method Details

    • getActivities

      public List<ItemActivity> getActivities()
      Queries and fetches the activities associated with this Drive.

      API Documentation.

      Returns:
      the list of activities
    • getRootFolder

      public DriveItem getRootFolder()
      Fetches the root folder associated with this Drive.

      API Documentation.

      Returns:
      the root folder drive item
    • getChanges

      public List<DriveItem> getChanges()
      Fetches the list of changes associated with this Drive.

      API Documentation.

      Returns:
      the list of drive item changes
    • search

      public List<DriveItem> search(String query)
      Search for items associated with this Drive.

      API Documentation.

      Parameters:
      query - the search query
      Returns:
      the list of drive items associated with the query
    • getSpecialFolder

      public SpecialDriveItem getSpecialFolder(SpecialFolder.Type type)
      Retrieves a special folder for the given SpecialFolder.Type.
      Parameters:
      type - the special folder type
      Returns:
      the special folder drive item
      See Also:
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class BaseItem
    • builder

      public static Drive.DriveBuilder<?,?> builder()
    • getDriveType

      public String getDriveType()
      The drive type descriptor. Valid types are:
      • personal - Personal drive
      • business - Business drive
      • documentLibrary - Sharepoint document library
    • getOwner

      public IdentitySet getOwner()
      The user account that owns the drive.
    • getQuota

      public Quota getQuota()
      Drive storage space quota information.
    • getSharepointIds

      public SharePointIds getSharepointIds()
      Identifiers used for SharePoint.
    • getSystem

      public Object getSystem()
      Indicates that this is a system-managed drive: Note: Either null or defined as empty.
    • getConnection

      public OneDriveConnection getConnection()
    • toString

      public String toString()
      Overrides:
      toString in class BaseItem