public final class LockFileError
extends java.lang.Object
isAbc()
methods will return true
. You can use tag()
to determine the
tag associated with this instance.
Open unions may be extended in the future with additional tags. If a new
tag is introduced that this SDK does not recognized, the OTHER
value
will be used.
Modifier and Type | Class and Description |
---|---|
static class |
LockFileError.Tag
Discriminating tag type for
LockFileError . |
Modifier and Type | Field and Description |
---|---|
static LockFileError |
CANNOT_BE_LOCKED
Item is a type that cannot be locked.
|
static LockFileError |
FILE_NOT_SHARED
Requested file is not currently shared.
|
static LockFileError |
INTERNAL_ERROR
Something went wrong with the job on Dropbox's end.
|
static LockFileError |
NO_WRITE_PERMISSION
The user does not have permissions to change the lock state or access the
file.
|
static LockFileError |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
static LockFileError |
TOO_MANY_FILES
There are too many files in one request.
|
static LockFileError |
TOO_MANY_WRITE_OPERATIONS
There are too many write operations in user's Dropbox.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
LockConflictError |
getLockConflictValue()
The user action conflicts with an existing lock on the file.
|
LookupError |
getPathLookupValue()
Could not find the specified resource.
|
int |
hashCode() |
boolean |
isCannotBeLocked()
|
boolean |
isFileNotShared()
|
boolean |
isInternalError()
|
boolean |
isLockConflict()
|
boolean |
isNoWritePermission()
|
boolean |
isOther()
|
boolean |
isPathLookup()
|
boolean |
isTooManyFiles()
|
boolean |
isTooManyWriteOperations()
Returns
true if this instance has the tag LockFileError.Tag.TOO_MANY_WRITE_OPERATIONS , false otherwise. |
static LockFileError |
lockConflict(LockConflictError value)
Returns an instance of
LockFileError that has its tag set to
LockFileError.Tag.LOCK_CONFLICT . |
static LockFileError |
pathLookup(LookupError value)
Returns an instance of
LockFileError that has its tag set to
LockFileError.Tag.PATH_LOOKUP . |
LockFileError.Tag |
tag()
Returns the tag for this instance.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
public static final LockFileError TOO_MANY_WRITE_OPERATIONS
public static final LockFileError TOO_MANY_FILES
public static final LockFileError NO_WRITE_PERMISSION
public static final LockFileError CANNOT_BE_LOCKED
public static final LockFileError FILE_NOT_SHARED
public static final LockFileError INTERNAL_ERROR
public static final LockFileError OTHER
Receiving a catch-all value typically indicates this SDK version is not up to date. Consider updating your SDK version to handle the new tags.
public LockFileError.Tag tag()
This class is a tagged union. Tagged unions instances are always
associated to a specific tag. This means only one of the isXyz()
methods will return true
. Callers are recommended to use the tag
value in a switch
statement to properly handle the different
values for this LockFileError
.
If a tag returned by the server is unrecognized by this SDK, the
LockFileError.Tag.OTHER
value will be used.
public boolean isPathLookup()
true
if this instance is tagged as LockFileError.Tag.PATH_LOOKUP
, false
otherwise.public static LockFileError pathLookup(LookupError value)
LockFileError
that has its tag set to
LockFileError.Tag.PATH_LOOKUP
.
Could not find the specified resource.
value
- value to assign to this instance.LockFileError
with its tag set to LockFileError.Tag.PATH_LOOKUP
.java.lang.IllegalArgumentException
- if value
is null
.public LookupError getPathLookupValue()
This instance must be tagged as LockFileError.Tag.PATH_LOOKUP
.
LookupError
value associated with this instance if
isPathLookup()
is true
.java.lang.IllegalStateException
- If isPathLookup()
is false
.public boolean isTooManyWriteOperations()
true
if this instance has the tag LockFileError.Tag.TOO_MANY_WRITE_OPERATIONS
, false
otherwise.true
if this instance is tagged as LockFileError.Tag.TOO_MANY_WRITE_OPERATIONS
, false
otherwise.public boolean isTooManyFiles()
true
if this instance is tagged as LockFileError.Tag.TOO_MANY_FILES
, false
otherwise.public boolean isNoWritePermission()
true
if this instance is tagged as LockFileError.Tag.NO_WRITE_PERMISSION
, false
otherwise.public boolean isCannotBeLocked()
true
if this instance is tagged as LockFileError.Tag.CANNOT_BE_LOCKED
, false
otherwise.public boolean isFileNotShared()
true
if this instance is tagged as LockFileError.Tag.FILE_NOT_SHARED
, false
otherwise.public boolean isLockConflict()
true
if this instance is tagged as LockFileError.Tag.LOCK_CONFLICT
, false
otherwise.public static LockFileError lockConflict(LockConflictError value)
LockFileError
that has its tag set to
LockFileError.Tag.LOCK_CONFLICT
.
The user action conflicts with an existing lock on the file.
value
- value to assign to this instance.LockFileError
with its tag set to LockFileError.Tag.LOCK_CONFLICT
.java.lang.IllegalArgumentException
- if value
is null
.public LockConflictError getLockConflictValue()
This instance must be tagged as LockFileError.Tag.LOCK_CONFLICT
.
LockConflictError
value associated with this instance
if isLockConflict()
is true
.java.lang.IllegalStateException
- If isLockConflict()
is false
.public boolean isInternalError()
true
if this instance is tagged as LockFileError.Tag.INTERNAL_ERROR
, false
otherwise.public boolean isOther()
true
if this instance is tagged as LockFileError.Tag.OTHER
,
false
otherwise.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.