public abstract class DbxEntry extends Dumpable implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
DbxEntry.File
The subclass of
DbxEntry used to represent file metadata (as opposed
to folder metadata). |
static class |
DbxEntry.Folder
The subclass of
DbxEntry used to represent folder metadata. |
static class |
DbxEntry.WithChildren
Holds the metadata for a file or folder; if it's a folder, we also store the folder's
hash and the metadata of its immediate children.
|
static class |
DbxEntry.WithChildrenC<C>
The more general case of
DbxEntry.WithChildren . |
Modifier and Type | Field and Description |
---|---|
String |
iconName
The name of the icon to use for this file.
|
boolean |
mightHaveThumbnail
Whether this file or folder might have a thumbnail image you can retrieve via
the
DbxClientV1.getThumbnail call. |
String |
name
Just the last part of
path . |
String |
path
The path to the file or folder, relative to your application's root.
|
static JsonReader<DbxEntry> |
Reader |
static JsonReader<DbxEntry> |
ReaderMaybeDeleted |
static long |
serialVersionUID |
Modifier and Type | Method and Description |
---|---|
abstract DbxEntry.File |
asFile()
If this metadata entry is a file, return it as a
DbxEntry.File
instance. |
abstract DbxEntry.Folder |
asFolder()
If this metadata entry is a folder, return it as a
DbxEntry.Folder
instance. |
protected void |
dumpFields(DumpWriter w) |
abstract boolean |
isFile()
Whether this metadata is for a file, which can be cast to type
DbxEntry.File . |
abstract boolean |
isFolder()
Whether this metadata is for a folder, which can be cast to type
DbxEntry.Folder . |
protected boolean |
partialEquals(DbxEntry o) |
protected int |
partialHashCode() |
static <C> DbxEntry.WithChildrenC<C> |
read(com.fasterxml.jackson.core.JsonParser parser,
Collector<DbxEntry,? extends C> collector) |
static <C> DbxEntry.WithChildrenC<C> |
readMaybeDeleted(com.fasterxml.jackson.core.JsonParser parser,
Collector<DbxEntry,? extends C> collector) |
getTypeName, toString, toString, toStringMultiline, toStringMultiline
public static final long serialVersionUID
public final String name
DbxPathV1.getName(java.lang.String)
public final String path
"/"
.
For full-Dropbox apps, the path is relative to the root of the user's Dropbox. For App Folder apps, the path is relative to your application's App Folder within the user's Dropbox.
public final String iconName
/metadata
HTTP endpoint.public final boolean mightHaveThumbnail
DbxClientV1.getThumbnail
call.
If this is true
, there might be a thumbnail available. If this is
false
, there is definitely no thumbnail available.public static final JsonReader<DbxEntry> Reader
public static final JsonReader<DbxEntry> ReaderMaybeDeleted
protected void dumpFields(DumpWriter w)
dumpFields
in class Dumpable
public abstract boolean isFolder()
DbxEntry.Folder
. (Every metadata object is either for a file or a folder.)public abstract boolean isFile()
DbxEntry.File
. (Every metadata object is either for a file or a folder.)public abstract DbxEntry.Folder asFolder()
DbxEntry.Folder
instance. If it's not a folder, return null
.public abstract DbxEntry.File asFile()
DbxEntry.File
instance. If it's not a file, return null
.protected boolean partialEquals(DbxEntry o)
protected int partialHashCode()
public static <C> DbxEntry.WithChildrenC<C> readMaybeDeleted(com.fasterxml.jackson.core.JsonParser parser, Collector<DbxEntry,? extends C> collector) throws IOException, JsonReadException
IOException
JsonReadException
public static <C> DbxEntry.WithChildrenC<C> read(com.fasterxml.jackson.core.JsonParser parser, Collector<DbxEntry,? extends C> collector) throws IOException, JsonReadException
IOException
JsonReadException