public static class FileMetadata.Builder extends Metadata.Builder
FileMetadata
.Modifier and Type | Field and Description |
---|---|
protected Date |
clientModified |
protected Boolean |
hasExplicitSharedMembers |
protected String |
id |
protected MediaInfo |
mediaInfo |
protected List<PropertyGroup> |
propertyGroups |
protected String |
rev |
protected Date |
serverModified |
protected FileSharingInfo |
sharingInfo |
protected long |
size |
name, parentSharedFolderId, pathDisplay, pathLower
Modifier | Constructor and Description |
---|---|
protected |
Builder(String name,
String id,
Date clientModified,
Date serverModified,
String rev,
long size) |
Modifier and Type | Method and Description |
---|---|
FileMetadata |
build()
Builds an instance of
FileMetadata configured with this
builder's values |
FileMetadata.Builder |
withHasExplicitSharedMembers(Boolean hasExplicitSharedMembers)
Set value for optional field.
|
FileMetadata.Builder |
withMediaInfo(MediaInfo mediaInfo)
Set value for optional field.
|
FileMetadata.Builder |
withParentSharedFolderId(String parentSharedFolderId)
Set value for optional field.
|
FileMetadata.Builder |
withPathDisplay(String pathDisplay)
Set value for optional field.
|
FileMetadata.Builder |
withPathLower(String pathLower)
Set value for optional field.
|
FileMetadata.Builder |
withPropertyGroups(List<PropertyGroup> propertyGroups)
Set value for optional field.
|
FileMetadata.Builder |
withSharingInfo(FileSharingInfo sharingInfo)
Set value for optional field.
|
protected final String id
protected final Date clientModified
protected final Date serverModified
protected final String rev
protected final long size
protected MediaInfo mediaInfo
protected FileSharingInfo sharingInfo
protected List<PropertyGroup> propertyGroups
protected Boolean hasExplicitSharedMembers
public FileMetadata.Builder withMediaInfo(MediaInfo mediaInfo)
mediaInfo
- Additional information if the file is a photo or
video.public FileMetadata.Builder withSharingInfo(FileSharingInfo sharingInfo)
sharingInfo
- Set if this file is contained in a shared folder.public FileMetadata.Builder withPropertyGroups(List<PropertyGroup> propertyGroups)
propertyGroups
- Additional information if the file has custom
properties with the property template specified. Must not contain
a null
item.IllegalArgumentException
- If any argument does not meet its
preconditions.public FileMetadata.Builder withHasExplicitSharedMembers(Boolean hasExplicitSharedMembers)
hasExplicitSharedMembers
- This flag will only be present if
include_has_explicit_shared_members is true in DbxUserFilesRequests.listFolder(String)
or DbxUserFilesRequests.getMetadata(String)
. If this flag is
present, it will be true if this file has any explicit shared
members. This is different from sharing_info in that this could
be true in the case where a file has explicit members but is not
contained within a shared folder.public FileMetadata.Builder withPathLower(String pathLower)
withPathLower
in class Metadata.Builder
pathLower
- The lowercased full path in the user's Dropbox.
This always starts with a slash. This field will be null if the
file or folder is not mounted.public FileMetadata.Builder withPathDisplay(String pathDisplay)
withPathDisplay
in class Metadata.Builder
pathDisplay
- The cased path to be used for display purposes
only. In rare instances the casing will not correctly match the
user's filesystem, but this behavior will match the path provided
in the Core API v1. Changes to the casing of paths won't be
returned by DbxUserFilesRequests.listFolderContinue(String)
. This field will
be null if the file or folder is not mounted.public FileMetadata.Builder withParentSharedFolderId(String parentSharedFolderId)
withParentSharedFolderId
in class Metadata.Builder
parentSharedFolderId
- Deprecated. Please use FileSharingInfo.getParentSharedFolderId()
or FolderSharingInfo.getParentSharedFolderId()
instead. Must match
pattern "[-_0-9a-zA-Z:]+
".IllegalArgumentException
- If any argument does not meet its
preconditions.public FileMetadata build()
FileMetadata
configured with this
builder's valuesbuild
in class Metadata.Builder
FileMetadata