Package com.dropbox.core.v2.files
Class Metadata
- java.lang.Object
- 
- com.dropbox.core.v2.files.Metadata
 
- 
- Direct Known Subclasses:
- DeletedMetadata,- FileMetadata,- FolderMetadata
 
 public class Metadata extends java.lang.ObjectMetadata for a file or folder.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classMetadata.BuilderBuilder forMetadata.
 - 
Field SummaryFields Modifier and Type Field Description protected java.lang.Stringnameprotected java.lang.StringparentSharedFolderIdprotected java.lang.StringpathDisplayprotected java.lang.StringpathLowerprotected java.lang.StringpreviewUrl
 - 
Constructor SummaryConstructors Constructor Description Metadata(java.lang.String name)Metadata for a file or folder.Metadata(java.lang.String name, java.lang.String pathLower, java.lang.String pathDisplay, java.lang.String parentSharedFolderId, java.lang.String previewUrl)Metadata for a file or folder.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetName()The last component of the path (including extension).java.lang.StringgetParentSharedFolderId()Please useFileSharingInfo.getParentSharedFolderId()orFolderSharingInfo.getParentSharedFolderId()instead.java.lang.StringgetPathDisplay()The cased path to be used for display purposes only.java.lang.StringgetPathLower()The lowercased full path in the user's Dropbox.java.lang.StringgetPreviewUrl()The preview URL of the file.inthashCode()static Metadata.BuildernewBuilder(java.lang.String name)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.
 
- 
- 
- 
Constructor Detail- 
Metadatapublic Metadata(java.lang.String name, java.lang.String pathLower, java.lang.String pathDisplay, java.lang.String parentSharedFolderId, java.lang.String previewUrl)Metadata for a file or folder.Use newBuilder(java.lang.String)to create instances of this class without specifying values for all optional fields.- Parameters:
- name- The last component of the path (including extension). This never contains a slash. Must not be- null.
- pathLower- The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.
- 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, and at least the last path component will have the correct casing. Changes to only the casing of paths won't be returned by- DbxAppFilesRequests.listFolderContinue(String). This field will be null if the file or folder is not mounted.
- parentSharedFolderId- Please use- FileSharingInfo.getParentSharedFolderId()or- FolderSharingInfo.getParentSharedFolderId()instead. Must match pattern "- [-_0-9a-zA-Z:]+".
- previewUrl- The preview URL of the file.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
Metadatapublic Metadata(java.lang.String name) Metadata for a file or folder.The default values for unset fields will be used. - Parameters:
- name- The last component of the path (including extension). This never contains a slash. Must not be- null.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String getName() The last component of the path (including extension). This never contains a slash.- Returns:
- value for this field, never null.
 
 - 
getPathLowerpublic java.lang.String getPathLower() The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.- 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, and at least the last path component will have the correct casing. Changes to only the casing of paths won't be returned byDbxAppFilesRequests.listFolderContinue(String). This field will be null if the file or folder is not mounted.- Returns:
- value for this field, or nullif not present.
 
 - 
getParentSharedFolderIdpublic java.lang.String getParentSharedFolderId() Please useFileSharingInfo.getParentSharedFolderId()orFolderSharingInfo.getParentSharedFolderId()instead.- Returns:
- value for this field, or nullif not present.
 
 - 
getPreviewUrlpublic java.lang.String getPreviewUrl() The preview URL of the file.- Returns:
- value for this field, or nullif not present.
 
 - 
newBuilderpublic static Metadata.Builder newBuilder(java.lang.String name) Returns a new builder for creating an instance of this class.- Parameters:
- name- The last component of the path (including extension). This never contains a slash. 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
 
 
- 
 
-