Package com.dropbox.core.v2.files
Class FileMetadata.Builder
- java.lang.Object
- 
- com.dropbox.core.v2.files.Metadata.Builder
- 
- com.dropbox.core.v2.files.FileMetadata.Builder
 
 
- 
- Enclosing class:
- FileMetadata
 
 public static class FileMetadata.Builder extends Metadata.Builder Builder forFileMetadata.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.DateclientModifiedprotected java.lang.StringcontentHashprotected ExportInfoexportInfoprotected FileLockMetadatafileLockInfoprotected java.lang.BooleanhasExplicitSharedMembersprotected java.lang.Stringidprotected booleanisDownloadableprotected MediaInfomediaInfoprotected java.util.List<PropertyGroup>propertyGroupsprotected java.lang.Stringrevprotected java.util.DateserverModifiedprotected FileSharingInfosharingInfoprotected longsizeprotected SymlinkInfosymlinkInfo- 
Fields inherited from class com.dropbox.core.v2.files.Metadata.Buildername, parentSharedFolderId, pathDisplay, pathLower, previewUrl
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedBuilder(java.lang.String name, java.lang.String id, java.util.Date clientModified, java.util.Date serverModified, java.lang.String rev, long size)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description FileMetadatabuild()Builds an instance ofFileMetadataconfigured with this builder's valuesFileMetadata.BuilderwithContentHash(java.lang.String contentHash)Set value for optional field.FileMetadata.BuilderwithExportInfo(ExportInfo exportInfo)Set value for optional field.FileMetadata.BuilderwithFileLockInfo(FileLockMetadata fileLockInfo)Set value for optional field.FileMetadata.BuilderwithHasExplicitSharedMembers(java.lang.Boolean hasExplicitSharedMembers)Set value for optional field.FileMetadata.BuilderwithIsDownloadable(java.lang.Boolean isDownloadable)Set value for optional field.FileMetadata.BuilderwithMediaInfo(MediaInfo mediaInfo)Set value for optional field.FileMetadata.BuilderwithParentSharedFolderId(java.lang.String parentSharedFolderId)Set value for optional field.FileMetadata.BuilderwithPathDisplay(java.lang.String pathDisplay)Set value for optional field.FileMetadata.BuilderwithPathLower(java.lang.String pathLower)Set value for optional field.FileMetadata.BuilderwithPreviewUrl(java.lang.String previewUrl)Set value for optional field.FileMetadata.BuilderwithPropertyGroups(java.util.List<PropertyGroup> propertyGroups)Set value for optional field.FileMetadata.BuilderwithSharingInfo(FileSharingInfo sharingInfo)Set value for optional field.FileMetadata.BuilderwithSymlinkInfo(SymlinkInfo symlinkInfo)Set value for optional field.
 
- 
- 
- 
Field Detail- 
idprotected final java.lang.String id 
 - 
clientModifiedprotected final java.util.Date clientModified 
 - 
serverModifiedprotected final java.util.Date serverModified 
 - 
revprotected final java.lang.String rev 
 - 
sizeprotected final long size 
 - 
mediaInfoprotected MediaInfo mediaInfo 
 - 
symlinkInfoprotected SymlinkInfo symlinkInfo 
 - 
sharingInfoprotected FileSharingInfo sharingInfo 
 - 
isDownloadableprotected boolean isDownloadable 
 - 
exportInfoprotected ExportInfo exportInfo 
 - 
propertyGroupsprotected java.util.List<PropertyGroup> propertyGroups 
 - 
hasExplicitSharedMembersprotected java.lang.Boolean hasExplicitSharedMembers 
 - 
contentHashprotected java.lang.String contentHash 
 - 
fileLockInfoprotected FileLockMetadata fileLockInfo 
 
- 
 - 
Method Detail- 
withMediaInfopublic FileMetadata.Builder withMediaInfo(MediaInfo mediaInfo) Set value for optional field.- Parameters:
- mediaInfo- Additional information if the file is a photo or video. This field will not be set on entries returned by- DbxAppFilesRequests.listFolder(String),- DbxAppFilesRequests.listFolderContinue(String), or- DbxUserFilesRequests.getThumbnailBatch(List), starting December 2, 2019.
- Returns:
- this builder
 
 - 
