Class SharePathError
- java.lang.Object
-
- com.dropbox.core.v2.sharing.SharePathError
-
public final class SharePathError extends java.lang.Object
This class is an open tagged union. Tagged unions instances are always associated to a specific tag. This means only one of theisAbc()
methods will returntrue
. You can usetag()
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SharePathError.Tag
Discriminating tag type forSharePathError
.
-
Field Summary
Fields Modifier and Type Field 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_FAMILY
We do not support sharing the Family 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
IS_VAULT_LOCKED
We do not support sharing a folder inside a locked Vault.static SharePathError
OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SharePathError
alreadyShared(SharedFolderMetadata value)
Returns an instance ofSharePathError
that has its tag set toSharePathError.Tag.ALREADY_SHARED
.boolean
equals(java.lang.Object obj)
SharedFolderMetadata
getAlreadySharedValue()
Folder is already shared.int
hashCode()
boolean
isAlreadyShared()
boolean
isContainsAppFolder()
boolean
isContainsSharedFolder()
Returnstrue
if this instance has the tagSharePathError.Tag.CONTAINS_SHARED_FOLDER
,false
otherwise.boolean
isContainsTeamFolder()
boolean
isInsideAppFolder()
boolean
isInsideOsxPackage()
boolean
isInsidePublicFolder()
boolean
isInsideSharedFolder()
boolean
isInvalidPath()
boolean
isIsAppFolder()
boolean
isIsFamily()
boolean
isIsFile()
boolean
isIsOsxPackage()
boolean
isIsPublicFolder()
boolean
isIsVault()
boolean
isIsVaultLocked()
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.
-
-
-
Field Detail
-
IS_FILE
public static final SharePathError IS_FILE
A file is at the specified path.
-
INSIDE_SHARED_FOLDER
public static final SharePathError INSIDE_SHARED_FOLDER
We do not support sharing a folder inside a shared folder.
-
CONTAINS_SHARED_FOLDER
public static final SharePathError CONTAINS_SHARED_FOLDER
We do not support shared folders that contain shared folders.
-
CONTAINS_APP_FOLDER
public static final SharePathError CONTAINS_APP_FOLDER
We do not support shared folders that contain app folders.
-
CONTAINS_TEAM_FOLDER
public static final SharePathError CONTAINS_TEAM_FOLDER
We do not support shared folders that contain team folders.
-
IS_APP_FOLDER
public static final SharePathError IS_APP_FOLDER
We do not support sharing an app folder.
-
INSIDE_APP_FOLDER
public static final SharePathError INSIDE_APP_FOLDER
We do not support sharing a folder inside an app folder.
-
IS_PUBLIC_FOLDER
public static final SharePathError IS_PUBLIC_FOLDER
A public folder can't be shared this way. Use a public link instead.
-
INSIDE_PUBLIC_FOLDER
public static final SharePathError INSIDE_PUBLIC_FOLDER
A folder inside a public folder can't be shared this way. Use a public link instead.
-
INVALID_PATH
public static final SharePathError INVALID_PATH
Path is not valid.
-
IS_OSX_PACKAGE
public static final SharePathError IS_OSX_PACKAGE
We do not support sharing a Mac OS X package.
-
INSIDE_OSX_PACKAGE
public static final SharePathError INSIDE_OSX_PACKAGE
We do not support sharing a folder inside a Mac OS X package.
-
IS_VAULT
public static final SharePathError IS_VAULT
We do not support sharing the Vault folder.
-
IS_VAULT_LOCKED
public static final SharePathError IS_VAULT_LOCKED
We do not support sharing a folder inside a locked Vault.
-
IS_FAMILY
public static final SharePathError IS_FAMILY
We do not support sharing the Family folder.
-
OTHER
public static final SharePathError OTHER
Catch-all used for unknown tag values returned by the Dropbox servers.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.
-
-
Method Detail
-
tag
public SharePathError.Tag tag()
Returns the tag for this instance.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 returntrue
. Callers are recommended to use the tag value in aswitch
statement to properly handle the different values for thisSharePathError
.If a tag returned by the server is unrecognized by this SDK, the
SharePathError.Tag.OTHER
value will be used.- Returns:
- the tag for this instance.
-
isIsFile
public boolean isIsFile()
- Returns:
true
if this instance is tagged asSharePathError.Tag.IS_FILE
,false
otherwise.
-
isInsideSharedFolder
public boolean isInsideSharedFolder()
- Returns:
true
if this instance is tagged asSharePathError.Tag.INSIDE_SHARED_FOLDER
,false
otherwise.
-
isContainsSharedFolder
public boolean isContainsSharedFolder()
Returnstrue
if this instance has the tagSharePathError.Tag.CONTAINS_SHARED_FOLDER
,false
otherwise.- Returns:
true
if this instance is tagged asSharePathError.Tag.CONTAINS_SHARED_FOLDER
,false
otherwise.
-
isContainsAppFolder
public boolean isContainsAppFolder()
- Returns:
true
if this instance is tagged asSharePathError.Tag.CONTAINS_APP_FOLDER
,false
otherwise.
-
isContainsTeamFolder
public boolean isContainsTeamFolder()
- Returns:
true
if this instance is tagged asSharePathError.Tag.CONTAINS_TEAM_FOLDER
,false
otherwise.
-
isIsAppFolder
public boolean isIsAppFolder()
- Returns:
true
if this instance is tagged asSharePathError.Tag.IS_APP_FOLDER
,false
otherwise.
-
isInsideAppFolder
public boolean isInsideAppFolder()
- Returns:
true
if this instance is tagged asSharePathError.Tag.INSIDE_APP_FOLDER
,false
otherwise.
-
isIsPublicFolder
public boolean isIsPublicFolder()
- Returns:
true
if this instance is tagged asSharePathError.Tag.IS_PUBLIC_FOLDER
,false
otherwise.
-
isInsidePublicFolder
public boolean isInsidePublicFolder()
- Returns:
true
if this instance is tagged asSharePathError.Tag.INSIDE_PUBLIC_FOLDER
,false
otherwise.
-
isAlreadyShared
public boolean isAlreadyShared()
- Returns:
true
if this instance is tagged asSharePathError.Tag.ALREADY_SHARED
,false
otherwise.
-
alreadyShared
public static SharePathError alreadyShared(SharedFolderMetadata value)
Returns an instance ofSharePathError
that has its tag set toSharePathError.Tag.ALREADY_SHARED
.Folder is already shared. Contains metadata about the existing shared folder.
- Parameters:
value
- value to assign to this instance.- Returns:
- Instance of
SharePathError
with its tag set toSharePathError.Tag.ALREADY_SHARED
. - Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
.
-
getAlreadySharedValue
public SharedFolderMetadata getAlreadySharedValue()
Folder is already shared. Contains metadata about the existing shared folder.This instance must be tagged as
SharePathError.Tag.ALREADY_SHARED
.- Returns:
- The
SharedFolderMetadata
value associated with this instance ifisAlreadyShared()
istrue
. - Throws:
java.lang.IllegalStateException
- IfisAlreadyShared()
isfalse
.
-
isInvalidPath
public boolean isInvalidPath()
- Returns:
true
if this instance is tagged asSharePathError.Tag.INVALID_PATH
,false
otherwise.
-
isIsOsxPackage
public boolean isIsOsxPackage()
- Returns:
true
if this instance is tagged asSharePathError.Tag.IS_OSX_PACKAGE
,false
otherwise.
-
isInsideOsxPackage
public boolean isInsideOsxPackage()
- Returns:
true
if this instance is tagged asSharePathError.Tag.INSIDE_OSX_PACKAGE
,false
otherwise.
-
isIsVault
public boolean isIsVault()
- Returns:
true
if this instance is tagged asSharePathError.Tag.IS_VAULT
,false
otherwise.
-
isIsVaultLocked
public boolean isIsVaultLocked()
- Returns:
true
if this instance is tagged asSharePathError.Tag.IS_VAULT_LOCKED
,false
otherwise.
-
isIsFamily
public boolean isIsFamily()
- Returns:
true
if this instance is tagged asSharePathError.Tag.IS_FAMILY
,false
otherwise.
-
isOther
public boolean isOther()
- Returns:
true
if this instance is tagged asSharePathError.Tag.OTHER
,false
otherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringMultiline
public java.lang.String toStringMultiline()
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Returns:
- Formatted, multiline String representation of this object
-
-