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