public final class SharePathError extends 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 |
SharePathError.Tag
Discriminating tag type for
SharePathError . |
Modifier and Type | Field and Description |
---|---|
static SharePathError |
CONTAINS_APP_FOLDER
We do not support shared folders that contain app folders.
|
static SharePathError |
CONTAINS_SHARED_FOLDER
We do not support shared folders that contain shared folders.
|
static SharePathError |
CONTAINS_TEAM_FOLDER
We do not support shared folders that contain team folders.
|
static SharePathError |
INSIDE_APP_FOLDER
We do not support sharing a folder inside an app folder.
|
static SharePathError |
INSIDE_OSX_PACKAGE
We do not support sharing a folder inside a Mac OS X package.
|
static SharePathError |
INSIDE_PUBLIC_FOLDER
A folder inside a public folder can't be shared this way.
|
static SharePathError |
INSIDE_SHARED_FOLDER
We do not support sharing a folder inside a shared folder.
|
static SharePathError |
INVALID_PATH
Path is not valid.
|
static SharePathError |
IS_APP_FOLDER
We do not support sharing an app folder.
|
static SharePathError |
IS_FILE
A file is at the specified path.
|
static SharePathError |
IS_OSX_PACKAGE
We do not support sharing a Mac OS X package.
|
static SharePathError |
IS_PUBLIC_FOLDER
A public folder can't be shared this way.
|
static SharePathError |
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
|
Modifier and Type | Method and Description |
---|---|
static SharePathError |
alreadyShared(SharedFolderMetadata value)
Returns an instance of
SharePathError that has its tag set to
SharePathError.Tag.ALREADY_SHARED . |
boolean |
equals(Object obj) |
SharedFolderMetadata |
getAlreadySharedValue()
Folder is already shared.
|
PathRootError |
getInvalidPathRootValue()
The path root parameter provided is invalid.
|
int |
hashCode() |
static SharePathError |
invalidPathRoot(PathRootError value)
Returns an instance of
SharePathError that has its tag set to
SharePathError.Tag.INVALID_PATH_ROOT . |
boolean |
isAlreadyShared()
|
boolean |
isContainsAppFolder()
|
boolean |
isContainsSharedFolder()
Returns
true if this instance has the tag SharePathError.Tag.CONTAINS_SHARED_FOLDER , false otherwise. |
boolean |
isContainsTeamFolder()
|
boolean |
isInsideAppFolder()
|
boolean |
isInsideOsxPackage()
|
boolean |
isInsidePublicFolder()
|
boolean |
isInsideSharedFolder()
|
boolean |
isInvalidPath()
|
boolean |
isInvalidPathRoot()
|
boolean |
isIsAppFolder()
|
boolean |
isIsFile()
|
boolean |
isIsOsxPackage()
|
boolean |
isIsPublicFolder()
|
boolean |
isOther()
|
SharePathError.Tag |
tag()
Returns the tag for this instance.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
public static final SharePathError IS_FILE
public static final SharePathError INSIDE_SHARED_FOLDER
public static final SharePathError CONTAINS_SHARED_FOLDER
public static final SharePathError CONTAINS_APP_FOLDER
public static final SharePathError CONTAINS_TEAM_FOLDER
public static final SharePathError IS_APP_FOLDER
public static final SharePathError INSIDE_APP_FOLDER
public static final SharePathError IS_PUBLIC_FOLDER
public static final SharePathError INSIDE_PUBLIC_FOLDER
public static final SharePathError INVALID_PATH
public static final SharePathError IS_OSX_PACKAGE
public static final SharePathError INSIDE_OSX_PACKAGE
public static final SharePathError 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 SharePathError.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 SharePathError
.
If a tag returned by the server is unrecognized by this SDK, the
SharePathError.Tag.OTHER
value will be used.
public boolean isIsFile()
true
if this instance is tagged as SharePathError.Tag.IS_FILE
,
false
otherwise.public boolean isInsideSharedFolder()
true
if this instance is tagged as SharePathError.Tag.INSIDE_SHARED_FOLDER
, false
otherwise.public boolean isContainsSharedFolder()
true
if this instance has the tag SharePathError.Tag.CONTAINS_SHARED_FOLDER
, false
otherwise.true
if this instance is tagged as SharePathError.Tag.CONTAINS_SHARED_FOLDER
, false
otherwise.public boolean isContainsAppFolder()
true
if this instance is tagged as SharePathError.Tag.CONTAINS_APP_FOLDER
, false
otherwise.public boolean isContainsTeamFolder()
true
if this instance is tagged as SharePathError.Tag.CONTAINS_TEAM_FOLDER
, false
otherwise.public boolean isIsAppFolder()
true
if this instance is tagged as SharePathError.Tag.IS_APP_FOLDER
, false
otherwise.public boolean isInsideAppFolder()
true
if this instance is tagged as SharePathError.Tag.INSIDE_APP_FOLDER
, false
otherwise.public boolean isIsPublicFolder()
true
if this instance is tagged as SharePathError.Tag.IS_PUBLIC_FOLDER
, false
otherwise.public boolean isInsidePublicFolder()
true
if this instance is tagged as SharePathError.Tag.INSIDE_PUBLIC_FOLDER
, false
otherwise.public boolean isAlreadyShared()
true
if this instance is tagged as SharePathError.Tag.ALREADY_SHARED
, false
otherwise.public static SharePathError alreadyShared(SharedFolderMetadata value)
SharePathError
that has its tag set to
SharePathError.Tag.ALREADY_SHARED
.
Folder is already shared. Contains metadata about the existing shared folder.
value
- value to assign to this instance.SharePathError
with its tag set to SharePathError.Tag.ALREADY_SHARED
.IllegalArgumentException
- if value
is null
.public SharedFolderMetadata getAlreadySharedValue()
This instance must be tagged as SharePathError.Tag.ALREADY_SHARED
.
SharedFolderMetadata
value associated with this
instance if isAlreadyShared()
is true
.IllegalStateException
- If isAlreadyShared()
is false
.public boolean isInvalidPath()
true
if this instance is tagged as SharePathError.Tag.INVALID_PATH
, false
otherwise.public boolean isIsOsxPackage()
true
if this instance is tagged as SharePathError.Tag.IS_OSX_PACKAGE
, false
otherwise.public boolean isInsideOsxPackage()
true
if this instance is tagged as SharePathError.Tag.INSIDE_OSX_PACKAGE
, false
otherwise.public boolean isInvalidPathRoot()
true
if this instance is tagged as SharePathError.Tag.INVALID_PATH_ROOT
, false
otherwise.public static SharePathError invalidPathRoot(PathRootError value)
SharePathError
that has its tag set to
SharePathError.Tag.INVALID_PATH_ROOT
.
The path root parameter provided is invalid.
value
- value to assign to this instance.SharePathError
with its tag set to SharePathError.Tag.INVALID_PATH_ROOT
.IllegalArgumentException
- if value
is null
.public PathRootError getInvalidPathRootValue()
This instance must be tagged as SharePathError.Tag.INVALID_PATH_ROOT
.
PathRootError
value associated with this instance if
isInvalidPathRoot()
is true
.IllegalStateException
- If isInvalidPathRoot()
is false
.public boolean isOther()
true
if this instance is tagged as SharePathError.Tag.OTHER
,
false
otherwise.public String toStringMultiline()
The returned String may contain newlines.