Package com.dropbox.core.v2.sharing
Class SharedFileMetadata
java.lang.Object
com.dropbox.core.v2.sharing.SharedFileMetadata
Properties of the shared file.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AccessLevelprotected final ExpectedSharedContentLinkMetadataprotected final Stringprotected final SharedContentLinkMetadataprotected final Stringprotected final Teamprotected final Stringprotected final Stringprotected final Stringprotected final List<FilePermission> protected final FolderPolicyprotected final Stringprotected final Date -
Constructor Summary
ConstructorsConstructorDescriptionSharedFileMetadata(String id, String name, FolderPolicy policy, String previewUrl) Properties of the shared file.SharedFileMetadata(String id, String name, FolderPolicy policy, String previewUrl, AccessLevel accessType, ExpectedSharedContentLinkMetadata expectedLinkMetadata, SharedContentLinkMetadata linkMetadata, List<String> ownerDisplayNames, Team ownerTeam, String parentSharedFolderId, String pathDisplay, String pathLower, List<FilePermission> permissions, Date timeInvited) Properties of the shared file. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe current user's access level for this shared file.The expected metadata of the link associated for the file when it is first shared.getId()The ID of the file.The metadata of the link associated for the file.getName()The name of this file.The display names of the users that own the file.The team that owns the file.The ID of the parent shared folder.The cased path to be used for display purposes only.The lower-case full path of this file.The sharing permissions that requesting user has on this file.Policies governing this shared file.URL for displaying a web preview of the shared file.Timestamp indicating when the current user was invited to this shared file.inthashCode()static SharedFileMetadata.BuildernewBuilder(String id, String name, FolderPolicy policy, String previewUrl) Returns a new builder for creating an instance of this class.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
accessType
-
id
-
expectedLinkMetadata
-
linkMetadata
-
name
-
ownerDisplayNames
-
ownerTeam
-
pathDisplay
-
pathLower
-
permissions
-
policy
-
previewUrl
-
timeInvited
-
-
Constructor Details
-
SharedFileMetadata
public SharedFileMetadata(@Nonnull String id, @Nonnull String name, @Nonnull FolderPolicy policy, @Nonnull String previewUrl) Properties of the shared file.The default values for unset fields will be used.
- Parameters:
id- The ID of the file. Must have length of at least 4, match pattern "id:.+", and not benull.name- The name of this file. Must not benull.policy- Policies governing this shared file. Must not benull.previewUrl- URL for displaying a web preview of the shared file. Must not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
Method Details
-
getId
The ID of the file.- Returns:
- value for this field, never
null.
-
getName
The name of this file.- Returns:
- value for this field, never
null.
-
getPolicy
Policies governing this shared file.- Returns:
- value for this field, never
null.
-
getPreviewUrl
URL for displaying a web preview of the shared file.- Returns:
- value for this field, never
null.
-
getAccessType
The current user's access level for this shared file.- Returns:
- value for this field, or
nullif not present.
-
getExpectedLinkMetadata
The expected metadata of the link associated for the file when it is first shared. Absent if the link already exists. This is for an unreleased feature so it may not be returned yet.- Returns:
- value for this field, or
nullif not present.
-
getLinkMetadata
The metadata of the link associated for the file. This is for an unreleased feature so it may not be returned yet.- Returns:
- value for this field, or
nullif not present.
-
getOwnerDisplayNames
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.- Returns:
- value for this field, or
nullif not present.
-
getOwnerTeam
The team that owns the file. This field is not present if the file is not owned by a team.- Returns:
- value for this field, or
nullif not present.
-
getPathDisplay
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:
- value for this field, or
nullif not present.
-
getPathLower
The lower-case full path of this file. Absent for unmounted files.- Returns:
- value for this field, or
nullif not present.
-
getPermissions
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).- Returns:
- value for this field, or
nullif not present.
-
getTimeInvited
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:
- value for this field, or
nullif not present.
-
newBuilder
public static SharedFileMetadata.Builder newBuilder(String id, String name, FolderPolicy policy, String previewUrl) Returns a new builder for creating an instance of this class.- Parameters:
id- The ID of the file. Must have length of at least 4, match pattern "id:.+", and not benull.name- The name of this file. Must not benull.policy- Policies governing this shared file. Must not benull.previewUrl- URL for displaying a web preview of the shared file. Must not benull.- Returns:
- builder for this class.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
hashCode
public int hashCode() -
equals
-
toString
-
toStringMultiline
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Returns:
- Formatted, multiline String representation of this object
-