public final class SharePathError
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 |
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 |
IS_VAULT
We do not support sharing the Vault folder.
|
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(java.lang.Object obj) |
SharedFolderMetadata |
getAlreadySharedValue()
Folder is already shared.
|
int |
hashCode() |
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 |
isIsAppFolder()
|
boolean |
isIsFile()
|
boolean |
isIsOsxPackage()
|
boolean |
isIsPublicFolder()
|
boolean |
isIsVault()
|
boolean |
isOther()
|
SharePathError.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 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 IS_VAULT
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
.java.lang.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
.java.lang.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 isIsVault()
true
if this instance is tagged as SharePathError.Tag.IS_VAULT
,
false
otherwise.public boolean isOther()
true
if this instance is tagged as SharePathError.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.