Package com.dropbox.core.v2.sharing
Class FileLinkMetadata
- java.lang.Object
-
- com.dropbox.core.v2.sharing.SharedLinkMetadata
-
- com.dropbox.core.v2.sharing.FileLinkMetadata
-
public class FileLinkMetadata extends SharedLinkMetadata
The metadata of a file shared link.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFileLinkMetadata.BuilderBuilder forFileLinkMetadata.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.DateclientModifiedprotected java.lang.Stringrevprotected java.util.DateserverModifiedprotected longsize-
Fields inherited from class com.dropbox.core.v2.sharing.SharedLinkMetadata
contentOwnerTeamInfo, expires, id, linkPermissions, name, pathLower, teamMemberInfo, url
-
-
Constructor Summary
Constructors Constructor Description FileLinkMetadata(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions, java.util.Date clientModified, java.util.Date serverModified, java.lang.String rev, long size)The metadata of a file shared link.FileLinkMetadata(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions, java.util.Date clientModified, java.util.Date serverModified, java.lang.String rev, long size, java.lang.String id, java.util.Date expires, java.lang.String pathLower, TeamMemberInfo teamMemberInfo, Team contentOwnerTeamInfo)The metadata of a file shared link.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.DategetClientModified()The modification time set by the desktop client when the file was added to Dropbox.TeamgetContentOwnerTeamInfo()The team information of the content's owner.java.util.DategetExpires()Expiration time, if set.java.lang.StringgetId()A unique identifier for the linked file.LinkPermissionsgetLinkPermissions()The link's access permissions.java.lang.StringgetName()The linked file name (including extension).java.lang.StringgetPathLower()The lowercased full path in the user's Dropbox.java.lang.StringgetRev()A unique identifier for the current revision of a file.java.util.DategetServerModified()The last time the file was modified on Dropbox.longgetSize()The file size in bytes.TeamMemberInfogetTeamMemberInfo()The team membership information of the link's owner.java.lang.StringgetUrl()URL of the shared link.inthashCode()static FileLinkMetadata.BuildernewBuilder(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions, java.util.Date clientModified, java.util.Date serverModified, java.lang.String rev, long size)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.-
Methods inherited from class com.dropbox.core.v2.sharing.SharedLinkMetadata
newBuilder
-
-
-
-
Constructor Detail
-
FileLinkMetadata
public FileLinkMetadata(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions, java.util.Date clientModified, java.util.Date serverModified, java.lang.String rev, long size, java.lang.String id, java.util.Date expires, java.lang.String pathLower, TeamMemberInfo teamMemberInfo, Team contentOwnerTeamInfo)The metadata of a file shared link.Use
newBuilder(java.lang.String,java.lang.String,com.dropbox.core.v2.sharing.LinkPermissions,java.util.Date,java.util.Date,java.lang.String,long)to create instances of this class without specifying values for all optional fields.- Parameters:
url- URL of the shared link. Must not benull.name- The linked file name (including extension). This never contains a slash. Must not benull.linkPermissions- The link's access permissions. Must not benull.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 benull.serverModified- The last time the file was modified on Dropbox. Must not benull.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 benull.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.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
FileLinkMetadata
public FileLinkMetadata(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions, java.util.Date clientModified, java.util.Date serverModified, java.lang.String rev, long size)The metadata of a file shared link.The default values for unset fields will be used.
- Parameters:
url- URL of the shared link. Must not benull.name- The linked file name (including extension). This never contains a slash. Must not benull.linkPermissions- The link's access permissions. Must not benull.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 benull.serverModified- The last time the file was modified on Dropbox. Must not benull.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 benull.size- The file size in bytes.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
-
Method Detail
-
getUrl
public java.lang.String getUrl()
URL of the shared link.- Overrides:
getUrlin classSharedLinkMetadata- Returns:
- value for this field, never
null.
-
getName
public java.lang.String getName()
The linked file name (including extension). This never contains a slash.- Overrides:
getNamein classSharedLinkMetadata- Returns:
- value for this field, never
null.
-
getLinkPermissions
public LinkPermissions getLinkPermissions()
The link's access permissions.- Overrides:
getLinkPermissionsin classSharedLinkMetadata- Returns:
- value for this field, never
null.
-
getClientModified
public java.util.Date getClientModified()
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.- Returns:
- value for this field, never
null.
-
getServerModified
public java.util.Date getServerModified()
The last time the file was modified on Dropbox.- Returns:
- value for this field, never
null.
-
getRev
public java.lang.String getRev()
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.- Returns:
- value for this field, never
null.
-
getSize
public long getSize()
The file size in bytes.- Returns:
- value for this field.
-
getId
public java.lang.String getId()
A unique identifier for the linked file.- Overrides:
getIdin classSharedLinkMetadata- Returns:
- value for this field, or
nullif not present.
-
getExpires
public java.util.Date getExpires()
Expiration time, if set. By default the link won't expire.- Overrides:
getExpiresin classSharedLinkMetadata- Returns:
- value for this field, or
nullif not present.
-
getPathLower
public java.lang.String getPathLower()
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.- Overrides:
getPathLowerin classSharedLinkMetadata- Returns:
- value for this field, or
nullif not present.
-
getTeamMemberInfo
public TeamMemberInfo getTeamMemberInfo()
The team membership information of the link's owner. This field will only be present if the link's owner is a team member.- Overrides:
getTeamMemberInfoin classSharedLinkMetadata- Returns:
- value for this field, or
nullif not present.
-
getContentOwnerTeamInfo
public Team getContentOwnerTeamInfo()
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.- Overrides:
getContentOwnerTeamInfoin classSharedLinkMetadata- Returns:
- value for this field, or
nullif not present.
-
newBuilder
public static FileLinkMetadata.Builder newBuilder(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions, java.util.Date clientModified, java.util.Date serverModified, java.lang.String rev, long size)
Returns a new builder for creating an instance of this class.- Parameters:
url- URL of the shared link. Must not benull.name- The linked file name (including extension). This never contains a slash. Must not benull.linkPermissions- The link's access permissions. Must not benull.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 benull.serverModified- The last time the file was modified on Dropbox. Must not benull.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 benull.size- The file size in bytes.- Returns:
- builder for this class.
- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSharedLinkMetadata
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classSharedLinkMetadata
-
toString
public java.lang.String toString()
- Overrides:
toStringin classSharedLinkMetadata
-
toStringMultiline
public java.lang.String toStringMultiline()
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Overrides:
toStringMultilinein classSharedLinkMetadata- Returns:
- Formatted, multiline String representation of this object
-
-