withSymlinkInfopublic FileMetadata.Builder withSymlinkInfo(SymlinkInfo symlinkInfo) Set value for optional field.- Parameters:
- symlinkInfo- Set if this file is a symlink.
- Returns:
- this builder
 
 - 
withSharingInfopublic FileMetadata.Builder withSharingInfo(FileSharingInfo sharingInfo) Set value for optional field.- Parameters:
- sharingInfo- Set if this file is contained in a shared folder.
- Returns:
- this builder
 
 - 
withIsDownloadablepublic FileMetadata.Builder withIsDownloadable(java.lang.Boolean isDownloadable) Set value for optional field.If left unset or set to null, defaults totrue.- Parameters:
- isDownloadable- If true, file can be downloaded directly; else the file must be exported. Defaults to- truewhen set to- null.
- Returns:
- this builder
 
 - 
withExportInfopublic FileMetadata.Builder withExportInfo(ExportInfo exportInfo) Set value for optional field.- Parameters:
- exportInfo- Information about format this file can be exported to. This filed must be set if- FileMetadata.getIsDownloadable()is set to false.
- Returns:
- this builder
 
 - 
withPropertyGroupspublic FileMetadata.Builder withPropertyGroups(java.util.List<PropertyGroup> propertyGroups) Set value for optional field.- Parameters:
- propertyGroups- Additional information if the file has custom properties with the property template specified. Must not contain a- nullitem.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withHasExplicitSharedMemberspublic FileMetadata.Builder withHasExplicitSharedMembers(java.lang.Boolean hasExplicitSharedMembers) Set value for optional field.- Parameters:
- hasExplicitSharedMembers- This flag will only be present if include_has_explicit_shared_members is true in- DbxAppFilesRequests.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.
- Returns:
- this builder
 
 - 
withContentHashpublic FileMetadata.Builder withContentHash(java.lang.String contentHash) Set value for optional field.- Parameters:
- 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.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withFileLockInfopublic FileMetadata.Builder withFileLockInfo(FileLockMetadata fileLockInfo) Set value for optional field.- Parameters:
- fileLockInfo- If present, the metadata associated with the file's current lock.
- Returns:
- this builder
 
 - 
withPathLowerpublic FileMetadata.Builder withPathLower(java.lang.String pathLower) Set value for optional field.- Overrides:
- withPathLowerin class- Metadata.Builder
- Parameters:
- 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.
- Returns:
- this builder
 
 - 
withPathDisplaypublic FileMetadata.Builder withPathDisplay(java.lang.String pathDisplay) Set value for optional field.- Overrides:
- withPathDisplayin class- Metadata.Builder
- Parameters:
- 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- DbxAppFilesRequests.listFolderContinue(String). This field will be null if the file or folder is not mounted.
- Returns:
- this builder
 
 - 
withParentSharedFolderIdpublic FileMetadata.Builder withParentSharedFolderId(java.lang.String parentSharedFolderId) Set value for optional field.- Overrides:
- withParentSharedFolderIdin class- Metadata.Builder
- Parameters:
- parentSharedFolderId- Please use- FileSharingInfo.getParentSharedFolderId()or- FolderSharingInfo.getParentSharedFolderId()instead. Must match pattern "- [-_0-9a-zA-Z:]+".
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withPreviewUrlpublic FileMetadata.Builder withPreviewUrl(java.lang.String previewUrl) Set value for optional field.- Overrides:
- withPreviewUrlin class- Metadata.Builder
- Parameters:
- previewUrl- The preview URL of the file.
- Returns:
- this builder
 
 - 
buildpublic FileMetadata build() Builds an instance ofFileMetadataconfigured with this builder's values- Overrides:
- buildin class- Metadata.Builder
- Returns:
- new instance of FileMetadata
 
 
- 
 
-