public class Metadata extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Metadata.Builder
Builder for
Metadata . |
Modifier and Type | Field and Description |
---|---|
protected String |
name |
protected String |
parentSharedFolderId |
protected String |
pathDisplay |
protected String |
pathLower |
Constructor and Description |
---|
Metadata(String name)
Metadata for a file or folder.
|
Metadata(String name,
String pathLower,
String pathDisplay,
String parentSharedFolderId)
Metadata for a file or folder.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getName()
The last component of the path (including extension).
|
String |
getParentSharedFolderId()
Deprecated.
|
String |
getPathDisplay()
The cased path to be used for display purposes only.
|
String |
getPathLower()
The lowercased full path in the user's Dropbox.
|
int |
hashCode() |
static Metadata.Builder |
newBuilder(String name)
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.
|
protected final String name
protected final String pathLower
protected final String pathDisplay
protected final String parentSharedFolderId
public Metadata(String name, String pathLower, String pathDisplay, String parentSharedFolderId)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
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. Changes to the casing of paths won't be returned by
DbxUserFilesRequests.listFolderContinue(String)
. This field
will be null if the file or folder is not mounted.parentSharedFolderId
- Deprecated. Please use FileSharingInfo.getParentSharedFolderId()
or FolderSharingInfo.getParentSharedFolderId()
instead. Must match
pattern "[-_0-9a-zA-Z:]+
".IllegalArgumentException
- If any argument does not meet its
preconditions.public Metadata(String name)
The default values for unset fields will be used.
name
- The last component of the path (including extension). This
never contains a slash. Must not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String getName()
null
.public String getPathLower()
null
if not present.public String getPathDisplay()
DbxUserFilesRequests.listFolderContinue(String)
. This field will be null
if the file or folder is not mounted.null
if not present.public String getParentSharedFolderId()
FileSharingInfo.getParentSharedFolderId()
or
FolderSharingInfo.getParentSharedFolderId()
instead.null
if not present.public static Metadata.Builder newBuilder(String name)
name
- The last component of the path (including extension). This
never contains a slash. Must not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String toStringMultiline()
The returned String may contain newlines.