public static class FileMetadata.Builder extends Metadata.Builder
FileMetadata
.Modifier and Type | Field and Description |
---|---|
protected java.util.Date |
clientModified |
protected java.lang.String |
contentHash |
protected java.lang.Boolean |
hasExplicitSharedMembers |
protected java.lang.String |
id |
protected MediaInfo |
mediaInfo |
protected java.util.List<PropertyGroup> |
propertyGroups |
protected java.lang.String |
rev |
protected java.util.Date |
serverModified |
protected FileSharingInfo |
sharingInfo |
protected long |
size |
protected SymlinkInfo |
symlinkInfo |
name, parentSharedFolderId, pathDisplay, pathLower
Modifier | Constructor and Description |
---|---|
protected |
Builder(java.lang.String name,
java.lang.String id,
java.util.Date clientModified,
java.util.Date serverModified,
java.lang.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 |
withContentHash(java.lang.String contentHash)
Set value for optional field.
|
FileMetadata.Builder |
withHasExplicitSharedMembers(java.lang.Boolean hasExplicitSharedMembers)
Set value for optional field.
|
FileMetadata.Builder |
withMediaInfo(MediaInfo mediaInfo)
Set value for optional field.
|
FileMetadata.Builder |
withParentSharedFolderId(java.lang.String parentSharedFolderId)
Set value for optional field.
|
FileMetadata.Builder |
withPathDisplay(java.lang.String pathDisplay)
Set value for optional field.
|
FileMetadata.Builder |
withPathLower(java.lang.String pathLower)
Set value for optional field.
|
FileMetadata.Builder |
withPropertyGroups(java.util.List<PropertyGroup> propertyGroups)
Set value for optional field.
|
FileMetadata.Builder |
withSharingInfo(FileSharingInfo sharingInfo)
Set value for optional field.
|
FileMetadata.Builder |
withSymlinkInfo(SymlinkInfo symlinkInfo)
Set value for optional field.
|
protected final java.lang.String id
protected final java.util.Date clientModified
protected final java.util.Date serverModified
protected final java.lang.String rev
protected final long size
protected MediaInfo mediaInfo
protected SymlinkInfo symlinkInfo
protected FileSharingInfo sharingInfo
protected java.util.List<PropertyGroup> propertyGroups
protected java.lang.Boolean hasExplicitSharedMembers
protected java.lang.String contentHash
protected Builder(java.lang.String name, java.lang.String id, java.util.Date clientModified, java.util.Date serverModified, java.lang.String rev, long size)
public FileMetadata.Builder withMediaInfo(MediaInfo mediaInfo)
mediaInfo
- Additional information if the file is a photo or
video.public FileMetadata.Builder withSymlinkInfo(SymlinkInfo symlinkInfo)
symlinkInfo
- Set if this file is a symlink.public FileMetadata.Builder withSharingInfo(FileSharingInfo sharingInfo)
sharingInfo
- Set if this file is contained in a shared folder.public FileMetadata.Builder withPropertyGroups(java.util.List<PropertyGroup> propertyGroups)
propertyGroups
- Additional information if the file has custom
properties with the property template specified. Must not contain
a null
item.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public FileMetadata.Builder withHasExplicitSharedMembers(java.lang.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 withContentHash(java.lang.String contentHash)
contentHash
- A hash of the file content. This field can be
used to verify data integrity. For more information see our Content
hash page. Must have length of at least 64 and have length of
at most 64.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public FileMetadata.Builder withPathLower(java.lang.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(java.lang.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, and at least the last path component will
have the correct casing. Changes to only 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(java.lang.String parentSharedFolderId)
withParentSharedFolderId
in class Metadata.Builder
parentSharedFolderId
- Please use FileSharingInfo.getParentSharedFolderId()
or FolderSharingInfo.getParentSharedFolderId()
instead. Must match
pattern "[-_0-9a-zA-Z:]+
".java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public FileMetadata build()
FileMetadata
configured with this
builder's valuesbuild
in class Metadata.Builder
FileMetadata