Class SharePathError
- java.lang.Object
-
- com.dropbox.core.v2.sharing.SharePathError
-
public final class SharePathError extends java.lang.ObjectThis 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
OTHERvalue will be used.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSharePathError.TagDiscriminating tag type forSharePathError.
-
Field Summary
Fields Modifier and Type Field Description static SharePathErrorCONTAINS_APP_FOLDERWe do not support shared folders that contain app folders.static SharePathErrorCONTAINS_SHARED_FOLDERWe do not support shared folders that contain shared folders.static SharePathErrorCONTAINS_TEAM_FOLDERWe do not support shared folders that contain team folders.static SharePathErrorINSIDE_APP_FOLDERWe do not support sharing a folder inside an app folder.static SharePathErrorINSIDE_OSX_PACKAGEWe do not support sharing a folder inside a Mac OS X package.static SharePathErrorINSIDE_PUBLIC_FOLDERA folder inside a public folder can't be shared this way.static SharePathErrorINSIDE_SHARED_FOLDERWe do not support sharing a folder inside a shared folder.static SharePathErrorINVALID_PATHPath is not valid.static SharePathErrorIS_APP_FOLDERWe do not support sharing an app folder.static SharePathErrorIS_FAMILYWe do not support sharing the Family folder.static SharePathErrorIS_FILEA file is at the specified path.static SharePathErrorIS_OSX_PACKAGEWe do not support sharing a Mac OS X package.static SharePathErrorIS_PUBLIC_FOLDERA public folder can't be shared this way.static SharePathErrorIS_VAULTWe do not support sharing the Vault folder.static SharePathErrorIS_VAULT_LOCKEDWe do not support sharing a folder inside a locked Vault.static SharePathErrorOTHERCatch-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 SharePathErroralreadyShared(SharedFolderMetadata value)Returns an instance ofSharePathErrorthat has its tag set toSharePathError.Tag.ALREADY_SHARED.booleanequals(java.lang.Object obj)SharedFolderMetadatagetAlreadySharedValue()Folder is already shared.inthashCode()booleanisAlreadyShared()booleanisContainsAppFolder()booleanisContainsSharedFolder()Returnstrueif this instance has the tagSharePathError.Tag.CONTAINS_SHARED_FOLDER,falseotherwise.booleanisContainsTeamFolder()booleanisInsideAppFolder()booleanisInsideOsxPackage()booleanisInsidePublicFolder()booleanisInsideSharedFolder()booleanisInvalidPath()booleanisIsAppFolder()booleanisIsFamily()booleanisIsFile()booleanisIsOsxPackage()booleanisIsPublicFolder()booleanisIsVault()booleanisIsVaultLocked()booleanisOther()SharePathError.Tagtag()Returns the tag for this instance.java.lang.StringtoString()java.lang.StringtoStringMultiline()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 aswitchstatement to properly handle the different values for thisSharePathError.If a tag returned by the server is unrecognized by this SDK, the
SharePathError.Tag.OTHERvalue will be used.- Returns:
- the tag for this instance.
-
isIsFile
public boolean isIsFile()
- Returns:
trueif this instance is tagged asSharePathError.Tag.IS_FILE,falseotherwise.
-
isInsideSharedFolder
public boolean isInsideSharedFolder()
- Returns:
trueif this instance is tagged asSharePathError.Tag.INSIDE_SHARED_FOLDER,falseotherwise.
-
isContainsSharedFolder
public boolean isContainsSharedFolder()
Returnstrueif this instance has the tagSharePathError.Tag.CONTAINS_SHARED_FOLDER,falseotherwise.- Returns:
trueif this instance is tagged asSharePathError.Tag.CONTAINS_SHARED_FOLDER,falseotherwise.
-
isContainsAppFolder
public boolean isContainsAppFolder()
- Returns:
trueif this instance is tagged asSharePathError.Tag.CONTAINS_APP_FOLDER,falseotherwise.
-
isContainsTeamFolder
public boolean isContainsTeamFolder()
- Returns:
trueif this instance is tagged asSharePathError.Tag.CONTAINS_TEAM_FOLDER,falseotherwise.
-
isIsAppFolder
public boolean isIsAppFolder()
- Returns:
trueif this instance is tagged asSharePathError.Tag.IS_APP_FOLDER,falseotherwise.
-
isInsideAppFolder
public boolean isInsideAppFolder()
- Returns:
trueif this instance is tagged asSharePathError.Tag.INSIDE_APP_FOLDER,falseotherwise.
-
isIsPublicFolder
public boolean isIsPublicFolder()
- Returns:
trueif this instance is tagged asSharePathError.Tag.IS_PUBLIC_FOLDER,falseotherwise.
-
isInsidePublicFolder
public boolean isInsidePublicFolder()
- Returns:
trueif this instance is tagged asSharePathError.Tag.INSIDE_PUBLIC_FOLDER,falseotherwise.
-
isAlreadyShared
public boolean isAlreadyShared()
- Returns:
trueif this instance is tagged asSharePathError.Tag.ALREADY_SHARED,falseotherwise.
-
alreadyShared
public static SharePathError alreadyShared(SharedFolderMetadata value)
Returns an instance ofSharePathErrorthat 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
SharePathErrorwith its tag set toSharePathError.Tag.ALREADY_SHARED. - Throws:
java.lang.IllegalArgumentException- ifvalueisnull.
-
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
SharedFolderMetadatavalue associated with this instance ifisAlreadyShared()istrue. - Throws:
java.lang.IllegalStateException- IfisAlreadyShared()isfalse.
-
isInvalidPath
public boolean isInvalidPath()
- Returns:
trueif this instance is tagged asSharePathError.Tag.INVALID_PATH,falseotherwise.
-
isIsOsxPackage
public boolean isIsOsxPackage()
- Returns:
trueif this instance is tagged asSharePathError.Tag.IS_OSX_PACKAGE,falseotherwise.
-
isInsideOsxPackage
public boolean isInsideOsxPackage()
- Returns:
trueif this instance is tagged asSharePathError.Tag.INSIDE_OSX_PACKAGE,falseotherwise.
-
isIsVault
public boolean isIsVault()
- Returns:
trueif this instance is tagged asSharePathError.Tag.IS_VAULT,falseotherwise.
-
isIsVaultLocked
public boolean isIsVaultLocked()
- Returns:
trueif this instance is tagged asSharePathError.Tag.IS_VAULT_LOCKED,falseotherwise.
-
isIsFamily
public boolean isIsFamily()
- Returns:
trueif this instance is tagged asSharePathError.Tag.IS_FAMILY,falseotherwise.
-
isOther
public boolean isOther()
- Returns:
trueif this instance is tagged asSharePathError.Tag.OTHER,falseotherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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
-
-