Package com.dropbox.core.v2.sharing
Class SharedFileMetadata.Builder
java.lang.Object
com.dropbox.core.v2.sharing.SharedFileMetadata.Builder
- Enclosing class:
SharedFileMetadata
Builder for
SharedFileMetadata.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AccessLevelprotected ExpectedSharedContentLinkMetadataprotected final Stringprotected SharedContentLinkMetadataprotected final Stringprotected Teamprotected Stringprotected Stringprotected Stringprotected List<FilePermission> protected final FolderPolicyprotected final Stringprotected Date -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder(String id, String name, FolderPolicy policy, String previewUrl) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance ofSharedFileMetadataconfigured with this builder's valueswithAccessType(AccessLevel accessType) Set value for optional field.withExpectedLinkMetadata(ExpectedSharedContentLinkMetadata expectedLinkMetadata) Set value for optional field.withLinkMetadata(SharedContentLinkMetadata linkMetadata) Set value for optional field.withOwnerDisplayNames(List<String> ownerDisplayNames) Set value for optional field.withOwnerTeam(Team ownerTeam) Set value for optional field.withParentSharedFolderId(String parentSharedFolderId) Set value for optional field.withPathDisplay(String pathDisplay) Set value for optional field.withPathLower(String pathLower) Set value for optional field.withPermissions(List<FilePermission> permissions) Set value for optional field.withTimeInvited(Date timeInvited) Set value for optional field.
-
Field Details
-
id
-
name
-
policy
-
previewUrl
-
accessType
-
expectedLinkMetadata
-
linkMetadata
-
ownerDisplayNames
-
ownerTeam
-
pathDisplay
-
pathLower
-
permissions
-
timeInvited
-
-
Constructor Details
-
Builder
-
-
Method Details
-
withAccessType
Set value for optional field.- Parameters:
accessType- The current user's access level for this shared file.- Returns:
- this builder
-
withOwnerDisplayNames
Set value for optional field.- Parameters:
ownerDisplayNames- The display names of the users that own the file. If the file is part of a team folder, the display names of the team admins are also included. Absent if the owner display names cannot be fetched. Must not contain anullitem.- Returns:
- this builder
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
withOwnerTeam
Set value for optional field.- Parameters:
ownerTeam- The team that owns the file. This field is not present if the file is not owned by a team.- Returns:
- this builder
-
withPathDisplay
Set value for optional field.- 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. Absent for unmounted files.- Returns:
- this builder
-
withPathLower
Set value for optional field.- Parameters:
pathLower- The lower-case full path of this file. Absent for unmounted files.- Returns:
- this builder
-
withPermissions
Set value for optional field.- Parameters:
permissions- The sharing permissions that requesting user has on this file. This corresponds to the entries given in theactionsargument toDbxUserSharingRequests.getFileMetadataBatch(List,List)or theactionsargument toDbxUserSharingRequests.getFileMetadata(String,List). Must not contain anullitem.- Returns:
- this builder
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
withTimeInvited
Set value for optional field.- Parameters:
timeInvited- Timestamp indicating when the current user was invited to this shared file. If the user was not invited to the shared file, the timestamp will indicate when the user was invited to the parent shared folder. This value may be absent.- Returns:
- this builder
-
build
Builds an instance ofSharedFileMetadataconfigured with this builder's values- Returns:
- new instance of
SharedFileMetadata
-