Package com.dropbox.core.v2.sharing
Class SharedFileMetadata
- java.lang.Object
- 
- com.dropbox.core.v2.sharing.SharedFileMetadata
 
- 
 public class SharedFileMetadata extends java.lang.ObjectProperties of the shared file.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSharedFileMetadata.BuilderBuilder forSharedFileMetadata.
 - 
Field SummaryFields Modifier and Type Field Description protected AccessLevelaccessTypeprotected ExpectedSharedContentLinkMetadataexpectedLinkMetadataprotected java.lang.Stringidprotected SharedContentLinkMetadatalinkMetadataprotected java.lang.Stringnameprotected java.util.List<java.lang.String>ownerDisplayNamesprotected TeamownerTeamprotected java.lang.StringparentSharedFolderIdprotected java.lang.StringpathDisplayprotected java.lang.StringpathLowerprotected java.util.List<FilePermission>permissionsprotected FolderPolicypolicyprotected java.lang.StringpreviewUrlprotected java.util.DatetimeInvited
 - 
Constructor SummaryConstructors Constructor Description SharedFileMetadata(java.lang.String id, java.lang.String name, FolderPolicy policy, java.lang.String previewUrl)Properties of the shared file.SharedFileMetadata(java.lang.String id, java.lang.String name, FolderPolicy policy, java.lang.String previewUrl, AccessLevel accessType, ExpectedSharedContentLinkMetadata expectedLinkMetadata, SharedContentLinkMetadata linkMetadata, java.util.List<java.lang.String> ownerDisplayNames, Team ownerTeam, java.lang.String parentSharedFolderId, java.lang.String pathDisplay, java.lang.String pathLower, java.util.List<FilePermission> permissions, java.util.Date timeInvited)Properties of the shared file.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)AccessLevelgetAccessType()The current user's access level for this shared file.ExpectedSharedContentLinkMetadatagetExpectedLinkMetadata()The expected metadata of the link associated for the file when it is first shared.java.lang.StringgetId()The ID of the file.SharedContentLinkMetadatagetLinkMetadata()The metadata of the link associated for the file.java.lang.StringgetName()The name of this file.java.util.List<java.lang.String>getOwnerDisplayNames()The display names of the users that own the file.TeamgetOwnerTeam()The team that owns the file.java.lang.StringgetParentSharedFolderId()The ID of the parent shared folder.java.lang.StringgetPathDisplay()The cased path to be used for display purposes only.java.lang.StringgetPathLower()The lower-case full path of this file.java.util.List<FilePermission>getPermissions()The sharing permissions that requesting user has on this file.FolderPolicygetPolicy()Policies governing this shared file.java.lang.StringgetPreviewUrl()URL for displaying a web preview of the shared file.java.util.DategetTimeInvited()Timestamp indicating when the current user was invited to this shared file.inthashCode()static SharedFileMetadata.BuildernewBuilder(java.lang.String id, java.lang.String name, FolderPolicy policy, java.lang.String previewUrl)Returns a new builder for creating an instance of this class.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
 
- 
- 
- 
Field Detail- 
accessTypeprotected final AccessLevel accessType 
 - 
idprotected final java.lang.String id 
 - 
expectedLinkMetadataprotected final ExpectedSharedContentLinkMetadata expectedLinkMetadata 
 - 
linkMetadataprotected final SharedContentLinkMetadata linkMetadata 
 - 
nameprotected final java.lang.String name 
 - 
ownerDisplayNamesprotected final java.util.List<java.lang.String> ownerDisplayNames 
 - 
ownerTeamprotected final Team ownerTeam 
 - 
parentSharedFolderIdprotected final java.lang.String parentSharedFolderId 
 - 
pathDisplayprotected final java.lang.String pathDisplay 
 - 
pathLowerprotected final java.lang.String pathLower 
 - 
permissionsprotected final java.util.List<FilePermission> permissions 
 - 
policyprotected final FolderPolicy policy 
 - 
previewUrlprotected final java.lang.String previewUrl 
 - 
timeInvitedprotected final java.util.Date timeInvited 
 
- 
 - 
