public class FileLinkMetadata extends SharedLinkMetadata
Modifier and Type | Class and Description |
---|---|
static class |
FileLinkMetadata.Builder
Builder for
FileLinkMetadata . |
Modifier and Type | Field and Description |
---|---|
protected Date |
clientModified |
protected String |
rev |
protected Date |
serverModified |
protected long |
size |
contentOwnerTeamInfo, expires, id, linkPermissions, name, pathLower, teamMemberInfo, url
Constructor and Description |
---|
FileLinkMetadata(String url,
String name,
LinkPermissions linkPermissions,
Date clientModified,
Date serverModified,
String rev,
long size)
The metadata of a file shared link
|
FileLinkMetadata(String url,
String name,
LinkPermissions linkPermissions,
Date clientModified,
Date serverModified,
String rev,
long size,
String id,
Date expires,
String pathLower,
TeamMemberInfo teamMemberInfo,
Team contentOwnerTeamInfo)
The metadata of a file shared link
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Date |
getClientModified()
The modification time set by the desktop client when the file was added
to Dropbox.
|
Team |
getContentOwnerTeamInfo()
The team information of the content's owner.
|
Date |
getExpires()
Expiration time, if set.
|
String |
getId()
A unique identifier for the linked file.
|
LinkPermissions |
getLinkPermissions()
The link's access permissions.
|
String |
getName()
The linked file name (including extension).
|
String |
getPathLower()
The lowercased full path in the user's Dropbox.
|
String |
getRev()
A unique identifier for the current revision of a file.
|
Date |
getServerModified()
The last time the file was modified on Dropbox.
|
long |
getSize()
The file size in bytes.
|
TeamMemberInfo |
getTeamMemberInfo()
The team membership information of the link's owner.
|
String |
getUrl()
URL of the shared link.
|
int |
hashCode() |
static FileLinkMetadata.Builder |
newBuilder(String url,
String name,
LinkPermissions linkPermissions,
Date clientModified,
Date serverModified,
String rev,
long size)
Returns a new builder for creating an instance of this class.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
newBuilder
protected final Date clientModified
protected final Date serverModified
protected final String rev
protected final long size
public FileLinkMetadata(String url, String name, LinkPermissions linkPermissions, Date clientModified, Date serverModified, String rev, long size, String id, Date expires, String pathLower, TeamMemberInfo teamMemberInfo, Team contentOwnerTeamInfo)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
url
- URL of the shared link. Must not be null
.name
- The linked file name (including extension). This never
contains a slash. Must not be null
.linkPermissions
- The link's access permissions. Must not be null
.clientModified
- The modification time set by the desktop client
when the file was added to Dropbox. Since this time is not verified
(the Dropbox server stores whatever the desktop client sends up),
this should only be used for display purposes (such as sorting) and
not, for example, to determine if a file has changed or not. Must not
be null
.serverModified
- The last time the file was modified on Dropbox.
Must not be null
.rev
- A unique identifier for the current revision of a file. This
field is the same rev as elsewhere in the API and can be used to
detect changes and avoid conflicts. Must have length of at least 9,
match pattern "[0-9a-f]+
", and not be null
.size
- The file size in bytes.id
- A unique identifier for the linked file. Must have length of
at least 1.expires
- Expiration time, if set. By default the link won't
expire.pathLower
- The lowercased full path in the user's Dropbox. This
always starts with a slash. This field will only be present only if
the linked file is in the authenticated user's dropbox.teamMemberInfo
- The team membership information of the link's
owner. This field will only be present if the link's owner is a
team member.contentOwnerTeamInfo
- The team information of the content's owner.
This field will only be present if the content's owner is a team
member and the content's owner team is different from the link's
owner team.IllegalArgumentException
- If any argument does not meet its
preconditions.public FileLinkMetadata(String url, String name, LinkPermissions linkPermissions, Date clientModified, Date serverModified, String rev, long size)
The default values for unset fields will be used.
url
- URL of the shared link. Must not be null
.name
- The linked file name (including extension). This never
contains a slash. Must not be null
.linkPermissions
- The link's access permissions. Must not be null
.clientModified
- The modification time set by the desktop client
when the file was added to Dropbox. Since this time is not verified
(the Dropbox server stores whatever the desktop client sends up),
this should only be used for display purposes (such as sorting) and
not, for example, to determine if a file has changed or not. Must not
be null
.serverModified
- The last time the file was modified on Dropbox.
Must not be null
.rev
- A unique identifier for the current revision of a file. This
field is the same rev as elsewhere in the API and can be used to
detect changes and avoid conflicts. Must have length of at least 9,
match pattern "[0-9a-f]+
", and not be null
.size
- The file size in bytes.IllegalArgumentException
- If any argument does not meet its
preconditions.public String getUrl()
getUrl
in class SharedLinkMetadata
null
.public String getName()
getName
in class SharedLinkMetadata
null
.public LinkPermissions getLinkPermissions()
getLinkPermissions
in class SharedLinkMetadata
null
.public Date getClientModified()
null
.public Date getServerModified()
null
.public String getRev()
null
.public long getSize()
public String getId()
getId
in class SharedLinkMetadata
null
if not present.public Date getExpires()
getExpires
in class SharedLinkMetadata
null
if not present.public String getPathLower()
getPathLower
in class SharedLinkMetadata
null
if not present.public TeamMemberInfo getTeamMemberInfo()
getTeamMemberInfo
in class SharedLinkMetadata
null
if not present.public Team getContentOwnerTeamInfo()
getContentOwnerTeamInfo
in class SharedLinkMetadata
null
if not present.public static FileLinkMetadata.Builder newBuilder(String url, String name, LinkPermissions linkPermissions, Date clientModified, Date serverModified, String rev, long size)
url
- URL of the shared link. Must not be null
.name
- The linked file name (including extension). This never
contains a slash. Must not be null
.linkPermissions
- The link's access permissions. Must not be null
.clientModified
- The modification time set by the desktop client
when the file was added to Dropbox. Since this time is not verified
(the Dropbox server stores whatever the desktop client sends up),
this should only be used for display purposes (such as sorting) and
not, for example, to determine if a file has changed or not. Must not
be null
.serverModified
- The last time the file was modified on Dropbox.
Must not be null
.rev
- A unique identifier for the current revision of a file. This
field is the same rev as elsewhere in the API and can be used to
detect changes and avoid conflicts. Must have length of at least 9,
match pattern "[0-9a-f]+
", and not be null
.size
- The file size in bytes.IllegalArgumentException
- If any argument does not meet its
preconditions.public int hashCode()
hashCode
in class SharedLinkMetadata
public boolean equals(Object obj)
equals
in class SharedLinkMetadata
public String toString()
toString
in class SharedLinkMetadata
public String toStringMultiline()
The returned String may contain newlines.
toStringMultiline
in class SharedLinkMetadata