public class SharedFileMetadata
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SharedFileMetadata.Builder
Builder for
SharedFileMetadata . |
Modifier and Type | Field and Description |
---|---|
protected AccessLevel |
accessType |
protected ExpectedSharedContentLinkMetadata |
expectedLinkMetadata |
protected java.lang.String |
id |
protected SharedContentLinkMetadata |
linkMetadata |
protected java.lang.String |
name |
protected java.util.List<java.lang.String> |
ownerDisplayNames |
protected Team |
ownerTeam |
protected java.lang.String |
parentSharedFolderId |
protected java.lang.String |
pathDisplay |
protected java.lang.String |
pathLower |
protected java.util.List<FilePermission> |
permissions |
protected FolderPolicy |
policy |
protected java.lang.String |
previewUrl |
protected java.util.Date |
timeInvited |
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
AccessLevel |
getAccessType()
The current user's access level for this shared file.
|
ExpectedSharedContentLinkMetadata |
getExpectedLinkMetadata()
The expected metadata of the link associated for the file when it is
first shared.
|
java.lang.String |
getId()
The ID of the file.
|
SharedContentLinkMetadata |
getLinkMetadata()
The metadata of the link associated for the file.
|
java.lang.String |
getName()
The name of this file.
|
java.util.List<java.lang.String> |
getOwnerDisplayNames()
The display names of the users that own the file.
|
Team |
getOwnerTeam()
The team that owns the file.
|
java.lang.String |
getParentSharedFolderId()
The ID of the parent shared folder.
|
java.lang.String |
getPathDisplay()
The cased path to be used for display purposes only.
|
java.lang.String |
getPathLower()
The lower-case full path of this file.
|
java.util.List<FilePermission> |
getPermissions()
The sharing permissions that requesting user has on this file.
|
FolderPolicy |
getPolicy()
Policies governing this shared file.
|
java.lang.String |
getPreviewUrl()
URL for displaying a web preview of the shared file.
|
java.util.Date |
getTimeInvited()
Timestamp indicating when the current user was invited to this shared
file.
|
int |
hashCode() |
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.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final AccessLevel accessType
protected final java.lang.String id
protected final ExpectedSharedContentLinkMetadata expectedLinkMetadata
protected final SharedContentLinkMetadata linkMetadata
protected final java.lang.String name
protected final java.util.List<java.lang.String> ownerDisplayNames
protected final Team ownerTeam
protected final java.lang.String parentSharedFolderId
protected final java.lang.String pathDisplay
protected final java.lang.String pathLower
protected final java.util.List<FilePermission> permissions
protected final FolderPolicy policy
protected final java.lang.String previewUrl
protected final java.util.Date timeInvited
public 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)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
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 null
item.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 actions
argument to DbxUserSharingRequests.getFileMetadataBatch(List,List)
or the actions
argument to DbxUserSharingRequests.getFileMetadata(String,List)
. Must not
contain a null
item.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.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedFileMetadata(java.lang.String id, java.lang.String name, FolderPolicy policy, java.lang.String previewUrl)
The default values for unset fields will be used.
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
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public java.lang.String getId()
null
.public java.lang.String getName()
null
.public FolderPolicy getPolicy()
null
.public java.lang.String getPreviewUrl()
null
.public AccessLevel getAccessType()
null
if not present.public ExpectedSharedContentLinkMetadata getExpectedLinkMetadata()
null
if not present.public SharedContentLinkMetadata getLinkMetadata()
null
if not present.public java.util.List<java.lang.String> getOwnerDisplayNames()
null
if not present.public Team getOwnerTeam()
null
if not present.public java.lang.String getParentSharedFolderId()
null
if not present.public java.lang.String getPathDisplay()
null
if not present.public java.lang.String getPathLower()
null
if not present.public java.util.List<FilePermission> getPermissions()
actions
argument to
DbxUserSharingRequests.getFileMetadataBatch(List,List)
or the
actions
argument to DbxUserSharingRequests.getFileMetadata(String,List)
.null
if not present.public java.util.Date getTimeInvited()
null
if not present.public static SharedFileMetadata.Builder newBuilder(java.lang.String id, java.lang.String name, FolderPolicy policy, java.lang.String previewUrl)
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
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.