Constructor Detail- 
SharedFileMetadatapublic SharedFileMetadata(java.lang.String id, java.lang.String name, FolderPolicy policy, java.lang.String previewUrl, AccessLevel accessType, ExpectedSharedContentLinkMetadata expectedLinkMetadata, SharedContentLinkMetadata linkMetadata, java.util.List<java.lang.String> ownerDisplayNames, Team ownerTeam, java.lang.String parentSharedFolderId, java.lang.String pathDisplay, java.lang.String pathLower, java.util.List<FilePermission> permissions, java.util.Date timeInvited)Properties of the shared file.Use newBuilder(java.lang.String,java.lang.String,com.dropbox.core.v2.sharing.FolderPolicy,java.lang.String)to create instances of this class without specifying values for all optional fields.- Parameters:
- id- The ID of the file. Must have length of at least 4, match pattern "- id:.+", and not be- null.
- name- The name of this file. Must not be- null.
- policy- Policies governing this shared file. Must not be- null.
- previewUrl- URL for displaying a web preview of the shared file. Must not be- null.
- accessType- The current user's access level for this shared file.
- expectedLinkMetadata- 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.
- linkMetadata- The metadata of the link associated for the file. This is for an unreleased feature so it may not be returned yet.
- 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 a- nullitem.
- ownerTeam- The team that owns the file. This field is not present if the file is not owned by a team.
- parentSharedFolderId- The ID of the parent shared folder. This field is present only if the file is contained within a shared folder. Must match pattern "- [-_0-9a-zA-Z:]+".
- 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.
- pathLower- The lower-case full path of this file. Absent for unmounted files.
- permissions- The sharing permissions that requesting user has on this file. This corresponds to the entries given in the- actionsargument to- DbxUserSharingRequests.getFileMetadataBatch(List,List)or the- actionsargument to- DbxUserSharingRequests.getFileMetadata(String,List). Must not contain a- nullitem.
- 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.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
SharedFileMetadatapublic SharedFileMetadata(java.lang.String id, java.lang.String name, FolderPolicy policy, java.lang.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 be- null.
- name- The name of this file. Must not be- null.
- policy- Policies governing this shared file. Must not be- null.
- previewUrl- URL for displaying a web preview of the shared file. Must not be- null.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 
- 
 - 
Method Detail- 
getIdpublic java.lang.String getId() The ID of the file.- Returns:
- value for this field, never null.
 
 - 
getNamepublic java.lang.String getName() The name of this file.- Returns:
- value for this field, never null.
 
 - 
getPolicypublic FolderPolicy getPolicy() Policies governing this shared file.- Returns:
- value for this field, never null.
 
 - 
getPreviewUrlpublic java.lang.String getPreviewUrl() URL for displaying a web preview of the shared file.- Returns:
- value for this field, never null.
 
 - 
getAccessTypepublic AccessLevel getAccessType() The current user's access level for this shared file.- Returns:
- value for this field, or nullif not present.
 
 - 
getExpectedLinkMetadatapublic ExpectedSharedContentLinkMetadata 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.
 
 - 
getLinkMetadatapublic SharedContentLinkMetadata 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.
 
 - 
getOwnerDisplayNamespublic java.util.List<java.lang.String> 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.
 
 - 
getOwnerTeampublic Team 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.
 
 - 
getParentSharedFolderIdpublic java.lang.String getParentSharedFolderId() The ID of the parent shared folder. This field is present only if the file is contained within a shared folder.- Returns:
- value for this field, or nullif not present.
 
 - 
getPathDisplaypublic java.lang.String 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.
 
 - 
getPathLowerpublic java.lang.String getPathLower() The lower-case full path of this file. Absent for unmounted files.- Returns:
- value for this field, or nullif not present.
 
 - 
getPermissionspublic java.util.List<FilePermission> 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.
 
 - 
getTimeInvitedpublic java.util.Date 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.
 
 - 
newBuilderpublic static SharedFileMetadata.Builder newBuilder(java.lang.String id, java.lang.String name, FolderPolicy policy, java.lang.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 be- null.
- name- The name of this file. Must not be- null.
- policy- Policies governing this shared file. Must not be- null.
- previewUrl- URL for displaying a web preview of the shared file. Must not be- null.
- Returns:
- builder for this class.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
toStringMultilinepublic java.lang.String 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
 
 
- 
 
-