Package com.amilesend.onedrive.resource
Class DriveItemType
java.lang.Object
com.amilesend.onedrive.resource.DriveItemType
- Direct Known Subclasses:
DriveFile
,DriveItemFolderType
Defines the base class that wraps a
DriveItem
for direct access by
consumers of this SDK.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPermission
(AddPermissionRequest request) Adds a permission for the given request.copy
(@NonNull DriveFolder destinationFolder, String newName) Copies this drive item type to the specifiedDriveFolder
along with the new file name.copy
(DriveFolder destinationFolder) Copies this drive item type to the specifiedDriveFolder
.Copies this drive item type to the specifiednewName
within the same folder.Copies this drive item type to the specifiednewParentId
(i.e., represents a new DriveFolder's ID) along with the new file name.Creates a sharing link for the given request.void
delete()
Mark this drive item type for deletion.boolean
Gets the list of activities associated with this drive item.Gets the identity set that indicates who created this drive item.Gets the timestamp (formatted as a string) that indicates when this drive item was created.getETag()
Gets the eTag associated with this item.Gets the local file system information associated with this drive item.getId()
Gets the drive item identifier.Gets the identity set that indicates who made the last modification to this drive item.Gets the timestamp (formatted as a string) that indicates when this drive item was modified.getName()
Gets the name of this drive item.Gets the package information associated with this drive item.Gets the parent reference of this drive item.Gets the list of permissions associated with this drive item.Gets the remote item information.Gets the list thumbnails associated with this drive item.Gets the list of versions for this drive item.int
hashCode()
boolean
Describes if this drive item has been marked for deletion.boolean
isFile()
Describes if this is a file.boolean
isFolder()
Describes if this is a folder.boolean
Describes if this is a package.boolean
isRemote()
Describes if this drive item represents a remote item from another drive.void
setFileSystemInfo
(@NonNull FileSystemInfo fileSystemInfo) Sets the local file system information associated with this drive item.
-
Constructor Details
-
DriveItemType
-
-
Method Details
-
getCreatedBy
Gets the identity set that indicates who created this drive item.- Returns:
- the identity set
- See Also:
-
getCreatedDateTime
Gets the timestamp (formatted as a string) that indicates when this drive item was created.- Returns:
- the timestamp
-
getETag
Gets the eTag associated with this item.- Returns:
- the etag
-
getId
Gets the drive item identifier.- Returns:
- the drive item identifier
-
getLastModifiedBy
Gets the identity set that indicates who made the last modification to this drive item.- Returns:
- the identity set
- See Also:
-
getLastModifiedDateTime
Gets the timestamp (formatted as a string) that indicates when this drive item was modified.- Returns:
- the timestamp
-
getName
Gets the name of this drive item.- Returns:
- the name
-
getParentReference
Gets the parent reference of this drive item.- Returns:
- the parent reference
- See Also:
-
isDeleted
public boolean isDeleted()Describes if this drive item has been marked for deletion.- Returns:
true
if marked for deletion; else,false
-
isRemote
public boolean isRemote()Describes if this drive item represents a remote item from another drive.- Returns:
true
if this item is a remote item; else,false
-
getRemoteItem
Gets the remote item information. Can benull
.- Returns:
- the remote item information
-
getActivities
Gets the list of activities associated with this drive item.- Returns:
- the list of activities
- See Also:
-
getPermissions
Gets the list of permissions associated with this drive item.- Returns:
- the list of permissions
- See Also:
-
getThumbnails
Gets the list thumbnails associated with this drive item.- Returns:
- the list of thumbnail sets
- See Also:
-
getVersions
Gets the list of versions for this drive item.- Returns:
- the list of versions
- See Also:
-
isFolder
public boolean isFolder()Describes if this is a folder.- Returns:
true
if this item is a folder; else,false
-
isFile
public boolean isFile()Describes if this is a file.- Returns:
true
if this item is a file; else,false
-
getFileSystemInfo
Gets the local file system information associated with this drive item.- Returns:
- the file system information
- See Also:
-
setFileSystemInfo
Sets the local file system information associated with this drive item.- Parameters:
fileSystemInfo
- the file system information- See Also:
-
isPackage
public boolean isPackage()Describes if this is a package.- Returns:
true
if this item is a package; else,false
-
getPackage
Gets the package information associated with this drive item.- Returns:
- the package information
-
addPermission
Adds a permission for the given request.- Parameters:
request
- containing the recipients and roles to add- Returns:
- the list of permissions
- See Also:
-
createSharingLink
Creates a sharing link for the given request.- Parameters:
request
- the descriptor of the type of link to share- Returns:
- the sharing permissions that includes the link
-
copy
Copies this drive item type to the specifiedDriveFolder
.- Parameters:
destinationFolder
- the destination drive folder- Returns:
- the
AsyncJob
that can be used to poll for the remote asynchronous operation progress.
-
copy
Copies this drive item type to the specifiedDriveFolder
along with the new file name.- Parameters:
destinationFolder
- the destination drive foldernewName
- the new name of the file- Returns:
- the
AsyncJob
that can be used to poll for the remote asynchronous operation progress.
-
copy
Copies this drive item type to the specifiednewName
within the same folder.- Parameters:
newName
- the new name of the file- Returns:
- the
AsyncJob
that can be used to poll for the remote asynchronous operation progress.
-
copy
Copies this drive item type to the specifiednewParentId
(i.e., represents a new DriveFolder's ID) along with the new file name.- Parameters:
destinationParentId
- the destination parent identifiernewName
- the new name of the file- Returns:
- the
AsyncJob
that can be used to poll for the remote asynchronous operation progress.
-
delete
public void delete()Mark this drive item type for deletion. This item will be accessible via the drive's recycle bin. -
equals
-
hashCode
public int hashCode()
-