java.lang.Object | |
↳ | com.google.android.gms.drive.MetadataChangeSet.Builder |
A builder for creating a new MetadataChangeSet.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Deletes the given custom property of the resource.
| |||||||||||
Sets a Custom File Property for the resource.
| |||||||||||
Sets the description for the resource.
| |||||||||||
Sets the text to be indexed for the resource.
| |||||||||||
Sets the date when the user most recently viewed the resource.
| |||||||||||
Sets a MIME type for the resource.
| |||||||||||
If true, the file's contents will be kept up to date locally and thus the contents will be
available when the device is offline.
| |||||||||||
Sets whether the resource will be starred.
| |||||||||||
Sets the title for the resource.
| |||||||||||
This method is deprecated.
Use
setViewed() instead.
| |||||||||||
Sets the resource to viewed.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Deletes the given custom property of the resource.
Note that the user must have edit access to delete a custom property (see isEditable()
).
Parameters | |
---|---|
key |
CustomPropertyKey |
Returns | |
---|---|
MetadataChangeSet.Builder |
Sets a Custom File Property for the resource. The provided value
may not be null.
Note that the total size of the key string and the value string of a custom property
should not exceed CUSTOM_PROPERTY_SIZE_LIMIT_BYTES
bytes in UTF-8 encoding. As the
default charset on Android is UTF-8, the byte length of a string in UTF-8 encoding can be
calculated simply by using stringObject.getBytes().length (See
http://developer.android.com/reference/java/lang/String.html#getBytes()) Also, note that
there are limits on the number of custom properties a resource can have. See MAX_PUBLIC_PROPERTIES_PER_RESOURCE
, MAX_PRIVATE_PROPERTIES_PER_RESOURCE_PER_APP
and MAX_TOTAL_PROPERTIES_PER_RESOURCE
for details. If these limits are exceeded, the
operation to apply this metadata change will fail.
Note that the user must have edit access to set a custom property (see isEditable()
).
Parameters | |
---|---|
key |
CustomPropertyKey |
value |
String |
Returns | |
---|---|
MetadataChangeSet.Builder |
Sets the description for the resource.
Note that the user must have edit access to set the description (see isEditable()
).
Parameters | |
---|---|
description |
String |
Returns | |
---|---|
MetadataChangeSet.Builder |
Sets the text to be indexed for the resource.
Note that the user must have edit access to set the indexable text (see isEditable()
).
Parameters | |
---|---|
text |
String |
Returns | |
---|---|
MetadataChangeSet.Builder |
Sets the date when the user most recently viewed the resource.
Parameters | |
---|---|
date |
Date |
Returns | |
---|---|
MetadataChangeSet.Builder |
Sets a MIME type for the resource.
Note that the user must have edit access to set the MIME type (see isEditable()
).
Parameters | |
---|---|
mimeType |
String |
Returns | |
---|---|
MetadataChangeSet.Builder |
If true, the file's contents will be kept up to date locally and thus the contents will be available when the device is offline. Pinning a file uses bandwidth and storage space, so it should only be done in response to an explicit user request.
Note that only files where isPinnable()
is
true can be pinned.
Parameters | |
---|---|
pinned |
boolean |
Returns | |
---|---|
MetadataChangeSet.Builder |
Sets whether the resource will be starred.
Parameters | |
---|---|
starred |
boolean |
Returns | |
---|---|
MetadataChangeSet.Builder |
Sets the title for the resource.
Note that the user must have edit access to set the title (see isEditable()
).
Parameters | |
---|---|
title |
String |
Returns | |
---|---|
MetadataChangeSet.Builder |
This method is deprecated.
Use setViewed()
instead.
Sets the resource to viewed.
Note that setting viewed to false after it has been set to true is not allowed.
Parameters | |
---|---|
viewed |
boolean |
Returns | |
---|---|
MetadataChangeSet.Builder |
Sets the resource to viewed.
Returns | |
---|---|
MetadataChangeSet.Builder |