├── core ├── build │ └── generated_stone_source │ │ ├── main │ │ ├── log │ │ │ └── stone.log │ │ └── src │ │ │ └── com │ │ │ └── dropbox │ │ │ └── core │ │ │ └── v2 │ │ │ ├── async │ │ │ └── package-info.java │ │ │ ├── common │ │ │ └── package-info.java │ │ │ ├── seenstate │ │ │ └── package-info.java │ │ │ ├── teamcommon │ │ │ └── package-info.java │ │ │ ├── teampolicies │ │ │ └── package-info.java │ │ │ ├── secondaryemails │ │ │ └── package-info.java │ │ │ ├── userscommon │ │ │ └── package-info.java │ │ │ ├── team │ │ │ ├── package-info.java │ │ │ ├── GroupDeleteErrorException.java │ │ │ ├── GroupCreateErrorException.java │ │ │ ├── GroupsGetInfoErrorException.java │ │ │ ├── TeamFolderListErrorException.java │ │ │ ├── GroupUpdateErrorException.java │ │ │ ├── GroupsPollErrorException.java │ │ │ ├── ListTeamDevicesErrorException.java │ │ │ ├── MembersRemoveErrorException.java │ │ │ ├── TeamNamespacesListErrorException.java │ │ │ ├── MembersRecoverErrorException.java │ │ │ ├── SharingAllowlistAddErrorException.java │ │ │ ├── GroupSelectorErrorException.java │ │ │ ├── GroupsListContinueErrorException.java │ │ │ ├── ListTeamAppsErrorException.java │ │ │ ├── MembersSendWelcomeErrorException.java │ │ │ ├── MembersSuspendErrorException.java │ │ │ ├── MembersUnsuspendErrorException.java │ │ │ ├── TeamFolderActivateErrorException.java │ │ │ ├── TeamFolderRenameErrorException.java │ │ │ ├── LegalHoldsGetPolicyErrorException.java │ │ │ ├── ListMembersDevicesErrorException.java │ │ │ ├── SharingAllowlistRemoveErrorException.java │ │ │ ├── TeamFolderArchiveErrorException.java │ │ │ ├── ListMemberAppsErrorException.java │ │ │ ├── ListMemberDevicesErrorException.java │ │ │ ├── RevokeDeviceSessionErrorException.java │ │ │ ├── SharingAllowlistListErrorException.java │ │ │ ├── ListMembersAppsErrorException.java │ │ │ ├── RevokeLinkedAppErrorException.java │ │ │ ├── SetCustomQuotaErrorException.java │ │ │ ├── AddSecondaryEmailsErrorException.java │ │ │ ├── FeaturesGetValuesBatchErrorException.java │ │ │ ├── LegalHoldsListPoliciesErrorException.java │ │ │ ├── LegalHoldsPolicyUpdateErrorException.java │ │ │ ├── TeamFolderListContinueErrorException.java │ │ │ ├── ExcludedUsersListErrorException.java │ │ │ ├── GroupMembersAddErrorException.java │ │ │ ├── LegalHoldsPolicyReleaseErrorException.java │ │ │ └── MembersListErrorException.java │ │ │ ├── openid │ │ │ ├── package-info.java │ │ │ └── UserInfoErrorException.java │ │ │ ├── account │ │ │ ├── package-info.java │ │ │ └── SetProfilePhotoErrorException.java │ │ │ ├── contacts │ │ │ └── package-info.java │ │ │ ├── teamlog │ │ │ ├── package-info.java │ │ │ ├── GetTeamEventsErrorException.java │ │ │ └── GetTeamEventsContinueErrorException.java │ │ │ ├── auth │ │ │ ├── package-info.java │ │ │ └── TokenFromOAuth1ErrorException.java │ │ │ ├── check │ │ │ └── package-info.java │ │ │ ├── users │ │ │ ├── package-info.java │ │ │ ├── GetAccountErrorException.java │ │ │ └── GetAccountBatchErrorException.java │ │ │ ├── filerequests │ │ │ ├── package-info.java │ │ │ ├── GetFileRequestErrorException.java │ │ │ ├── CountFileRequestsErrorException.java │ │ │ ├── UpdateFileRequestErrorException.java │ │ │ ├── CreateFileRequestErrorException.java │ │ │ └── DeleteFileRequestErrorException.java │ │ │ ├── files │ │ │ ├── package-info.java │ │ │ ├── ExportErrorException.java │ │ │ ├── AddTagErrorException.java │ │ │ ├── RestoreErrorException.java │ │ │ ├── BaseTagErrorException.java │ │ │ ├── SaveUrlErrorException.java │ │ │ ├── DownloadErrorException.java │ │ │ ├── PreviewErrorException.java │ │ │ ├── ThumbnailErrorException.java │ │ │ ├── DownloadZipErrorException.java │ │ │ ├── GetMetadataErrorException.java │ │ │ ├── RemoveTagErrorException.java │ │ │ ├── ListRevisionsErrorException.java │ │ │ ├── ThumbnailV2ErrorException.java │ │ │ ├── PaperCreateErrorException.java │ │ │ ├── UploadSessionStartErrorException.java │ │ │ ├── AlphaGetMetadataErrorException.java │ │ │ ├── GetCopyReferenceErrorException.java │ │ │ ├── GetTemporaryLinkErrorException.java │ │ │ ├── ListFolderContinueErrorException.java │ │ │ ├── SaveCopyReferenceErrorException.java │ │ │ ├── GetThumbnailBatchErrorException.java │ │ │ ├── ListFolderLongpollErrorException.java │ │ │ ├── PaperUpdateErrorException.java │ │ │ └── UploadErrorException.java │ │ │ ├── sharing │ │ │ ├── package-info.java │ │ │ ├── MountFolderErrorException.java │ │ │ ├── ShareFolderErrorException.java │ │ │ ├── UnshareFileErrorException.java │ │ │ ├── ListSharedLinksErrorException.java │ │ │ ├── UnmountFolderErrorException.java │ │ │ ├── SharedLinkErrorException.java │ │ │ ├── GetSharedLinksErrorException.java │ │ │ ├── UnshareFolderErrorException.java │ │ │ ├── ListFileMembersErrorException.java │ │ │ ├── TransferFolderErrorException.java │ │ │ ├── AddFileMemberErrorException.java │ │ │ ├── CreateSharedLinkErrorException.java │ │ │ ├── RevokeSharedLinkErrorException.java │ │ │ ├── GetSharedLinkFileErrorException.java │ │ │ ├── UpdateFolderPolicyErrorException.java │ │ │ ├── AddFolderMemberErrorException.java │ │ │ ├── GetFileMetadataErrorException.java │ │ │ └── ListFilesContinueErrorException.java │ │ │ └── paper │ │ │ ├── package-info.java │ │ │ ├── ListDocsCursorErrorException.java │ │ │ ├── PaperFolderCreateErrorException.java │ │ │ ├── PaperDocCreateErrorException.java │ │ │ └── PaperDocUpdateErrorException.java │ │ └── test │ │ ├── log │ │ └── stone.log │ │ └── src │ │ └── com │ │ └── dropbox │ │ └── core │ │ └── stone │ │ ├── test │ │ └── package-info.java │ │ └── DbxClientV2Base.java ├── src │ ├── test │ │ ├── resources │ │ │ ├── test-image.jpeg │ │ │ ├── file.json │ │ │ ├── file-with-media-info-pending.json │ │ │ ├── file-with-video-info-null-fields.json │ │ │ ├── file-with-video-info.json │ │ │ └── file-with-photo-info.json │ │ ├── stone │ │ │ └── stone_cfg.stone │ │ └── java │ │ │ └── com │ │ │ └── dropbox │ │ │ └── core │ │ │ └── v2 │ │ │ └── files │ │ │ └── FilesSerializers.java │ └── main │ │ └── java │ │ └── com │ │ └── dropbox │ │ └── core │ │ ├── stone │ │ ├── UnionSerializer.java │ │ ├── StoneDeserializerLogger.java │ │ ├── StructSerializer.java │ │ └── CompositeSerializer.java │ │ ├── v2 │ │ └── callbacks │ │ │ ├── DbxNetworkErrorCallback.java │ │ │ ├── DbxRouteErrorCallback.java │ │ │ └── DbxGlobalCallbackFactory.java │ │ ├── BadRequestException.java │ │ ├── DbxSessionStore.java │ │ ├── RateLimitException.java │ │ ├── IncludeGrantedScopes.java │ │ ├── AccessErrorException.java │ │ ├── BadResponseException.java │ │ ├── PathRootErrorException.java │ │ ├── TokenAccessType.java │ │ ├── oauth │ │ └── DbxOAuthException.java │ │ ├── ProtocolException.java │ │ ├── BadResponseCodeException.java │ │ ├── DbxOAuth1AccessToken.java │ │ ├── InvalidAccessTokenException.java │ │ ├── util │ │ └── CountingOutputStream.java │ │ └── v1 │ │ └── DbxThumbnailSize.java ├── gradle.properties └── dependencies │ ├── runtimeClasspath.txt │ └── compileClasspath.txt ├── stone-java-gradle-plugin ├── README.md ├── settings.gradle ├── src │ └── main │ │ └── kotlin │ │ └── com │ │ └── dropbox │ │ └── stone │ │ └── java │ │ └── model │ │ ├── ClientSpec.kt │ │ └── StoneConfig.kt └── build.gradle.kts ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── examples ├── android │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── drawable-hdpi │ │ │ │ ├── dropbox_big.png │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_folder_blue_36dp.png │ │ │ │ ├── ic_photo_grey_600_36dp.png │ │ │ │ └── ic_insert_drive_file_blue_36dp.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_folder_blue_36dp.png │ │ │ │ ├── ic_photo_grey_600_36dp.png │ │ │ │ └── ic_insert_drive_file_blue_36dp.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_folder_blue_36dp.png │ │ │ │ ├── ic_photo_grey_600_36dp.png │ │ │ │ └── ic_insert_drive_file_blue_36dp.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_folder_blue_36dp.png │ │ │ │ ├── ic_photo_grey_600_36dp.png │ │ │ │ └── ic_insert_drive_file_blue_36dp.png │ │ │ ├── xml │ │ │ │ └── provider_paths.xml │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── themes.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── drawable │ │ │ │ ├── ic_file.xml │ │ │ │ └── ic_folder.xml │ │ │ └── layout │ │ │ │ ├── app_bar.xml │ │ │ │ ├── files_item.xml │ │ │ │ └── activity_files.xml │ │ │ └── java │ │ │ └── com │ │ │ └── dropbox │ │ │ └── core │ │ │ └── examples │ │ │ └── android │ │ │ ├── internal │ │ │ ├── api │ │ │ │ └── DropboxAppConfig.kt │ │ │ └── di │ │ │ │ ├── AppGraph.kt │ │ │ │ └── AppGraphImpl.kt │ │ │ └── DropboxAndroidSampleApplication.kt │ └── proguard-rules.pro ├── examples │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── dropbox │ │ │ │ └── core │ │ │ │ └── examples │ │ │ │ ├── tutorial │ │ │ │ ├── test.txt │ │ │ │ └── ReadMe.md │ │ │ │ ├── global_callbacks │ │ │ │ ├── DbxExampleLookupErrorCallback.java │ │ │ │ ├── DbxExampleListFolderErrorCallback.java │ │ │ │ ├── DbxExampleNetworkErrorCallback.java │ │ │ │ ├── ReadMe.md │ │ │ │ └── DbxExampleGlobalCallbackFactory.java │ │ │ │ └── web_file_browser │ │ │ │ └── User.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── dropbox │ │ │ └── core │ │ │ └── examples │ │ │ ├── TestUtil.kt │ │ │ ├── account_info │ │ │ ├── AccountInfoExampleTest.kt │ │ │ └── AccountInfoLegacyExampleTest.kt │ │ │ └── FileCreationUtils.kt │ └── build.gradle └── java │ ├── dependencies │ ├── compileClasspath.txt │ └── runtimeClasspath.txt │ ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── dropbox │ │ │ └── core │ │ │ └── examples │ │ │ └── account_info │ │ │ └── AccountInfoExampleTest.java │ └── main │ │ └── java │ │ └── com │ │ └── dropbox │ │ └── core │ │ └── examples │ │ └── account_info │ │ └── AccountInfoExample.java │ └── build.gradle ├── android ├── gradle.properties ├── README.md ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── dropbox │ │ │ └── core │ │ │ └── android │ │ │ └── internal │ │ │ ├── TokenType.kt │ │ │ ├── AuthParameters.kt │ │ │ └── TokenRequestAsyncTask.kt │ │ └── AndroidManifest.xml ├── dependencies │ └── releaseRuntimeClasspath.txt └── build.gradle ├── update-submodules ├── .gitmodules ├── scripts └── check-clean-git-status ├── proguard └── src │ └── main │ └── resources │ └── proguard │ └── application-rules.pro ├── settings.gradle ├── generate-ci-auth-file ├── gradle.properties └── License.txt /core/build/generated_stone_source/main/log/stone.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/test/log/stone.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /stone-java-gradle-plugin/README.md: -------------------------------------------------------------------------------- 1 | # Stone Gradle Plugin 2 | 3 | Used to generate Java Code from Stone API specs. -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /core/src/test/resources/test-image.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/core/src/test/resources/test-image.jpeg -------------------------------------------------------------------------------- /core/gradle.properties: -------------------------------------------------------------------------------- 1 | POM_ARTIFACT_ID = dropbox-core-sdk 2 | POM_NAME = Dropbox SDK Java 3 | POM_DESCRIPTION = A Java library to access Dropbox's HTTP-based Core API v2. 4 | -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-hdpi/dropbox_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-hdpi/dropbox_big.png -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-hdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-hdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-mdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-mdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-xhdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-xhdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | POM_ARTIFACT_ID = dropbox-android-sdk 2 | POM_NAME = Dropbox SDK for Android 3 | POM_DESCRIPTION = An Android client library to access Dropbox's HTTP-based Core API v2. 4 | -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-hdpi/ic_folder_blue_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-hdpi/ic_folder_blue_36dp.png -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-mdpi/ic_folder_blue_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-mdpi/ic_folder_blue_36dp.png -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-xhdpi/ic_folder_blue_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-xhdpi/ic_folder_blue_36dp.png -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-xxhdpi/ic_folder_blue_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-xxhdpi/ic_folder_blue_36dp.png -------------------------------------------------------------------------------- /examples/android/src/main/res/xml/provider_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-hdpi/ic_photo_grey_600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-hdpi/ic_photo_grey_600_36dp.png -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-mdpi/ic_photo_grey_600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-mdpi/ic_photo_grey_600_36dp.png -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-xhdpi/ic_photo_grey_600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-xhdpi/ic_photo_grey_600_36dp.png -------------------------------------------------------------------------------- /examples/examples/src/main/java/com/dropbox/core/examples/tutorial/test.txt: -------------------------------------------------------------------------------- 1 | Test upload file. 2 | 3 | See https://www.dropbox.com/developers/documentation/java#tutorial for the tutorial write-up. 4 | -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-xxhdpi/ic_photo_grey_600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-xxhdpi/ic_photo_grey_600_36dp.png -------------------------------------------------------------------------------- /update-submodules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | git submodule sync 5 | git submodule update --init 6 | git submodule foreach --recursive "git submodule sync ; git submodule update --init" 7 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/async/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | */ 6 | package com.dropbox.core.v2.async; 7 | 8 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/common/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | */ 6 | package com.dropbox.core.v2.common; 7 | 8 | -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-hdpi/ic_insert_drive_file_blue_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-hdpi/ic_insert_drive_file_blue_36dp.png -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-mdpi/ic_insert_drive_file_blue_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-mdpi/ic_insert_drive_file_blue_36dp.png -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-xhdpi/ic_insert_drive_file_blue_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-xhdpi/ic_insert_drive_file_blue_36dp.png -------------------------------------------------------------------------------- /android/README.md: -------------------------------------------------------------------------------- 1 | For 5.x, the source code in this folder is actually used from the `dropbox-sdk-java` module. 2 | 3 | In 6.x versions, we will have a standalone Android artifact, and that is why this folder is split apart. -------------------------------------------------------------------------------- /core/dependencies/runtimeClasspath.txt: -------------------------------------------------------------------------------- 1 | ch.randelshofer:fastdoubleparser:0.8.0 2 | com.fasterxml.jackson.core:jackson-core:2.15.0 3 | com.fasterxml.jackson:jackson-bom:2.15.0 4 | com.google.code.findbugs:jsr305:3.0.2 5 | -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable-xxhdpi/ic_insert_drive_file_blue_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dropbox-sdk-java/main/examples/android/src/main/res/drawable-xxhdpi/ic_insert_drive_file_blue_36dp.png -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/seenstate/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | */ 6 | package com.dropbox.core.v2.seenstate; 7 | 8 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/teamcommon/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | */ 6 | package com.dropbox.core.v2.teamcommon; 7 | 8 | -------------------------------------------------------------------------------- /examples/java/dependencies/compileClasspath.txt: -------------------------------------------------------------------------------- 1 | ch.randelshofer:fastdoubleparser:0.8.0 2 | com.fasterxml.jackson.core:jackson-core:2.15.0 3 | com.fasterxml.jackson:jackson-bom:2.15.0 4 | com.google.code.findbugs:jsr305:3.0.2 5 | -------------------------------------------------------------------------------- /examples/java/dependencies/runtimeClasspath.txt: -------------------------------------------------------------------------------- 1 | ch.randelshofer:fastdoubleparser:0.8.0 2 | com.fasterxml.jackson.core:jackson-core:2.15.0 3 | com.fasterxml.jackson:jackson-bom:2.15.0 4 | com.google.code.findbugs:jsr305:3.0.2 5 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/teampolicies/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | */ 6 | package com.dropbox.core.v2.teampolicies; 7 | 8 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/secondaryemails/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | */ 6 | package com.dropbox.core.v2.secondaryemails; 7 | 8 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "core/src/main/stone"] 2 | path = core/src/main/stone 3 | url = https://github.com/dropbox/dropbox-api-spec.git 4 | [submodule "core/stone"] 5 | path = core/stone 6 | url = https://github.com/dropbox/stone.git 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /stone-java-gradle-plugin/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.setName("stone-java-gradle-plugin") 2 | 3 | dependencyResolutionManagement { 4 | versionCatalogs { 5 | dropboxJavaSdkLibs { 6 | from(files("../gradle/dropboxJavaSdkLibs.versions.toml")) 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/userscommon/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * This namespace contains common data types used within the users namespace. 6 | */ 7 | package com.dropbox.core.v2.userscommon; 8 | 9 | -------------------------------------------------------------------------------- /android/src/main/java/com/dropbox/core/android/internal/TokenType.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.android.internal 2 | 3 | internal enum class TokenType(private val string: String) { 4 | OAUTH2("oauth2:"), OAUTH2CODE("oauth2code:"); 5 | 6 | override fun toString(): String { 7 | return string 8 | } 9 | } -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/stone/UnionSerializer.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.stone; 2 | 3 | import java.io.IOException; 4 | 5 | import com.fasterxml.jackson.core.JsonParseException; 6 | import com.fasterxml.jackson.core.JsonParser; 7 | 8 | public abstract class UnionSerializer extends CompositeSerializer {} 9 | -------------------------------------------------------------------------------- /scripts/check-clean-git-status: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | if [[ $(git status --porcelain) != '' ]]; then 3 | echo "Working directory is dirty. Please check that you committed any changes after running ./gradlew :generateStone"; 4 | git status 5 | exit 1 6 | else 7 | echo "Working directory is clean!" 8 | exit 0 9 | fi -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * See {@link com.dropbox.core.v2.team.DbxTeamTeamRequests} for a list of 6 | * possible requests for this namespace. 7 | */ 8 | package com.dropbox.core.v2.team; 9 | 10 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/openid/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * See {@link com.dropbox.core.v2.openid.DbxUserOpenidRequests} for a list of 6 | * possible requests for this namespace. 7 | */ 8 | package com.dropbox.core.v2.openid; 9 | 10 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/test/src/com/dropbox/core/stone/test/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * See {@link com.dropbox.core.stone.test.DbxTestTestRequests} for a list of 6 | * possible requests for this namespace. 7 | */ 8 | package com.dropbox.core.stone.test; 9 | 10 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/account/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * See {@link com.dropbox.core.v2.account.DbxUserAccountRequests} for a list of 6 | * possible requests for this namespace. 7 | */ 8 | package com.dropbox.core.v2.account; 9 | 10 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/contacts/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * See {@link com.dropbox.core.v2.contacts.DbxUserContactsRequests} for a list 6 | * of possible requests for this namespace. 7 | */ 8 | package com.dropbox.core.v2.contacts; 9 | 10 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/teamlog/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * See {@link com.dropbox.core.v2.teamlog.DbxTeamTeamLogRequests} for a list of 6 | * possible requests for this namespace. 7 | */ 8 | package com.dropbox.core.v2.teamlog; 9 | 10 | -------------------------------------------------------------------------------- /examples/android/src/main/java/com/dropbox/core/examples/android/internal/api/DropboxAppConfig.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.android.internal.api 2 | 3 | import com.dropbox.core.examples.android.BuildConfig 4 | 5 | class DropboxAppConfig( 6 | val apiKey: String = BuildConfig.DROPBOX_APP_KEY, 7 | val clientIdentifier: String = "db-${apiKey}" 8 | ) -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/v2/callbacks/DbxNetworkErrorCallback.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.v2.callbacks; 2 | 3 | import com.dropbox.core.DbxException; 4 | 5 | /** 6 | * Abstract class for network error callback. 7 | */ 8 | public abstract class DbxNetworkErrorCallback { 9 | public abstract void onNetworkError(DbxException networkError); 10 | } 11 | -------------------------------------------------------------------------------- /examples/examples/src/test/java/com/dropbox/core/examples/TestUtil.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples 2 | 3 | import java.io.File 4 | 5 | object TestUtil { 6 | fun isRunningInCI(): Boolean { 7 | val isRunningInCI = System.getenv("ci") == "true" 8 | println("isRunningInCI: $isRunningInCI") 9 | return isRunningInCI 10 | } 11 | 12 | } -------------------------------------------------------------------------------- /proguard/src/main/resources/proguard/application-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class com.dropbox.core.test.proguard.Main { *** main(...); } 2 | -keepattributes SourceFile,LineNumberTable 3 | 4 | -dontwarn okhttp3.** 5 | -dontwarn com.squareup.okhttp.** 6 | -dontwarn com.google.appengine.** 7 | -dontwarn com.dropbox**.android.** 8 | -dontwarn org.testng.** 9 | -dontwarn bsh.** 10 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/auth/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * See {@link com.dropbox.core.v2.auth.DbxAppAuthRequests}, {@link 6 | * com.dropbox.core.v2.auth.DbxUserAuthRequests} for a list of possible requests 7 | * for this namespace. 8 | */ 9 | package com.dropbox.core.v2.auth; 10 | 11 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/check/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * See {@link com.dropbox.core.v2.check.DbxAppCheckRequests}, {@link 6 | * com.dropbox.core.v2.check.DbxUserCheckRequests} for a list of possible 7 | * requests for this namespace. 8 | */ 9 | package com.dropbox.core.v2.check; 10 | 11 | -------------------------------------------------------------------------------- /examples/examples/src/main/java/com/dropbox/core/examples/tutorial/ReadMe.md: -------------------------------------------------------------------------------- 1 | # Tutorial Example 2 | 3 | This repo contains the example from our [online tutorial](https://www.dropbox.com/developers/documentation/java#tutorial). 4 | 5 | To run this example, please replace `""` in `Main.java` with your access token. See the online tutorial for more details on how to generate an access token. 6 | 7 | -------------------------------------------------------------------------------- /core/src/test/stone/stone_cfg.stone: -------------------------------------------------------------------------------- 1 | namespace stone_cfg 2 | 3 | struct Route 4 | host String = "api" 5 | "The server to make the request to. Valid values: api, content, 6 | and notify." 7 | style String = "rpc" 8 | "The RPC format to use for the request. Valid values: rpc, download, 9 | and upload." 10 | auth String = "auth" 11 | "Auth mode for the route." 12 | -------------------------------------------------------------------------------- /examples/android/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 36dp 7 | 16dp 8 | 9 | -------------------------------------------------------------------------------- /stone-java-gradle-plugin/src/main/kotlin/com/dropbox/stone/java/model/ClientSpec.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.stone.java.model 2 | 3 | import java.io.Serializable 4 | 5 | class ClientSpec( 6 | var name: String? = null, 7 | var javadoc: String? = null, 8 | var routeFilter: String? = null, 9 | var requestsClassnamePrefix: String? = null, 10 | var unusedClassesToGenerate: String? = null, 11 | ) : Serializable -------------------------------------------------------------------------------- /examples/android/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /examples/android/src/main/java/com/dropbox/core/examples/android/DropboxAndroidSampleApplication.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.android 2 | 3 | import android.app.Application 4 | import com.dropbox.core.examples.android.internal.di.AppGraph 5 | import com.dropbox.core.examples.android.internal.di.AppGraphImpl 6 | 7 | class DropboxAndroidSampleApplication : Application() { 8 | val appGraph: AppGraph = AppGraphImpl(this) 9 | } -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/users/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * This namespace contains endpoints and data types for user management. 6 | * 7 | *

See {@link com.dropbox.core.v2.users.DbxUserUsersRequests} for a list of 8 | * possible requests for this namespace.

9 | */ 10 | package com.dropbox.core.v2.users; 11 | 12 | -------------------------------------------------------------------------------- /stone-java-gradle-plugin/src/main/kotlin/com/dropbox/stone/java/model/StoneConfig.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.stone.java.model 2 | 3 | import java.io.Serializable 4 | 5 | class StoneConfig( 6 | var packageName: String = "com.dropbox.stone", 7 | var globalRouteFilter: String? = null, 8 | var dataTypesOnly: Boolean = false, 9 | var client: ClientSpec? = null, 10 | var routeWhitelistFilter: String? = null, 11 | ) : Serializable -------------------------------------------------------------------------------- /android/dependencies/releaseRuntimeClasspath.txt: -------------------------------------------------------------------------------- 1 | ch.randelshofer:fastdoubleparser:0.8.0 2 | com.fasterxml.jackson.core:jackson-core:2.15.0 3 | com.fasterxml.jackson:jackson-bom:2.15.0 4 | com.google.code.findbugs:jsr305:3.0.2 5 | org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21 6 | org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21 7 | org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 8 | org.jetbrains.kotlin:kotlin-stdlib:1.6.21 9 | org.jetbrains:annotations:13.0 10 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/filerequests/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * This namespace contains endpoints and data types for file request operations. 6 | * 7 | *

See {@link com.dropbox.core.v2.filerequests.DbxUserFileRequestsRequests} 8 | * for a list of possible requests for this namespace.

9 | */ 10 | package com.dropbox.core.v2.filerequests; 11 | 12 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/v2/callbacks/DbxRouteErrorCallback.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.v2.callbacks; 2 | 3 | /** 4 | * Interface for route error callback. 5 | */ 6 | public abstract class DbxRouteErrorCallback implements Runnable { 7 | private T routeError = null; 8 | 9 | public T getRouteError() { 10 | return routeError; 11 | } 12 | 13 | public void setRouteError(T routeError) { 14 | this.routeError = routeError; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * This namespace contains endpoints and data types for basic file operations. 6 | * 7 | *

See {@link com.dropbox.core.v2.files.DbxAppFilesRequests}, {@link 8 | * com.dropbox.core.v2.files.DbxUserFilesRequests} for a list of possible 9 | * requests for this namespace.

10 | */ 11 | package com.dropbox.core.v2.files; 12 | 13 | -------------------------------------------------------------------------------- /core/src/test/resources/file.json: -------------------------------------------------------------------------------- 1 | { 2 | "read_only": false, 3 | "revision": 64, 4 | "bytes": 339773, 5 | "thumb_exists": true, 6 | "rev": "400113f659", 7 | "modified": "Thu, 11 Apr 2013 17:05:17 +0000", 8 | "mime_type": "image/jpeg", 9 | "size": "331.8 KB", 10 | "path": "/Photos/Sample Album/Boston City Flow.jpg", 11 | "is_dir": false, 12 | "modifier": null, 13 | "root": "dropbox", 14 | "client_mtime": "Wed, 15 Sep 2010 14:06:02 +0000", 15 | "icon": "page_white_picture" 16 | } -------------------------------------------------------------------------------- /examples/android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Dropbox Java SDK Android Example 3 | Files 4 | Open With 5 | Login with Dropbox (OAuth2) 6 | Login with Dropbox (OAuth2 PKCE) 7 | Logout of Dropbox 8 | 9 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/BadRequestException.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | /** 4 | * This is what is thrown when the Dropbox server tells us that it didn't like something about our 5 | * request. This corresponds to the HTTP 400 status code. 6 | */ 7 | public class BadRequestException extends ProtocolException { 8 | private static final long serialVersionUID = 0; 9 | 10 | public BadRequestException(String requestId, String message) { 11 | super(requestId, message); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * This namespace contains endpoints and data types for creating and managing 6 | * shared links and shared folders. 7 | * 8 | *

See {@link com.dropbox.core.v2.sharing.DbxAppSharingRequests}, {@link 9 | * com.dropbox.core.v2.sharing.DbxUserSharingRequests} for a list of possible 10 | * requests for this namespace.

11 | */ 12 | package com.dropbox.core.v2.sharing; 13 | 14 | -------------------------------------------------------------------------------- /examples/android/src/main/java/com/dropbox/core/examples/android/internal/di/AppGraph.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.android.internal.di 2 | 3 | import com.dropbox.core.examples.android.internal.api.DropboxApiWrapper 4 | import com.dropbox.core.examples.android.internal.api.DropboxCredentialUtil 5 | import com.dropbox.core.examples.android.internal.api.DropboxOAuthUtil 6 | 7 | interface AppGraph { 8 | val dropboxCredentialUtil: DropboxCredentialUtil 9 | val dropboxOAuthUtil: DropboxOAuthUtil 10 | val dropboxApiWrapper: DropboxApiWrapper 11 | } -------------------------------------------------------------------------------- /examples/examples/src/main/java/com/dropbox/core/examples/global_callbacks/DbxExampleLookupErrorCallback.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.global_callbacks; 2 | 3 | import com.dropbox.core.v2.callbacks.DbxRouteErrorCallback; 4 | import com.dropbox.core.v2.files.LookupError; 5 | 6 | public class DbxExampleLookupErrorCallback extends DbxRouteErrorCallback { 7 | @Override 8 | public void run() { 9 | System.out.println("GLOBAL ROUTE ERROR HANDLER (LookupError): " + this.getRouteError() + "\n"); 10 | // do some work 11 | } 12 | } -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/DbxSessionStore.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | /*>>> import checkers.nullness.quals.Nullable; */ 4 | 5 | /** 6 | * An interface that lets you save, retrieve, and clear a single value in the user's web 7 | * session. 8 | * 9 | *
10 |  * If your web app uses the standard Java Servlet API, just use
11 |  * {@link DbxStandardSessionStore}.
12 |  * 
13 | */ 14 | public interface DbxSessionStore { 15 | public /*@Nullable*/String get(); 16 | public void set(String value); 17 | public void clear(); 18 | } 19 | -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable/ic_file.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /examples/examples/src/main/java/com/dropbox/core/examples/global_callbacks/DbxExampleListFolderErrorCallback.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.global_callbacks; 2 | 3 | import com.dropbox.core.v2.callbacks.DbxRouteErrorCallback; 4 | import com.dropbox.core.v2.files.ListFolderError; 5 | 6 | public class DbxExampleListFolderErrorCallback extends DbxRouteErrorCallback { 7 | @Override 8 | public void run() { 9 | System.out.println("GLOBAL ROUTE ERROR HANDLER (ListFolderError): " + this.getRouteError() + "\n"); 10 | // do some work 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /core/src/test/resources/file-with-media-info-pending.json: -------------------------------------------------------------------------------- 1 | { 2 | "read_only": false, 3 | "revision": 64, 4 | "bytes": 339773, 5 | "thumb_exists": true, 6 | "rev": "400113f659", 7 | "modified": "Thu, 11 Apr 2013 17:05:17 +0000", 8 | "mime_type": "image/jpeg", 9 | "size": "331.8 KB", 10 | "path": "/Photos/Sample Album/Boston City Flow.jpg", 11 | "is_dir": false, 12 | "modifier": null, 13 | "root": "dropbox", 14 | "client_mtime": "Wed, 15 Sep 2010 14:06:02 +0000", 15 | "icon": "page_white_picture", 16 | "video_info": "pending", 17 | "photo_info": "pending" 18 | } 19 | -------------------------------------------------------------------------------- /examples/examples/src/main/java/com/dropbox/core/examples/web_file_browser/User.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.web_file_browser; 2 | 3 | /** 4 | * A database record for a user of our web app. 5 | */ 6 | public class User 7 | { 8 | public String username; 9 | 10 | /** 11 | * If this user has allowed us (the Web File Browser app) to "link" to his Dropbox 12 | * account, then we save the Dropbox access token here. This access token 13 | * will let us use the Dropbox API with his account. 14 | */ 15 | public String dropboxAccessToken; 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/RateLimitException.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | import java.util.concurrent.TimeUnit; 4 | 5 | /** 6 | * The server is overloaded, or you have hit a rate limit. Try again later after the designated 7 | * backoff (see {@link #getBackoffMillis}). 8 | */ 9 | public class RateLimitException extends RetryException { 10 | private static final long serialVersionUID = 0L; 11 | 12 | public RateLimitException(String requestId, String message, long backoff, TimeUnit unit) { 13 | super(requestId, message, backoff, unit); 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /examples/android/src/main/res/layout/app_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | -------------------------------------------------------------------------------- /examples/android/src/main/res/drawable/ic_folder.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core/src/test/resources/file-with-video-info-null-fields.json: -------------------------------------------------------------------------------- 1 | { 2 | "rev": "1b610113f659", 3 | "thumb_exists": false, 4 | "path": "/videos/test.AVI", 5 | "is_dir": false, 6 | "client_mtime": "Fri, 20 Mar 2015 17:45:56 +0000", 7 | "icon": "page_white_film", 8 | "read_only": false, 9 | "modifier": null, 10 | "bytes": 802996, 11 | "modified": "Fri, 20 Mar 2015 17:45:56 +0000", 12 | "video_info": { 13 | "duration": null, 14 | "lat_long": null, 15 | "time_taken": null 16 | }, 17 | "size": "784.2 KB", 18 | "root": "dropbox", 19 | "mime_type": "video/x-msvideo", 20 | "revision": 7009 21 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':android' 2 | include ':core' 3 | include ':examples:android' 4 | include ':examples:examples' 5 | include ':examples:java' 6 | include ':proguard' 7 | 8 | dependencyResolutionManagement { 9 | versionCatalogs { 10 | dropboxJavaSdkLibs { 11 | from(files("gradle/dropboxJavaSdkLibs.versions.toml")) 12 | } 13 | } 14 | repositories { 15 | mavenCentral() 16 | google() 17 | } 18 | } 19 | 20 | includeBuild("stone-java-gradle-plugin") { 21 | dependencySubstitution { 22 | substitute module('com.dropbox.gradle.plugins:stone-java-gradle-plugin') 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /generate-ci-auth-file: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | if [[ -z "${REFRESH_TOKEN}" ]]; then 5 | echo "REFRESH_TOKEN is not set. If this is running in CI, it's because secrets are not passed to forks." 6 | exit 2; 7 | fi 8 | 9 | curl https://api.dropbox.com/oauth2/token \ 10 | -d grant_type=refresh_token \ 11 | -d refresh_token=$REFRESH_TOKEN \ 12 | -d client_id=$APP_KEY > auth_output 13 | 14 | truncate -s -1 auth_output 15 | 16 | echo ", \ 17 | \"app_key\": \"$APP_KEY\", \ 18 | \"app_secret\": \"$APP_SECRET\", \ 19 | \"refresh_token\": \"$REFRESH_TOKEN\", \ 20 | \"expires_at\": 1 \ 21 | }" >> auth_output 22 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/IncludeGrantedScopes.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | /** 4 | * If this field is present, Dropbox server will return a token with all scopes user previously 5 | * granted your app. 6 | * Non-mobile apps use it in {@link DbxWebAuth}. 7 | * Mobile apps use it in {@link com.dropbox.core.android.Auth} 8 | */ 9 | public enum IncludeGrantedScopes { 10 | /** 11 | * Use it in user flow. 12 | */ 13 | USER, 14 | /** 15 | * Use it in team flow. 16 | */ 17 | TEAM; 18 | 19 | @Override 20 | public String toString() { 21 | return this.name().toLowerCase(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/AccessErrorException.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | import com.dropbox.core.v2.auth.AccessError; 4 | 5 | /** 6 | * Gets thrown when invalid access occurs. 7 | */ 8 | public class AccessErrorException extends DbxException { 9 | private static final long serialVersionUID = 0; 10 | 11 | private final AccessError accessError; 12 | 13 | public AccessError getAccessError() { 14 | return accessError; 15 | } 16 | 17 | public AccessErrorException(String requestId, String message, AccessError accessError) { 18 | super(requestId, message); 19 | this.accessError = accessError; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/BadResponseException.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | /** 4 | * Thrown when we the response from the Dropbox server isn't something we expect. 5 | * For example, if the JSON returned by the server is malformed or missing fields. 6 | */ 7 | public class BadResponseException extends ProtocolException { 8 | private static final long serialVersionUID = 0; 9 | 10 | public BadResponseException(String requestId, String message) { 11 | super(requestId, message); 12 | } 13 | 14 | public BadResponseException(String requestId, String message, Throwable cause) { 15 | super(requestId, message, cause); 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/PathRootErrorException.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | import com.dropbox.core.v2.common.PathRootError; 4 | 5 | /** 6 | * Gets thrown when an invalid path rood is supplied. 7 | */ 8 | public class PathRootErrorException extends DbxException { 9 | private static final long serialVersionUID = 0; 10 | 11 | private final PathRootError pathRootError; 12 | 13 | public PathRootError getPathRootError() { 14 | return pathRootError; 15 | } 16 | 17 | public PathRootErrorException(String requestId, String message, PathRootError pathRootError) { 18 | super(requestId, message); 19 | this.pathRootError = pathRootError; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /core/src/test/resources/file-with-video-info.json: -------------------------------------------------------------------------------- 1 | { 2 | "read_only": false, 3 | "revision": 64, 4 | "bytes": 339773, 5 | "thumb_exists": true, 6 | "rev": "400113f659", 7 | "modified": "Thu, 11 Apr 2013 17:05:17 +0000", 8 | "mime_type": "image/jpeg", 9 | "size": "331.8 KB", 10 | "path": "/Photos/Sample Album/Boston City Flow.jpg", 11 | "video_info": { 12 | "lat_long": [ 13 | 37.77256666666666, 14 | -122.45934166666667 15 | ], 16 | "time_taken": "Wed, 28 Aug 2013 18:12:02 +0000", 17 | "duration": 666 18 | }, 19 | "is_dir": false, 20 | "modifier": null, 21 | "root": "dropbox", 22 | "client_mtime": "Wed, 15 Sep 2010 14:06:02 +0000", 23 | "icon": "page_white_picture" 24 | } -------------------------------------------------------------------------------- /core/src/test/resources/file-with-photo-info.json: -------------------------------------------------------------------------------- 1 | { 2 | "read_only": false, 3 | "revision": 64, 4 | "bytes": 339773, 5 | "thumb_exists": true, 6 | "rev": "400113f659", 7 | "modified": "Thu, 11 Apr 2013 17:05:17 +0000", 8 | "mime_type": "image/jpeg", 9 | "size": "331.8 KB", 10 | "path": "/Photos/Sample Album/Boston City Flow.jpg", 11 | "photo_info": { 12 | "lat_long": [ 13 | 37.77256666666666, 14 | -122.45934166666667 15 | ], 16 | "time_taken": "Wed, 28 Aug 2013 18:12:02 +0000", 17 | "image_dimensions": "todo..." 18 | }, 19 | "is_dir": false, 20 | "modifier": null, 21 | "root": "dropbox", 22 | "client_mtime": "Wed, 15 Sep 2010 14:06:02 +0000", 23 | "icon": "page_white_picture" 24 | } -------------------------------------------------------------------------------- /examples/java/src/test/java/com/dropbox/core/examples/account_info/AccountInfoExampleTest.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.account_info; 2 | 3 | import static org.junit.Assume.assumeTrue; 4 | 5 | import com.dropbox.core.examples.CredentialsUtil; 6 | 7 | import org.junit.Before; 8 | import org.junit.Test; 9 | 10 | public class AccountInfoExampleTest { 11 | 12 | @Before 13 | public void setup() { 14 | // Only run if this is running in CI 15 | Boolean isRunningInCI = System.getenv("ci").equals("true"); 16 | assumeTrue(isRunningInCI); 17 | } 18 | 19 | @Test 20 | public void accountInfo() { 21 | new AccountInfoExample().runExample(CredentialsUtil.getDbxCredential()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/examples/src/main/java/com/dropbox/core/examples/global_callbacks/DbxExampleNetworkErrorCallback.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.global_callbacks; 2 | 3 | import com.dropbox.core.v2.callbacks.DbxNetworkErrorCallback; 4 | import com.dropbox.core.DbxException; 5 | import com.dropbox.core.InvalidAccessTokenException; 6 | 7 | public class DbxExampleNetworkErrorCallback extends DbxNetworkErrorCallback { 8 | @Override 9 | public void onNetworkError(DbxException networkError) { 10 | if (networkError instanceof InvalidAccessTokenException) { 11 | System.out.println("GLOBAL NETWORK ERROR HANDLER (InvalidAccessTokenException): " + networkError + "\n"); 12 | // do some work 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/TokenAccessType.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | /** 4 | * Whether or not to include refresh token in {@link DbxAuthFinish} 5 | * Non-mobile apps use it in {@link DbxWebAuth}. 6 | * Mobile apps use it in {@link com.dropbox.core.android.Auth} 7 | */ 8 | public enum TokenAccessType{ 9 | /** 10 | * Auth result only contains short live token. 11 | */ 12 | ONLINE("online"), 13 | /** 14 | * auth result includes both short live token. 15 | */ 16 | OFFLINE("offline"); 17 | 18 | private String string; 19 | 20 | TokenAccessType(String string) { 21 | this.string = string; 22 | } 23 | 24 | @Override 25 | public String toString() { 26 | return string; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /stone-java-gradle-plugin/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | group = "com.dropbox.gradle.plugins" 6 | version = "1.0-SNAPSHOT" 7 | 8 | repositories { 9 | mavenCentral() 10 | google() 11 | gradlePluginPortal() 12 | } 13 | 14 | dependencies { 15 | implementation(dropboxJavaSdkLibs.kotlin.gradle.plugin) 16 | } 17 | 18 | gradlePlugin { 19 | plugins { 20 | fun createPlugin(id: String, className: String) { 21 | plugins.create(id) { 22 | this.id = id 23 | implementationClass = className 24 | } 25 | } 26 | createPlugin( 27 | id = "com.dropbox.stone.java", 28 | className = "com.dropbox.stone.java.StonePlugin" 29 | ) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /core/src/test/java/com/dropbox/core/v2/files/FilesSerializers.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.v2.files; 2 | 3 | import static org.testng.Assert.fail; 4 | 5 | import com.dropbox.core.stone.StoneSerializer; 6 | 7 | /** 8 | * Since serializers are often package private, expose them through 9 | * this utility class. 10 | */ 11 | public final class FilesSerializers { 12 | @SuppressWarnings("unchecked") 13 | public static StoneSerializer serializer(Class dataType) { 14 | if (Metadata.class.isAssignableFrom(dataType)) { 15 | return (StoneSerializer) Metadata.Serializer.INSTANCE; 16 | } else { 17 | fail("Required serializer not added to FilesSerializers: " + dataType); 18 | return null; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /android/src/main/java/com/dropbox/core/android/internal/AuthParameters.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.android.internal 2 | 3 | import com.dropbox.core.DbxHost 4 | import com.dropbox.core.DbxRequestConfig 5 | import com.dropbox.core.IncludeGrantedScopes 6 | import com.dropbox.core.TokenAccessType 7 | 8 | /** Temporary storage for parameters before Activity is created */ 9 | internal data class AuthParameters( 10 | val sAppKey: String?, 11 | val sApiType: String?, 12 | val sDesiredUid: String?, 13 | val sAlreadyAuthedUids: List, 14 | val sSessionId: String?, 15 | val sTokenAccessType: TokenAccessType?, 16 | val sRequestConfig: DbxRequestConfig?, 17 | val sHost: DbxHost?, 18 | val sScope: String?, 19 | val sIncludeGrantedScopes: IncludeGrantedScopes?, 20 | ) 21 | -------------------------------------------------------------------------------- /core/dependencies/compileClasspath.txt: -------------------------------------------------------------------------------- 1 | com.fasterxml.jackson.core:jackson-core:2.7.9 2 | com.google.android:android:4.1.1.4 3 | com.google.appengine:appengine-api-1.0-sdk:1.9.38 4 | com.squareup.okhttp3:okhttp:4.0.0 5 | com.squareup.okhttp:okhttp:2.7.5 6 | com.squareup.okio:okio:2.2.2 7 | commons-codec:commons-codec:1.3 8 | commons-logging:commons-logging:1.1.1 9 | javax.servlet:servlet-api:2.5 10 | org.apache.httpcomponents:httpclient:4.0.1 11 | org.apache.httpcomponents:httpcore:4.0.1 12 | org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21 13 | org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21 14 | org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 15 | org.jetbrains.kotlin:kotlin-stdlib:1.6.21 16 | org.jetbrains:annotations:13.0 17 | org.json:json:20080701 18 | org.khronos:opengl-api:gl1.1-android-2.1_r1 19 | xerces:xmlParserAPIs:2.6.2 20 | xpp3:xpp3:1.1.4c 21 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/paper/package-info.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | /** 5 | * This namespace contains endpoints and data types for managing docs and 6 | * folders in Dropbox Paper. New Paper users will see docs they create in their 7 | * filesystem as '.paper' files alongside their other Dropbox content. The 8 | * /paper endpoints are being deprecated and you'll need to use /files and 9 | * /sharing endpoints to interact with their Paper content. Read more in the Paper 11 | * Migration Guide. 12 | * 13 | *

See {@link com.dropbox.core.v2.paper.DbxUserPaperRequests} for a list of 14 | * possible requests for this namespace.

15 | */ 16 | package com.dropbox.core.v2.paper; 17 | 18 | -------------------------------------------------------------------------------- /examples/java/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("java") 3 | id("com.dropbox.dependency-guard") 4 | } 5 | 6 | dependencyGuard { 7 | configuration("compileClasspath") 8 | configuration("runtimeClasspath") 9 | } 10 | 11 | description = 'Java Examples' 12 | 13 | java { 14 | sourceCompatibility = JavaVersion.VERSION_1_8 15 | targetCompatibility = JavaVersion.VERSION_1_8 16 | } 17 | 18 | dependencies { 19 | implementation(project(":core")) 20 | 21 | testImplementation(dropboxJavaSdkLibs.test.junit) 22 | } 23 | 24 | tasks.named("test", Test).configure { 25 | // Uses the "ci" gradle property and sets it as an environment variable for the test 26 | environment("ci", project.findProperty("ci")) 27 | 28 | // Ensure that tests are always run because integration tests are non-deterministic 29 | outputs.upToDateWhen { false } 30 | } 31 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # POM 2 | GROUP = com.dropbox.core 3 | VERSION_NAME=7.1.0-SNAPSHOT 4 | 5 | POM_URL = https://github.com/dropbox/dropbox-sdk-java/ 6 | POM_SCM_URL = https://github.com/dropbox/dropbox-sdk-java/ 7 | POM_SCM_CONNECTION = scm:git:https://github.com/dropbox/dropbox-sdk-java.git 8 | POM_SCM_DEV_CONNECTION = scm:git:git@github.com:dropbox/dropbox-sdk-java.git 9 | 10 | POM_LICENCE_NAME = MIT 11 | POM_LICENCE_URL = http://opensource.org/licenses/MIT 12 | POM_LICENCE_DIST = repo 13 | 14 | POM_DEVELOPER_ID = dropbox-api-team 15 | POM_DEVELOPER_NAME = Dropbox API Team 16 | POM_DEVELOPER_URL = https://github.com/dropbox/ 17 | POM_DEVELOPER_EMAIL = api-support@dropbox.com 18 | 19 | org.gradle.unsafe.configuration-cache=true 20 | org.gradle.caching=true 21 | 22 | # Use AndroidX 23 | android.useAndroidX=true 24 | 25 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 26 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/oauth/DbxOAuthException.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.oauth; 2 | 3 | import com.dropbox.core.DbxException; 4 | 5 | /** 6 | * 7 | * This exception means OAuth endpoint has thrown error. 8 | */ 9 | public class DbxOAuthException extends DbxException { 10 | private static final long serialVersionUID = 0L; 11 | private final DbxOAuthError dbxOAuthError; 12 | 13 | public DbxOAuthException(String requestId, DbxOAuthError dbxOAuthError) { 14 | super(requestId, dbxOAuthError.getErrorDescription()); 15 | this.dbxOAuthError = dbxOAuthError; 16 | } 17 | 18 | /** 19 | * Get the wrapped {@link DbxOAuthError} to tell what error has been thrown. 20 | * @return {@link DbxOAuthError} contains what error has been thrown. 21 | */ 22 | public DbxOAuthError getDbxOAuthError() { 23 | return dbxOAuthError; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /examples/android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FF000000 4 | #FFFFFFFF 5 | #0061FF 6 | #003FA5 7 | #FFE7AA 8 | #FDD571 9 | 10 | #FFFFFFFF 11 | #FF007EE5 12 | #FF0078d9 13 | @color/dbx_primary 14 | @color/dbx_primary 15 | @color/dbx_primary_dark 16 | @color/dbx_primary 17 | -------------------------------------------------------------------------------- /examples/examples/src/test/java/com/dropbox/core/examples/account_info/AccountInfoExampleTest.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.account_info 2 | 3 | import com.dropbox.core.examples.CredentialsUtil 4 | import com.dropbox.core.examples.TestUtil 5 | import org.junit.Assume.assumeTrue 6 | import org.junit.Before 7 | import org.junit.Test 8 | 9 | /** 10 | * An example command-line application that grab access token and refresh token from credential 11 | * file, and then call APIV2. If the access token has expired, SDK will automatically refresh and 12 | * get a new one, and store them into the original DbxCredential object. 13 | */ 14 | class AccountInfoExampleTest { 15 | 16 | @Before 17 | fun setup() { 18 | assumeTrue(TestUtil.isRunningInCI()) 19 | } 20 | @Test 21 | fun accountInfo() { 22 | AccountInfoExample.runExample(CredentialsUtil.getDbxCredential()) 23 | } 24 | } -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/stone/StoneDeserializerLogger.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.stone; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class StoneDeserializerLogger { 7 | public static Map, LoggerCallback> LOGGER_MAP = 8 | new HashMap, LoggerCallback>(); 9 | 10 | public static void registerCallback(Class c, LoggerCallback callback) { 11 | LOGGER_MAP.put(c, callback); 12 | } 13 | 14 | public static void log(Object value, String multiLineLog) { 15 | Class c = value.getClass(); 16 | 17 | if (LOGGER_MAP.containsKey(c)) { 18 | LoggerCallback callback = LOGGER_MAP.get(c); 19 | callback.invoke(value, multiLineLog); 20 | } 21 | } 22 | 23 | public interface LoggerCallback { 24 | public void invoke(Object value, String multiLineLog); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/android/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/ProtocolException.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | /** 4 | * Something unexpected happened with either the request or the response. 5 | * This can happen if there's a bug in the client code (including this 6 | * library), if there's a bug in on the Dropbox server, or if Dropbox 7 | * made a change to the API that changed the behavior of something and 8 | * we haven't upgraded our SDK yet. 9 | * 10 | *

11 | * Typically, these kinds of exceptions should be logged, so you can 12 | * investigate later. 13 | *

14 | */ 15 | public abstract class ProtocolException extends DbxException { 16 | private static final long serialVersionUID = 0; 17 | 18 | public ProtocolException(String requestId, String message) { 19 | super(requestId, message); 20 | } 21 | 22 | public ProtocolException(String requestId, String message, Throwable cause) { 23 | super(requestId, message, cause); 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /examples/examples/src/main/java/com/dropbox/core/examples/global_callbacks/ReadMe.md: -------------------------------------------------------------------------------- 1 | # Global Handlers Example 2 | 3 | This repo contains an advanced use-case example (global route error and network error response callbacks). 4 | 5 | Client can supply a callback factory, which allows for consistent, global handling of route-specific error types, as well as general network errors. 6 | 7 | Normally, error handling is done on a request-by-request basis. However, it is convenient to handle some error behavior consistently, regardless of the request or the endpoint. 8 | 9 | For implementing global error handling for general networking errors like an auth error, `getNetworkErrorCallback` should be implemented. For implementing global error handling for route-specific errors, one of the `getRouteErrorCallback` should be implemented. 10 | 11 | To run this example, please replace `""` in `Main.java` with your access token. See the online tutorial for more details on how to generate an access token. 12 | -------------------------------------------------------------------------------- /examples/examples/src/test/java/com/dropbox/core/examples/account_info/AccountInfoLegacyExampleTest.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.account_info 2 | 3 | import com.dropbox.core.examples.CredentialsUtil 4 | import com.dropbox.core.examples.TestUtil 5 | import com.dropbox.core.examples.account_info_legacy.AccountInfoLegacyExample 6 | import org.junit.Assume.assumeTrue 7 | import org.junit.Before 8 | import org.junit.Test 9 | 10 | /** 11 | * An example command-line application that grab access token and refresh token from credential 12 | * file, and then call APIV2. If the access token has expired, SDK will automatically refresh and 13 | * get a new one, and store them into the original DbxCredential object. 14 | */ 15 | class AccountInfoLegacyExampleTest { 16 | 17 | @Before 18 | fun setup() { 19 | assumeTrue(TestUtil.isRunningInCI()) 20 | } 21 | 22 | @Test 23 | fun accountInfo() { 24 | AccountInfoLegacyExample.runExample(CredentialsUtil.getAuthInfo()) 25 | } 26 | } -------------------------------------------------------------------------------- /core/build/generated_stone_source/test/src/com/dropbox/core/stone/DbxClientV2Base.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.stone; 5 | 6 | import com.dropbox.core.stone.test.DbxTestTestRequests; 7 | import com.dropbox.core.v2.DbxRawClientV2; 8 | 9 | /** 10 | * TestClass. 11 | */ 12 | public class DbxClientV2Base { 13 | protected final DbxRawClientV2 _client; 14 | 15 | private final DbxTestTestRequests test; 16 | 17 | /** 18 | * For internal use only. 19 | * 20 | * @param _client Raw v2 client to use for issuing requests 21 | */ 22 | protected DbxClientV2Base(DbxRawClientV2 _client) { 23 | this._client = _client; 24 | this.test = new DbxTestTestRequests(_client); 25 | } 26 | 27 | /** 28 | * Returns client for issuing requests in the {@code "test"} namespace. 29 | * 30 | * @return Dropbox test client 31 | */ 32 | public DbxTestTestRequests test() { 33 | return test; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/stone/StructSerializer.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.stone; 2 | 3 | import java.io.IOException; 4 | 5 | import com.fasterxml.jackson.core.JsonGenerationException; 6 | import com.fasterxml.jackson.core.JsonGenerator; 7 | import com.fasterxml.jackson.core.JsonParseException; 8 | import com.fasterxml.jackson.core.JsonParser; 9 | 10 | public abstract class StructSerializer extends CompositeSerializer { 11 | 12 | @Override 13 | public void serialize(T value, JsonGenerator g) throws IOException, JsonGenerationException { 14 | serialize(value, g, false); 15 | } 16 | 17 | public abstract void serialize(T value, JsonGenerator g, boolean collapse) throws IOException, JsonGenerationException; 18 | 19 | @Override 20 | public T deserialize(JsonParser p) throws IOException, JsonParseException { 21 | return deserialize(p, false); 22 | } 23 | 24 | public abstract T deserialize(JsonParser p, boolean collapsed) throws IOException, JsonParseException; 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/BadResponseCodeException.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | /** 4 | * Thrown when the Dropbox server responds with an HTTP status code we didn't expect. 5 | */ 6 | public class BadResponseCodeException extends BadResponseException { 7 | private static final long serialVersionUID = 0L; 8 | 9 | private final int statusCode; 10 | 11 | public BadResponseCodeException(String requestId, String message, int statusCode) { 12 | super(requestId, message); 13 | this.statusCode = statusCode; 14 | } 15 | 16 | public BadResponseCodeException(String requestId, String message, int statusCode, Throwable cause) { 17 | super(requestId, message, cause); 18 | this.statusCode = statusCode; 19 | } 20 | 21 | /** 22 | * Returns HTTP status code received from the Dropbox server. 23 | * 24 | * @return HTTP status code returned by Dropbox server 25 | */ 26 | public int getStatusCode() { 27 | return statusCode; 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | import com.vanniktech.maven.publish.SonatypeHost 2 | 3 | plugins { 4 | id 'com.android.library' 5 | id 'org.jetbrains.kotlin.android' 6 | id "org.jetbrains.kotlinx.binary-compatibility-validator" 7 | id "com.vanniktech.maven.publish" 8 | id "com.github.ben-manes.versions" 9 | id "com.dropbox.dependency-guard" 10 | } 11 | 12 | android { 13 | namespace = "com.dropbox.core.sdk.android" 14 | compileSdk dropboxJavaSdkLibs.versions.android.compile.sdk.get().toInteger() 15 | defaultConfig { 16 | minSdk dropboxJavaSdkLibs.versions.android.min.sdk.get().toInteger() 17 | targetSdk dropboxJavaSdkLibs.versions.android.target.sdk.get().toInteger() 18 | } 19 | 20 | kotlinOptions { 21 | freeCompilerArgs += '-Xexplicit-api=strict' 22 | } 23 | } 24 | 25 | dependencies { 26 | api(project(path: ":core", configuration: "withoutOsgi")) 27 | } 28 | 29 | dependencyGuard { 30 | configuration("releaseRuntimeClasspath") 31 | } 32 | 33 | mavenPublishing { 34 | publishToMavenCentral(SonatypeHost.S01) 35 | signAllPublications() 36 | } -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/DbxOAuth1AccessToken.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | /** 4 | * Use with {@link DbxOAuth1Upgrader} to convert old OAuth 1 access tokens 5 | * to OAuth 2 access tokens. This SDK doesn't support using OAuth 1 access 6 | * tokens for regular API calls. 7 | */ 8 | public final class DbxOAuth1AccessToken { 9 | private final String key; 10 | private final String secret; 11 | 12 | /** 13 | * @param key OAuth 1 access token key 14 | * @param secret OAuth 2 access token secret 15 | */ 16 | public DbxOAuth1AccessToken(String key, String secret) { 17 | this.key = key; 18 | this.secret = secret; 19 | } 20 | 21 | /** 22 | * Returns the OAuth 1 access token key. 23 | * 24 | * @return OAuth 1 access token key 25 | */ 26 | public String getKey() { 27 | return key; 28 | } 29 | 30 | /** 31 | * Returns the OAuth 1 access token secret. 32 | * 33 | * @return OAuth 1 access token secret 34 | */ 35 | public String getSecret() { 36 | return secret; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /examples/examples/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("java") 3 | id("kotlin") 4 | } 5 | 6 | description = 'Consolidated Examples' 7 | 8 | java { 9 | sourceCompatibility = JavaVersion.VERSION_1_8 10 | targetCompatibility = JavaVersion.VERSION_1_8 11 | } 12 | 13 | dependencies { 14 | implementation(project(":core")) 15 | implementation(dropboxJavaSdkLibs.apache.commons.lang) 16 | implementation(dropboxJavaSdkLibs.jackson.core) 17 | implementation(dropboxJavaSdkLibs.jackson.databind) 18 | implementation(dropboxJavaSdkLibs.jakarta.servlet.api) 19 | implementation(dropboxJavaSdkLibs.jetty.server) 20 | implementation(dropboxJavaSdkLibs.json) 21 | implementation(dropboxJavaSdkLibs.okhttp3) 22 | 23 | testImplementation(dropboxJavaSdkLibs.test.junit) 24 | } 25 | 26 | tasks.named("test", Test).configure { 27 | // Uses the "ci" gradle property and sets it as an environment variable for the test 28 | environment("ci", project.findProperty("ci")) 29 | 30 | // Ensure that tests are always run because integration tests are non-deterministic 31 | outputs.upToDateWhen { false } 32 | } 33 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/v2/callbacks/DbxGlobalCallbackFactory.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.v2.callbacks; 2 | 3 | /** 4 | * Client should implement methods in this class to allow for consistent, global handling of route-specific error types, 5 | * as well as general network errors. Normally, error handling is done on a request-by-request basis. 6 | * However, it is convenient to handle some error behavior consistently, regardless of the request or the endpoint. 7 | * For implementing global error handling for general networking errors like an auth error, `createNetworkErrorCallback` 8 | * should be implemented. For implementing global error handling for route-specific errors, the 9 | * `createRouteErrorCallback` should be implemented. 10 | */ 11 | public interface DbxGlobalCallbackFactory { 12 | // Should instantiate separate callback object on each method invocation 13 | DbxRouteErrorCallback createRouteErrorCallback(String userId, T routeError); 14 | 15 | // Should instantiate separate callback object on each method invocation 16 | DbxNetworkErrorCallback createNetworkErrorCallback(String userId); 17 | } 18 | -------------------------------------------------------------------------------- /examples/android/src/main/res/layout/files_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 19 | 20 | 28 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2021 Dropbox Inc., http://www.dropbox.com/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /examples/examples/src/main/java/com/dropbox/core/examples/global_callbacks/DbxExampleGlobalCallbackFactory.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.global_callbacks; 2 | 3 | import com.dropbox.core.v2.callbacks.DbxGlobalCallbackFactory; 4 | import com.dropbox.core.v2.callbacks.DbxRouteErrorCallback; 5 | import com.dropbox.core.v2.callbacks.DbxNetworkErrorCallback; 6 | import com.dropbox.core.v2.files.ListFolderError; 7 | import com.dropbox.core.v2.files.LookupError; 8 | 9 | public class DbxExampleGlobalCallbackFactory implements DbxGlobalCallbackFactory { 10 | @Override 11 | public DbxRouteErrorCallback createRouteErrorCallback(String userId, T routeError) { 12 | if (routeError instanceof ListFolderError) { 13 | return new DbxExampleListFolderErrorCallback(); 14 | } else if (routeError instanceof LookupError) { 15 | return new DbxExampleLookupErrorCallback(); 16 | } 17 | 18 | return null; 19 | } 20 | 21 | @Override 22 | public DbxExampleNetworkErrorCallback createNetworkErrorCallback(String userId) { 23 | return new DbxExampleNetworkErrorCallback(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/InvalidAccessTokenException.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core; 2 | 3 | import com.dropbox.core.v2.auth.AuthError; 4 | 5 | /** 6 | * Gets thrown when the access token you're using to make API calls is invalid. 7 | * 8 | *

9 | * A more typical situation is that your access token was valid, but the 10 | * user has since "unlinked" your application via the Dropbox website 11 | * (http://www.dropbox.com/account#applications). 12 | * When a user unlinks your application, your access tokens for that user become 13 | * invalid. You can re-run the authorization process to obtain a new access token. 14 | *

15 | */ 16 | public class InvalidAccessTokenException extends DbxException { 17 | private static final long serialVersionUID = 0; 18 | private AuthError authError; 19 | 20 | public InvalidAccessTokenException(String requestId, String message, AuthError authError) { 21 | super(requestId, message); 22 | this.authError = authError; 23 | } 24 | 25 | public AuthError getAuthError() { 26 | return this.authError; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /examples/android/src/main/java/com/dropbox/core/examples/android/internal/di/AppGraphImpl.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.android.internal.di; 2 | 3 | import android.content.Context 4 | import com.dropbox.core.examples.android.internal.api.DropboxApiWrapper 5 | import com.dropbox.core.examples.android.internal.api.DropboxAppConfig 6 | import com.dropbox.core.examples.android.internal.api.DropboxCredentialUtil 7 | import com.dropbox.core.examples.android.internal.api.DropboxOAuthUtil 8 | 9 | internal class AppGraphImpl(context: Context) : AppGraph { 10 | private val dropboxAppConfig = DropboxAppConfig() 11 | 12 | override val dropboxCredentialUtil by lazy { DropboxCredentialUtil(context.applicationContext) } 13 | 14 | override val dropboxOAuthUtil by lazy { 15 | DropboxOAuthUtil( 16 | dropboxAppConfig = dropboxAppConfig, 17 | dropboxCredentialUtil = dropboxCredentialUtil 18 | ) 19 | } 20 | 21 | override val dropboxApiWrapper 22 | get() = DropboxApiWrapper( 23 | dbxCredential = dropboxCredentialUtil.readCredentialLocally()!!, 24 | clientIdentifier = dropboxAppConfig.clientIdentifier 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /android/src/main/java/com/dropbox/core/android/internal/TokenRequestAsyncTask.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.android.internal; 2 | 3 | import android.os.AsyncTask 4 | import android.util.Log 5 | import com.dropbox.core.DbxAuthFinish 6 | import com.dropbox.core.DbxException 7 | import com.dropbox.core.DbxHost 8 | import com.dropbox.core.DbxPKCEManager 9 | import com.dropbox.core.DbxRequestConfig 10 | 11 | internal class TokenRequestAsyncTask( 12 | private val code: String, 13 | private val mPKCEManager: DbxPKCEManager, 14 | private val requestConfig: DbxRequestConfig, 15 | private val appKey: String, 16 | private val host: DbxHost, 17 | ) : AsyncTask() { 18 | 19 | override fun doInBackground(vararg params: Void?): DbxAuthFinish? { 20 | return try { 21 | val redirectUri = null 22 | mPKCEManager.makeTokenRequest(requestConfig, code, appKey, redirectUri, host) 23 | } catch (e: DbxException) { 24 | Log.e(TAG, "Token Request Failed: " + e.message) 25 | null 26 | } 27 | } 28 | 29 | companion object { 30 | private val TAG: String = TokenRequestAsyncTask::class.java.simpleName 31 | } 32 | } -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/openid/UserInfoErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.openid; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link UserInfoError} error. 11 | * 12 | *

This exception is raised by {@link DbxUserOpenidRequests#userinfo}.

13 | */ 14 | public class UserInfoErrorException extends DbxApiException { 15 | // exception for routes: 16 | // 2/openid/userinfo 17 | 18 | private static final long serialVersionUID = 0L; 19 | 20 | /** 21 | * The error reported by {@link DbxUserOpenidRequests#userinfo}. 22 | */ 23 | public final UserInfoError errorValue; 24 | 25 | public UserInfoErrorException(String routeName, String requestId, LocalizedText userMessage, UserInfoError errorValue) { 26 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 27 | if (errorValue == null) { 28 | throw new NullPointerException("errorValue"); 29 | } 30 | this.errorValue = errorValue; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/ExportErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ExportError} error. 11 | * 12 | *

This exception is raised by {@link 13 | * DbxUserFilesRequests#export(String,String)}.

14 | */ 15 | public class ExportErrorException extends DbxApiException { 16 | // exception for routes: 17 | // 2/files/export 18 | 19 | private static final long serialVersionUID = 0L; 20 | 21 | /** 22 | * The error reported by {@link DbxUserFilesRequests#export(String,String)}. 23 | */ 24 | public final ExportError errorValue; 25 | 26 | public ExportErrorException(String routeName, String requestId, LocalizedText userMessage, ExportError errorValue) { 27 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 28 | if (errorValue == null) { 29 | throw new NullPointerException("errorValue"); 30 | } 31 | this.errorValue = errorValue; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /examples/java/src/main/java/com/dropbox/core/examples/account_info/AccountInfoExample.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples.account_info; 2 | 3 | import com.dropbox.core.DbxException; 4 | import com.dropbox.core.DbxRequestConfig; 5 | import com.dropbox.core.examples.CredentialsUtil; 6 | import com.dropbox.core.oauth.DbxCredential; 7 | import com.dropbox.core.v2.DbxClientV2; 8 | import com.dropbox.core.v2.users.FullAccount; 9 | 10 | 11 | public final class AccountInfoExample { 12 | 13 | public static void main(String[] args) { 14 | DbxCredential credential = CredentialsUtil.getDbxCredential(); 15 | new AccountInfoExample().runExample(credential); 16 | } 17 | 18 | public void runExample(DbxCredential credential) { 19 | DbxRequestConfig requestConfig = new DbxRequestConfig("examples-account-info"); 20 | DbxClientV2 dbxClient = new DbxClientV2(requestConfig, credential); 21 | 22 | try { 23 | FullAccount dbxAccountInfo = dbxClient.users().getCurrentAccount(); 24 | System.out.println(dbxAccountInfo.toStringMultiline()); 25 | } catch (DbxException ex) { 26 | throw new RuntimeException("Error making API call: " + ex.getMessage()); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/AddTagErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link AddTagError} error. 11 | * 12 | *

This exception is raised by {@link 13 | * DbxUserFilesRequests#tagsAdd(String,String)}.

14 | */ 15 | public class AddTagErrorException extends DbxApiException { 16 | // exception for routes: 17 | // 2/files/tags/add 18 | 19 | private static final long serialVersionUID = 0L; 20 | 21 | /** 22 | * The error reported by {@link 23 | * DbxUserFilesRequests#tagsAdd(String,String)}. 24 | */ 25 | public final AddTagError errorValue; 26 | 27 | public AddTagErrorException(String routeName, String requestId, LocalizedText userMessage, AddTagError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/RestoreErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link RestoreError} error. 11 | * 12 | *

This exception is raised by {@link 13 | * DbxUserFilesRequests#restore(String,String)}.

14 | */ 15 | public class RestoreErrorException extends DbxApiException { 16 | // exception for routes: 17 | // 2/files/restore 18 | 19 | private static final long serialVersionUID = 0L; 20 | 21 | /** 22 | * The error reported by {@link 23 | * DbxUserFilesRequests#restore(String,String)}. 24 | */ 25 | public final RestoreError errorValue; 26 | 27 | public RestoreErrorException(String routeName, String requestId, LocalizedText userMessage, RestoreError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/BaseTagErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link BaseTagError} error. 11 | * 12 | *

This exception is raised by {@link 13 | * DbxUserFilesRequests#tagsGet(java.util.List)}.

14 | */ 15 | public class BaseTagErrorException extends DbxApiException { 16 | // exception for routes: 17 | // 2/files/tags/get 18 | 19 | private static final long serialVersionUID = 0L; 20 | 21 | /** 22 | * The error reported by {@link 23 | * DbxUserFilesRequests#tagsGet(java.util.List)}. 24 | */ 25 | public final BaseTagError errorValue; 26 | 27 | public BaseTagErrorException(String routeName, String requestId, LocalizedText userMessage, BaseTagError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/SaveUrlErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link SaveUrlError} error. 11 | * 12 | *

This exception is raised by {@link 13 | * DbxUserFilesRequests#saveUrl(String,String)}.

14 | */ 15 | public class SaveUrlErrorException extends DbxApiException { 16 | // exception for routes: 17 | // 2/files/save_url 18 | 19 | private static final long serialVersionUID = 0L; 20 | 21 | /** 22 | * The error reported by {@link 23 | * DbxUserFilesRequests#saveUrl(String,String)}. 24 | */ 25 | public final SaveUrlError errorValue; 26 | 27 | public SaveUrlErrorException(String routeName, String requestId, LocalizedText userMessage, SaveUrlError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/GroupDeleteErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GroupDeleteError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link DbxTeamTeamRequests#groupsDelete}. 14 | *

15 | */ 16 | public class GroupDeleteErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/groups/delete 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxTeamTeamRequests#groupsDelete}. 24 | */ 25 | public final GroupDeleteError errorValue; 26 | 27 | public GroupDeleteErrorException(String routeName, String requestId, LocalizedText userMessage, GroupDeleteError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /examples/android/src/main/res/layout/activity_files.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 14 | 15 | 19 | 20 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/DownloadErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link DownloadError} error. 11 | * 12 | *

This exception is raised by {@link 13 | * DbxUserFilesRequests#download(String,String)}.

14 | */ 15 | public class DownloadErrorException extends DbxApiException { 16 | // exception for routes: 17 | // 2/files/download 18 | 19 | private static final long serialVersionUID = 0L; 20 | 21 | /** 22 | * The error reported by {@link 23 | * DbxUserFilesRequests#download(String,String)}. 24 | */ 25 | public final DownloadError errorValue; 26 | 27 | public DownloadErrorException(String routeName, String requestId, LocalizedText userMessage, DownloadError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/PreviewErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link PreviewError} error. 11 | * 12 | *

This exception is raised by {@link 13 | * DbxUserFilesRequests#getPreview(String,String)}.

14 | */ 15 | public class PreviewErrorException extends DbxApiException { 16 | // exception for routes: 17 | // 2/files/get_preview 18 | 19 | private static final long serialVersionUID = 0L; 20 | 21 | /** 22 | * The error reported by {@link 23 | * DbxUserFilesRequests#getPreview(String,String)}. 24 | */ 25 | public final PreviewError errorValue; 26 | 27 | public PreviewErrorException(String routeName, String requestId, LocalizedText userMessage, PreviewError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/ThumbnailErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ThumbnailError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#getThumbnail(String)}.

15 | */ 16 | public class ThumbnailErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/get_thumbnail 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserFilesRequests#getThumbnail(String)}. 24 | */ 25 | public final ThumbnailError errorValue; 26 | 27 | public ThumbnailErrorException(String routeName, String requestId, LocalizedText userMessage, ThumbnailError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/users/GetAccountErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.users; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GetAccountError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserUsersRequests#getAccount(String)}.

15 | */ 16 | public class GetAccountErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/users/get_account 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserUsersRequests#getAccount(String)}. 24 | */ 25 | public final GetAccountError errorValue; 26 | 27 | public GetAccountErrorException(String routeName, String requestId, LocalizedText userMessage, GetAccountError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/DownloadZipErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link DownloadZipError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#downloadZip(String)}.

15 | */ 16 | public class DownloadZipErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/download_zip 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserFilesRequests#downloadZip(String)}. 24 | */ 25 | public final DownloadZipError errorValue; 26 | 27 | public DownloadZipErrorException(String routeName, String requestId, LocalizedText userMessage, DownloadZipError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/GetMetadataErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GetMetadataError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#getMetadata(String)}.

15 | */ 16 | public class GetMetadataErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/get_metadata 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserFilesRequests#getMetadata(String)}. 24 | */ 25 | public final GetMetadataError errorValue; 26 | 27 | public GetMetadataErrorException(String routeName, String requestId, LocalizedText userMessage, GetMetadataError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/GroupCreateErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GroupCreateError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#groupsCreate(String)}.

15 | */ 16 | public class GroupCreateErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/groups/create 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxTeamTeamRequests#groupsCreate(String)}. 24 | */ 25 | public final GroupCreateError errorValue; 26 | 27 | public GroupCreateErrorException(String routeName, String requestId, LocalizedText userMessage, GroupCreateError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/GroupsGetInfoErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GroupsGetInfoError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link DbxTeamTeamRequests#groupsGetInfo}. 14 | *

15 | */ 16 | public class GroupsGetInfoErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/groups/get_info 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxTeamTeamRequests#groupsGetInfo}. 24 | */ 25 | public final GroupsGetInfoError errorValue; 26 | 27 | public GroupsGetInfoErrorException(String routeName, String requestId, LocalizedText userMessage, GroupsGetInfoError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/teamlog/GetTeamEventsErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.teamlog; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GetTeamEventsError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link DbxTeamTeamLogRequests#getEvents}. 14 | *

15 | */ 16 | public class GetTeamEventsErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team_log/get_events 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxTeamTeamLogRequests#getEvents}. 24 | */ 25 | public final GetTeamEventsError errorValue; 26 | 27 | public GetTeamEventsErrorException(String routeName, String requestId, LocalizedText userMessage, GetTeamEventsError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/RemoveTagErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link RemoveTagError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#tagsRemove(String,String)}.

15 | */ 16 | public class RemoveTagErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/tags/remove 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserFilesRequests#tagsRemove(String,String)}. 25 | */ 26 | public final RemoveTagError errorValue; 27 | 28 | public RemoveTagErrorException(String routeName, String requestId, LocalizedText userMessage, RemoveTagError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/MountFolderErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link MountFolderError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#mountFolder(String)}.

15 | */ 16 | public class MountFolderErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/mount_folder 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserSharingRequests#mountFolder(String)}. 24 | */ 25 | public final MountFolderError errorValue; 26 | 27 | public MountFolderErrorException(String routeName, String requestId, LocalizedText userMessage, MountFolderError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/ShareFolderErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ShareFolderError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#shareFolder(String)}.

15 | */ 16 | public class ShareFolderErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/share_folder 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserSharingRequests#shareFolder(String)}. 24 | */ 25 | public final ShareFolderError errorValue; 26 | 27 | public ShareFolderErrorException(String routeName, String requestId, LocalizedText userMessage, ShareFolderError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/UnshareFileErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link UnshareFileError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#unshareFile(String)}.

15 | */ 16 | public class UnshareFileErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/unshare_file 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserSharingRequests#unshareFile(String)}. 24 | */ 25 | public final UnshareFileError errorValue; 26 | 27 | public UnshareFileErrorException(String routeName, String requestId, LocalizedText userMessage, UnshareFileError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/ListRevisionsErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ListRevisionsError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#listRevisions(String)}.

15 | */ 16 | public class ListRevisionsErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/list_revisions 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserFilesRequests#listRevisions(String)}. 24 | */ 25 | public final ListRevisionsError errorValue; 26 | 27 | public ListRevisionsErrorException(String routeName, String requestId, LocalizedText userMessage, ListRevisionsError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/TeamFolderListErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link TeamFolderListError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#teamFolderList(long)}.

15 | */ 16 | public class TeamFolderListErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/team_folder/list 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxTeamTeamRequests#teamFolderList(long)}. 24 | */ 25 | public final TeamFolderListError errorValue; 26 | 27 | public TeamFolderListErrorException(String routeName, String requestId, LocalizedText userMessage, TeamFolderListError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/stone/CompositeSerializer.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.stone; 2 | 3 | import java.io.IOException; 4 | 5 | import com.fasterxml.jackson.core.JsonGenerationException; 6 | import com.fasterxml.jackson.core.JsonGenerator; 7 | import com.fasterxml.jackson.core.JsonParseException; 8 | import com.fasterxml.jackson.core.JsonParser; 9 | import com.fasterxml.jackson.core.JsonToken; 10 | 11 | public abstract class CompositeSerializer extends StoneSerializer { 12 | protected static final String TAG_FIELD = ".tag"; 13 | 14 | protected static boolean hasTag(JsonParser p) throws IOException, JsonParseException { 15 | return p.getCurrentToken() == JsonToken.FIELD_NAME && TAG_FIELD.equals(p.getCurrentName()); 16 | } 17 | 18 | protected static String readTag(JsonParser p) throws IOException, JsonParseException { 19 | if (!hasTag(p)) { 20 | return null; 21 | } 22 | p.nextToken(); 23 | String tag = getStringValue(p); 24 | p.nextToken(); 25 | 26 | return tag; 27 | } 28 | 29 | protected void writeTag(String tag, JsonGenerator g) throws IOException, JsonGenerationException { 30 | if (tag != null) { 31 | g.writeStringField(TAG_FIELD, tag); 32 | } 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/GroupUpdateErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GroupUpdateError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#groupsUpdate(GroupSelector)}.

15 | */ 16 | public class GroupUpdateErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/groups/update 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#groupsUpdate(GroupSelector)}. 25 | */ 26 | public final GroupUpdateError errorValue; 27 | 28 | public GroupUpdateErrorException(String routeName, String requestId, LocalizedText userMessage, GroupUpdateError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/GroupsPollErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GroupsPollError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#groupsJobStatusGet(String)}.

15 | */ 16 | public class GroupsPollErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/groups/job_status/get 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#groupsJobStatusGet(String)}. 25 | */ 26 | public final GroupsPollError errorValue; 27 | 28 | public GroupsPollErrorException(String routeName, String requestId, LocalizedText userMessage, GroupsPollError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/filerequests/GetFileRequestErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.filerequests; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GetFileRequestError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFileRequestsRequests#get(String)}.

15 | */ 16 | public class GetFileRequestErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/file_requests/get 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserFileRequestsRequests#get(String)}. 24 | */ 25 | public final GetFileRequestError errorValue; 26 | 27 | public GetFileRequestErrorException(String routeName, String requestId, LocalizedText userMessage, GetFileRequestError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/ThumbnailV2ErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ThumbnailV2Error} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxAppFilesRequests#getThumbnailV2(PathOrLink)}.

15 | */ 16 | public class ThumbnailV2ErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/get_thumbnail_v2 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxAppFilesRequests#getThumbnailV2(PathOrLink)}. 25 | */ 26 | public final ThumbnailV2Error errorValue; 27 | 28 | public ThumbnailV2ErrorException(String routeName, String requestId, LocalizedText userMessage, ThumbnailV2Error errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/ListSharedLinksErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ListSharedLinksError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#listSharedLinks}.

15 | */ 16 | public class ListSharedLinksErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/list_shared_links 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserSharingRequests#listSharedLinks}. 24 | */ 25 | public final ListSharedLinksError errorValue; 26 | 27 | public ListSharedLinksErrorException(String routeName, String requestId, LocalizedText userMessage, ListSharedLinksError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /examples/android/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in $ANDROID_SDK/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # OkHttp and Servlet optional dependencies 20 | 21 | -dontwarn okio.** 22 | -dontwarn okhttp3.** 23 | -dontwarn com.squareup.okhttp.** 24 | -dontwarn com.google.apphosting.** 25 | -dontwarn com.google.appengine.** 26 | -dontwarn com.google.protos.cloud.sql.** 27 | -dontwarn com.google.cloud.sql.** 28 | -dontwarn javax.activation.** 29 | -dontwarn jakarta.mail.** 30 | -dontwarn jakarta.servlet.** 31 | -dontwarn org.apache.** 32 | 33 | # Support classes for compatibility with older API versions 34 | 35 | -dontwarn android.support.** 36 | -dontnote android.support.** 37 | 38 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/filerequests/CountFileRequestsErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.filerequests; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * CountFileRequestsError} error. 12 | * 13 | *

This exception is raised by {@link DbxUserFileRequestsRequests#count}. 14 | *

15 | */ 16 | public class CountFileRequestsErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/file_requests/count 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserFileRequestsRequests#count}. 24 | */ 25 | public final CountFileRequestsError errorValue; 26 | 27 | public CountFileRequestsErrorException(String routeName, String requestId, LocalizedText userMessage, CountFileRequestsError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/PaperCreateErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link PaperCreateError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#paperCreate(String,ImportFormat)}.

15 | */ 16 | public class PaperCreateErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/paper/create 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserFilesRequests#paperCreate(String,ImportFormat)}. 25 | */ 26 | public final PaperCreateError errorValue; 27 | 28 | public PaperCreateErrorException(String routeName, String requestId, LocalizedText userMessage, PaperCreateError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/UnmountFolderErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link UnmountFolderError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#unmountFolder(String)}.

15 | */ 16 | public class UnmountFolderErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/unmount_folder 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#unmountFolder(String)}. 25 | */ 26 | public final UnmountFolderError errorValue; 27 | 28 | public UnmountFolderErrorException(String routeName, String requestId, LocalizedText userMessage, UnmountFolderError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/ListTeamDevicesErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ListTeamDevicesError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#devicesListTeamDevices}.

15 | */ 16 | public class ListTeamDevicesErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/devices/list_team_devices 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxTeamTeamRequests#devicesListTeamDevices}. 24 | */ 25 | public final ListTeamDevicesError errorValue; 26 | 27 | public ListTeamDevicesErrorException(String routeName, String requestId, LocalizedText userMessage, ListTeamDevicesError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /examples/examples/src/test/java/com/dropbox/core/examples/FileCreationUtils.kt: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.examples 2 | 3 | import java.io.File 4 | import java.io.FileOutputStream 5 | import java.security.SecureRandom 6 | 7 | object FileCreationUtils { 8 | fun bytesToMb(bytes: Long): Long { 9 | val kb = bytes / 1000 10 | return kb / 1000 11 | } 12 | 13 | fun bytesToKb(bytes: Long): Long { 14 | return bytes / 1000 15 | } 16 | 17 | fun kbToBytes(kb: Long): Long { 18 | return kb * 1000 19 | } 20 | 21 | fun mbToBytes(mb: Long): Long { 22 | val kb = mb * 1000 23 | return kb * 1000 24 | } 25 | 26 | fun createTempFileOfSize(tempFile: File, sizeInBytes: Int): File { 27 | // to fill with random bytes. 28 | FileOutputStream(tempFile).use { out -> 29 | val bytes = ByteArray(sizeInBytes) 30 | SecureRandom().nextBytes(bytes) 31 | out.write(bytes) 32 | } 33 | 34 | val fileSizeInBytes: Long = tempFile.length() 35 | 36 | println("Random Data Written To File: ${tempFile.absolutePath}") 37 | println("File Created of Size ${bytesToKb(fileSizeInBytes)} KB") 38 | println("File Created of Size ${bytesToMb(fileSizeInBytes)} MB") 39 | 40 | return tempFile 41 | } 42 | } -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/paper/ListDocsCursorErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.paper; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ListDocsCursorError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserPaperRequests#docsListContinue(String)}.

15 | */ 16 | public class ListDocsCursorErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/paper/docs/list/continue 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserPaperRequests#docsListContinue(String)}. 25 | */ 26 | public final ListDocsCursorError errorValue; 27 | 28 | public ListDocsCursorErrorException(String routeName, String requestId, LocalizedText userMessage, ListDocsCursorError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/paper/PaperFolderCreateErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.paper; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * PaperFolderCreateError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserPaperRequests#foldersCreate(String)}.

15 | */ 16 | public class PaperFolderCreateErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/paper/folders/create 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserPaperRequests#foldersCreate(String)}. 24 | */ 25 | public final PaperFolderCreateError errorValue; 26 | 27 | public PaperFolderCreateErrorException(String routeName, String requestId, LocalizedText userMessage, PaperFolderCreateError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/SharedLinkErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link SharedLinkError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxAppSharingRequests#getSharedLinkMetadata(String)}.

15 | */ 16 | public class SharedLinkErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/get_shared_link_metadata 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxAppSharingRequests#getSharedLinkMetadata(String)}. 25 | */ 26 | public final SharedLinkError errorValue; 27 | 28 | public SharedLinkErrorException(String routeName, String requestId, LocalizedText userMessage, SharedLinkError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/MembersRemoveErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link MembersRemoveError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#membersRemove(UserSelectorArg)}.

15 | */ 16 | public class MembersRemoveErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/members/remove 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#membersRemove(UserSelectorArg)}. 25 | */ 26 | public final MembersRemoveError errorValue; 27 | 28 | public MembersRemoveErrorException(String routeName, String requestId, LocalizedText userMessage, MembersRemoveError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/TeamNamespacesListErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * TeamNamespacesListError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#namespacesList(long)}.

15 | */ 16 | public class TeamNamespacesListErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/namespaces/list 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxTeamTeamRequests#namespacesList(long)}. 24 | */ 25 | public final TeamNamespacesListError errorValue; 26 | 27 | public TeamNamespacesListErrorException(String routeName, String requestId, LocalizedText userMessage, TeamNamespacesListError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/UploadSessionStartErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * UploadSessionStartError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#uploadSessionStart}.

15 | */ 16 | public class UploadSessionStartErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/upload_session/start 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserFilesRequests#uploadSessionStart}. 24 | */ 25 | public final UploadSessionStartError errorValue; 26 | 27 | public UploadSessionStartErrorException(String routeName, String requestId, LocalizedText userMessage, UploadSessionStartError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/GetSharedLinksErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GetSharedLinksError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#getSharedLinks(String)}.

15 | */ 16 | public class GetSharedLinksErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/get_shared_links 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#getSharedLinks(String)}. 25 | */ 26 | public final GetSharedLinksError errorValue; 27 | 28 | public GetSharedLinksErrorException(String routeName, String requestId, LocalizedText userMessage, GetSharedLinksError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/auth/TokenFromOAuth1ErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.auth; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link TokenFromOAuth1Error} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxAppAuthRequests#tokenFromOauth1(String,String)}.

15 | */ 16 | public class TokenFromOAuth1ErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/auth/token/from_oauth1 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxAppAuthRequests#tokenFromOauth1(String,String)}. 25 | */ 26 | public final TokenFromOAuth1Error errorValue; 27 | 28 | public TokenFromOAuth1ErrorException(String routeName, String requestId, LocalizedText userMessage, TokenFromOAuth1Error errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/filerequests/UpdateFileRequestErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.filerequests; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * UpdateFileRequestError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFileRequestsRequests#update(String)}.

15 | */ 16 | public class UpdateFileRequestErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/file_requests/update 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxUserFileRequestsRequests#update(String)}. 24 | */ 25 | public final UpdateFileRequestError errorValue; 26 | 27 | public UpdateFileRequestErrorException(String routeName, String requestId, LocalizedText userMessage, UpdateFileRequestError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/paper/PaperDocCreateErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.paper; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link PaperDocCreateError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserPaperRequests#docsCreate(ImportFormat,String)}.

15 | */ 16 | public class PaperDocCreateErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/paper/docs/create 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserPaperRequests#docsCreate(ImportFormat,String)}. 25 | */ 26 | public final PaperDocCreateError errorValue; 27 | 28 | public PaperDocCreateErrorException(String routeName, String requestId, LocalizedText userMessage, PaperDocCreateError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/UnshareFolderErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link UnshareFolderError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#unshareFolder(String,boolean)}.

15 | */ 16 | public class UnshareFolderErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/unshare_folder 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#unshareFolder(String,boolean)}. 25 | */ 26 | public final UnshareFolderError errorValue; 27 | 28 | public UnshareFolderErrorException(String routeName, String requestId, LocalizedText userMessage, UnshareFolderError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/MembersRecoverErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link MembersRecoverError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#membersRecover(UserSelectorArg)}.

15 | */ 16 | public class MembersRecoverErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/members/recover 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#membersRecover(UserSelectorArg)}. 25 | */ 26 | public final MembersRecoverError errorValue; 27 | 28 | public MembersRecoverErrorException(String routeName, String requestId, LocalizedText userMessage, MembersRecoverError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/SharingAllowlistAddErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * SharingAllowlistAddError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#sharingAllowlistAdd}.

15 | */ 16 | public class SharingAllowlistAddErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/sharing_allowlist/add 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxTeamTeamRequests#sharingAllowlistAdd}. 24 | */ 25 | public final SharingAllowlistAddError errorValue; 26 | 27 | public SharingAllowlistAddErrorException(String routeName, String requestId, LocalizedText userMessage, SharingAllowlistAddError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/AlphaGetMetadataErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * AlphaGetMetadataError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#alphaGetMetadata(String)}.

15 | */ 16 | public class AlphaGetMetadataErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/alpha/get_metadata 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserFilesRequests#alphaGetMetadata(String)}. 25 | */ 26 | public final AlphaGetMetadataError errorValue; 27 | 28 | public AlphaGetMetadataErrorException(String routeName, String requestId, LocalizedText userMessage, AlphaGetMetadataError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/GetCopyReferenceErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * GetCopyReferenceError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#copyReferenceGet(String)}.

15 | */ 16 | public class GetCopyReferenceErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/copy_reference/get 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserFilesRequests#copyReferenceGet(String)}. 25 | */ 26 | public final GetCopyReferenceError errorValue; 27 | 28 | public GetCopyReferenceErrorException(String routeName, String requestId, LocalizedText userMessage, GetCopyReferenceError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/GetTemporaryLinkErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * GetTemporaryLinkError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#getTemporaryLink(String)}.

15 | */ 16 | public class GetTemporaryLinkErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/get_temporary_link 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserFilesRequests#getTemporaryLink(String)}. 25 | */ 26 | public final GetTemporaryLinkError errorValue; 27 | 28 | public GetTemporaryLinkErrorException(String routeName, String requestId, LocalizedText userMessage, GetTemporaryLinkError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/ListFileMembersErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ListFileMembersError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#listFileMembers(String)}.

15 | */ 16 | public class ListFileMembersErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/list_file_members 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#listFileMembers(String)}. 25 | */ 26 | public final ListFileMembersError errorValue; 27 | 28 | public ListFileMembersErrorException(String routeName, String requestId, LocalizedText userMessage, ListFileMembersError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/TransferFolderErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link TransferFolderError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#transferFolder(String,String)}.

15 | */ 16 | public class TransferFolderErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/transfer_folder 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#transferFolder(String,String)}. 25 | */ 26 | public final TransferFolderError errorValue; 27 | 28 | public TransferFolderErrorException(String routeName, String requestId, LocalizedText userMessage, TransferFolderError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/GroupSelectorErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GroupSelectorError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#groupsMembersList(GroupSelector,long)}.

15 | */ 16 | public class GroupSelectorErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/groups/members/list 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#groupsMembersList(GroupSelector,long)}. 25 | */ 26 | public final GroupSelectorError errorValue; 27 | 28 | public GroupSelectorErrorException(String routeName, String requestId, LocalizedText userMessage, GroupSelectorError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/users/GetAccountBatchErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.users; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GetAccountBatchError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserUsersRequests#getAccountBatch(java.util.List)}.

15 | */ 16 | public class GetAccountBatchErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/users/get_account_batch 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserUsersRequests#getAccountBatch(java.util.List)}. 25 | */ 26 | public final GetAccountBatchError errorValue; 27 | 28 | public GetAccountBatchErrorException(String routeName, String requestId, LocalizedText userMessage, GetAccountBatchError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/util/CountingOutputStream.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.util; 2 | 3 | import java.io.IOException; 4 | import java.io.OutputStream; 5 | 6 | public class CountingOutputStream extends OutputStream 7 | { 8 | private final OutputStream out; 9 | private long bytesWritten = 0; 10 | 11 | public CountingOutputStream(OutputStream out) 12 | { 13 | this.out = out; 14 | } 15 | 16 | public long getBytesWritten() 17 | { 18 | return bytesWritten; 19 | } 20 | 21 | @Override 22 | public void write(int b) throws IOException 23 | { 24 | bytesWritten++; 25 | out.write(b); 26 | } 27 | 28 | @Override 29 | public void write(byte[] b) throws IOException 30 | { 31 | bytesWritten += b.length; 32 | out.write(b); 33 | } 34 | 35 | @Override 36 | public void write(byte[] b, int off, int len) throws IOException 37 | { 38 | bytesWritten += len; 39 | out.write(b, off, len); 40 | } 41 | 42 | @Override 43 | public void flush() throws IOException 44 | { 45 | out.flush(); 46 | } 47 | 48 | @Override 49 | public void close() throws IOException 50 | { 51 | throw new UnsupportedOperationException("You aren't allowed to call close() on this object."); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/AddFileMemberErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link AddFileMemberError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#addFileMember(String,java.util.List)}.

15 | */ 16 | public class AddFileMemberErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/add_file_member 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#addFileMember(String,java.util.List)}. 25 | */ 26 | public final AddFileMemberError errorValue; 27 | 28 | public AddFileMemberErrorException(String routeName, String requestId, LocalizedText userMessage, AddFileMemberError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/CreateSharedLinkErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * CreateSharedLinkError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#createSharedLink(String)}.

15 | */ 16 | public class CreateSharedLinkErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/create_shared_link 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#createSharedLink(String)}. 25 | */ 26 | public final CreateSharedLinkError errorValue; 27 | 28 | public CreateSharedLinkErrorException(String routeName, String requestId, LocalizedText userMessage, CreateSharedLinkError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/RevokeSharedLinkErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * RevokeSharedLinkError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#revokeSharedLink(String)}.

15 | */ 16 | public class RevokeSharedLinkErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/revoke_shared_link 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#revokeSharedLink(String)}. 25 | */ 26 | public final RevokeSharedLinkError errorValue; 27 | 28 | public RevokeSharedLinkErrorException(String routeName, String requestId, LocalizedText userMessage, RevokeSharedLinkError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/GroupsListContinueErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * GroupsListContinueError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#groupsListContinue(String)}.

15 | */ 16 | public class GroupsListContinueErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/groups/list/continue 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#groupsListContinue(String)}. 25 | */ 26 | public final GroupsListContinueError errorValue; 27 | 28 | public GroupsListContinueErrorException(String routeName, String requestId, LocalizedText userMessage, GroupsListContinueError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/ListTeamAppsErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ListTeamAppsError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#linkedAppsListTeamLinkedApps(String)}.

15 | */ 16 | public class ListTeamAppsErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/linked_apps/list_team_linked_apps 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#linkedAppsListTeamLinkedApps(String)}. 25 | */ 26 | public final ListTeamAppsError errorValue; 27 | 28 | public ListTeamAppsErrorException(String routeName, String requestId, LocalizedText userMessage, ListTeamAppsError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/MembersSendWelcomeErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * MembersSendWelcomeError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#membersSendWelcomeEmail}.

15 | */ 16 | public class MembersSendWelcomeErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/members/send_welcome_email 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#membersSendWelcomeEmail}. 25 | */ 26 | public final MembersSendWelcomeError errorValue; 27 | 28 | public MembersSendWelcomeErrorException(String routeName, String requestId, LocalizedText userMessage, MembersSendWelcomeError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/MembersSuspendErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link MembersSuspendError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#membersSuspend(UserSelectorArg,boolean)}.

15 | */ 16 | public class MembersSuspendErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/members/suspend 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#membersSuspend(UserSelectorArg,boolean)}. 25 | */ 26 | public final MembersSuspendError errorValue; 27 | 28 | public MembersSuspendErrorException(String routeName, String requestId, LocalizedText userMessage, MembersSuspendError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/MembersUnsuspendErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * MembersUnsuspendError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#membersUnsuspend(UserSelectorArg)}.

15 | */ 16 | public class MembersUnsuspendErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/members/unsuspend 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#membersUnsuspend(UserSelectorArg)}. 25 | */ 26 | public final MembersUnsuspendError errorValue; 27 | 28 | public MembersUnsuspendErrorException(String routeName, String requestId, LocalizedText userMessage, MembersUnsuspendError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/TeamFolderActivateErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * TeamFolderActivateError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#teamFolderActivate(String)}.

15 | */ 16 | public class TeamFolderActivateErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/team_folder/activate 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#teamFolderActivate(String)}. 25 | */ 26 | public final TeamFolderActivateError errorValue; 27 | 28 | public TeamFolderActivateErrorException(String routeName, String requestId, LocalizedText userMessage, TeamFolderActivateError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/TeamFolderRenameErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * TeamFolderRenameError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#teamFolderRename(String,String)}.

15 | */ 16 | public class TeamFolderRenameErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/team_folder/rename 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#teamFolderRename(String,String)}. 25 | */ 26 | public final TeamFolderRenameError errorValue; 27 | 28 | public TeamFolderRenameErrorException(String routeName, String requestId, LocalizedText userMessage, TeamFolderRenameError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/account/SetProfilePhotoErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.account; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link SetProfilePhotoError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserAccountRequests#setProfilePhoto(PhotoSourceArg)}.

15 | */ 16 | public class SetProfilePhotoErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/account/set_profile_photo 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserAccountRequests#setProfilePhoto(PhotoSourceArg)}. 25 | */ 26 | public final SetProfilePhotoError errorValue; 27 | 28 | public SetProfilePhotoErrorException(String routeName, String requestId, LocalizedText userMessage, SetProfilePhotoError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/ListFolderContinueErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * ListFolderContinueError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxAppFilesRequests#listFolderContinue(String)}.

15 | */ 16 | public class ListFolderContinueErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/list_folder/continue 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxAppFilesRequests#listFolderContinue(String)}. 25 | */ 26 | public final ListFolderContinueError errorValue; 27 | 28 | public ListFolderContinueErrorException(String routeName, String requestId, LocalizedText userMessage, ListFolderContinueError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/SaveCopyReferenceErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * SaveCopyReferenceError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#copyReferenceSave(String,String)}.

15 | */ 16 | public class SaveCopyReferenceErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/copy_reference/save 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserFilesRequests#copyReferenceSave(String,String)}. 25 | */ 26 | public final SaveCopyReferenceError errorValue; 27 | 28 | public SaveCopyReferenceErrorException(String routeName, String requestId, LocalizedText userMessage, SaveCopyReferenceError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/GetSharedLinkFileErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * GetSharedLinkFileError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#getSharedLinkFile(String)}.

15 | */ 16 | public class GetSharedLinkFileErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/get_shared_link_file 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#getSharedLinkFile(String)}. 25 | */ 26 | public final GetSharedLinkFileError errorValue; 27 | 28 | public GetSharedLinkFileErrorException(String routeName, String requestId, LocalizedText userMessage, GetSharedLinkFileError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/LegalHoldsGetPolicyErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * LegalHoldsGetPolicyError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#legalHoldsGetPolicy(String)}.

15 | */ 16 | public class LegalHoldsGetPolicyErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/legal_holds/get_policy 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#legalHoldsGetPolicy(String)}. 25 | */ 26 | public final LegalHoldsGetPolicyError errorValue; 27 | 28 | public LegalHoldsGetPolicyErrorException(String routeName, String requestId, LocalizedText userMessage, LegalHoldsGetPolicyError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/ListMembersDevicesErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * ListMembersDevicesError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#devicesListMembersDevices}.

15 | */ 16 | public class ListMembersDevicesErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/devices/list_members_devices 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#devicesListMembersDevices}. 25 | */ 26 | public final ListMembersDevicesError errorValue; 27 | 28 | public ListMembersDevicesErrorException(String routeName, String requestId, LocalizedText userMessage, ListMembersDevicesError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/SharingAllowlistRemoveErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * SharingAllowlistRemoveError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#sharingAllowlistRemove}.

15 | */ 16 | public class SharingAllowlistRemoveErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/sharing_allowlist/remove 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link DbxTeamTeamRequests#sharingAllowlistRemove}. 24 | */ 25 | public final SharingAllowlistRemoveError errorValue; 26 | 27 | public SharingAllowlistRemoveErrorException(String routeName, String requestId, LocalizedText userMessage, SharingAllowlistRemoveError errorValue) { 28 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 29 | if (errorValue == null) { 30 | throw new NullPointerException("errorValue"); 31 | } 32 | this.errorValue = errorValue; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/TeamFolderArchiveErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * TeamFolderArchiveError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#teamFolderArchive(String,boolean)}.

15 | */ 16 | public class TeamFolderArchiveErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/team_folder/archive 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#teamFolderArchive(String,boolean)}. 25 | */ 26 | public final TeamFolderArchiveError errorValue; 27 | 28 | public TeamFolderArchiveErrorException(String routeName, String requestId, LocalizedText userMessage, TeamFolderArchiveError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/filerequests/CreateFileRequestErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.filerequests; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * CreateFileRequestError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFileRequestsRequests#create(String,String)}.

15 | */ 16 | public class CreateFileRequestErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/file_requests/create 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserFileRequestsRequests#create(String,String)}. 25 | */ 26 | public final CreateFileRequestError errorValue; 27 | 28 | public CreateFileRequestErrorException(String routeName, String requestId, LocalizedText userMessage, CreateFileRequestError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/filerequests/DeleteFileRequestErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.filerequests; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * DeleteFileRequestError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFileRequestsRequests#delete(java.util.List)}.

15 | */ 16 | public class DeleteFileRequestErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/file_requests/delete 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserFileRequestsRequests#delete(java.util.List)}. 25 | */ 26 | public final DeleteFileRequestError errorValue; 27 | 28 | public DeleteFileRequestErrorException(String routeName, String requestId, LocalizedText userMessage, DeleteFileRequestError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/GetThumbnailBatchErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * GetThumbnailBatchError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#getThumbnailBatch(java.util.List)}.

15 | */ 16 | public class GetThumbnailBatchErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/get_thumbnail_batch 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserFilesRequests#getThumbnailBatch(java.util.List)}. 25 | */ 26 | public final GetThumbnailBatchError errorValue; 27 | 28 | public GetThumbnailBatchErrorException(String routeName, String requestId, LocalizedText userMessage, GetThumbnailBatchError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/ListFolderLongpollErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * ListFolderLongpollError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#listFolderLongpoll(String,long)}.

15 | */ 16 | public class ListFolderLongpollErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/list_folder/longpoll 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserFilesRequests#listFolderLongpoll(String,long)}. 25 | */ 26 | public final ListFolderLongpollError errorValue; 27 | 28 | public ListFolderLongpollErrorException(String routeName, String requestId, LocalizedText userMessage, ListFolderLongpollError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/UpdateFolderPolicyErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * UpdateFolderPolicyError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#updateFolderPolicy(String)}.

15 | */ 16 | public class UpdateFolderPolicyErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/update_folder_policy 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#updateFolderPolicy(String)}. 25 | */ 26 | public final UpdateFolderPolicyError errorValue; 27 | 28 | public UpdateFolderPolicyErrorException(String routeName, String requestId, LocalizedText userMessage, UpdateFolderPolicyError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/ListMemberAppsErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ListMemberAppsError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#linkedAppsListMemberLinkedApps(String)}.

15 | */ 16 | public class ListMemberAppsErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/linked_apps/list_member_linked_apps 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#linkedAppsListMemberLinkedApps(String)}. 25 | */ 26 | public final ListMemberAppsError errorValue; 27 | 28 | public ListMemberAppsErrorException(String routeName, String requestId, LocalizedText userMessage, ListMemberAppsError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/ListMemberDevicesErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * ListMemberDevicesError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#devicesListMemberDevices(String)}.

15 | */ 16 | public class ListMemberDevicesErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/devices/list_member_devices 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#devicesListMemberDevices(String)}. 25 | */ 26 | public final ListMemberDevicesError errorValue; 27 | 28 | public ListMemberDevicesErrorException(String routeName, String requestId, LocalizedText userMessage, ListMemberDevicesError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/RevokeDeviceSessionErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * RevokeDeviceSessionError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#devicesRevokeDeviceSession}.

15 | */ 16 | public class RevokeDeviceSessionErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/devices/revoke_device_session 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#devicesRevokeDeviceSession}. 25 | */ 26 | public final RevokeDeviceSessionError errorValue; 27 | 28 | public RevokeDeviceSessionErrorException(String routeName, String requestId, LocalizedText userMessage, RevokeDeviceSessionError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/SharingAllowlistListErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * SharingAllowlistListError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#sharingAllowlistList(long)}.

15 | */ 16 | public class SharingAllowlistListErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/sharing_allowlist/list 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#sharingAllowlistList(long)}. 25 | */ 26 | public final SharingAllowlistListError errorValue; 27 | 28 | public SharingAllowlistListErrorException(String routeName, String requestId, LocalizedText userMessage, SharingAllowlistListError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/AddFolderMemberErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link AddFolderMemberError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#addFolderMember(String,java.util.List)}.

15 | */ 16 | public class AddFolderMemberErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/add_folder_member 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#addFolderMember(String,java.util.List)}. 25 | */ 26 | public final AddFolderMemberError errorValue; 27 | 28 | public AddFolderMemberErrorException(String routeName, String requestId, LocalizedText userMessage, AddFolderMemberError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/GetFileMetadataErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GetFileMetadataError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#getFileMetadata(String,java.util.List)}.

15 | */ 16 | public class GetFileMetadataErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/get_file_metadata 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#getFileMetadata(String,java.util.List)}. 25 | */ 26 | public final GetFileMetadataError errorValue; 27 | 28 | public GetFileMetadataErrorException(String routeName, String requestId, LocalizedText userMessage, GetFileMetadataError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/ListMembersAppsErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link ListMembersAppsError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#linkedAppsListMembersLinkedApps(String)}.

15 | */ 16 | public class ListMembersAppsErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/linked_apps/list_members_linked_apps 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#linkedAppsListMembersLinkedApps(String)}. 25 | */ 26 | public final ListMembersAppsError errorValue; 27 | 28 | public ListMembersAppsErrorException(String routeName, String requestId, LocalizedText userMessage, ListMembersAppsError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/PaperUpdateErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link PaperUpdateError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserFilesRequests#paperUpdate(String,ImportFormat,PaperDocUpdatePolicy,Long)}. 15 | *

16 | */ 17 | public class PaperUpdateErrorException extends DbxApiException { 18 | // exception for routes: 19 | // 2/files/paper/update 20 | 21 | private static final long serialVersionUID = 0L; 22 | 23 | /** 24 | * The error reported by {@link 25 | * DbxUserFilesRequests#paperUpdate(String,ImportFormat,PaperDocUpdatePolicy,Long)}. 26 | */ 27 | public final PaperUpdateError errorValue; 28 | 29 | public PaperUpdateErrorException(String routeName, String requestId, LocalizedText userMessage, PaperUpdateError errorValue) { 30 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 31 | if (errorValue == null) { 32 | throw new NullPointerException("errorValue"); 33 | } 34 | this.errorValue = errorValue; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/sharing/ListFilesContinueErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.sharing; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * ListFilesContinueError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserSharingRequests#listReceivedFilesContinue(String)}.

15 | */ 16 | public class ListFilesContinueErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/sharing/list_received_files/continue 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxUserSharingRequests#listReceivedFilesContinue(String)}. 25 | */ 26 | public final ListFilesContinueError errorValue; 27 | 28 | public ListFilesContinueErrorException(String routeName, String requestId, LocalizedText userMessage, ListFilesContinueError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/RevokeLinkedAppErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link RevokeLinkedAppError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#linkedAppsRevokeLinkedApp(String,String,boolean)}.

15 | */ 16 | public class RevokeLinkedAppErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/linked_apps/revoke_linked_app 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#linkedAppsRevokeLinkedApp(String,String,boolean)}. 25 | */ 26 | public final RevokeLinkedAppError errorValue; 27 | 28 | public RevokeLinkedAppErrorException(String routeName, String requestId, LocalizedText userMessage, RevokeLinkedAppError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/SetCustomQuotaErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link SetCustomQuotaError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#memberSpaceLimitsSetCustomQuota(java.util.List)}.

15 | */ 16 | public class SetCustomQuotaErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/member_space_limits/set_custom_quota 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#memberSpaceLimitsSetCustomQuota(java.util.List)}. 25 | */ 26 | public final SetCustomQuotaError errorValue; 27 | 28 | public SetCustomQuotaErrorException(String routeName, String requestId, LocalizedText userMessage, SetCustomQuotaError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/teamlog/GetTeamEventsContinueErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.teamlog; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * GetTeamEventsContinueError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamLogRequests#getEventsContinue(String)}.

15 | */ 16 | public class GetTeamEventsContinueErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team_log/get_events/continue 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamLogRequests#getEventsContinue(String)}. 25 | */ 26 | public final GetTeamEventsContinueError errorValue; 27 | 28 | public GetTeamEventsContinueErrorException(String routeName, String requestId, LocalizedText userMessage, GetTeamEventsContinueError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/files/UploadErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.files; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link UploadError} error. 11 | * 12 | *

This exception is raised by {@link 13 | * DbxUserFilesRequests#alphaUpload(String)} and {@link 14 | * DbxUserFilesRequests#upload(String)}.

15 | */ 16 | public class UploadErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/files/alpha/upload 19 | // 2/files/upload 20 | 21 | private static final long serialVersionUID = 0L; 22 | 23 | /** 24 | * The error reported by {@link DbxUserFilesRequests#alphaUpload(String)} 25 | * and {@link DbxUserFilesRequests#upload(String)}. 26 | */ 27 | public final UploadError errorValue; 28 | 29 | public UploadErrorException(String routeName, String requestId, LocalizedText userMessage, UploadError errorValue) { 30 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 31 | if (errorValue == null) { 32 | throw new NullPointerException("errorValue"); 33 | } 34 | this.errorValue = errorValue; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/AddSecondaryEmailsErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * AddSecondaryEmailsError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#membersSecondaryEmailsAdd(java.util.List)}.

15 | */ 16 | public class AddSecondaryEmailsErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/members/secondary_emails/add 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#membersSecondaryEmailsAdd(java.util.List)}. 25 | */ 26 | public final AddSecondaryEmailsError errorValue; 27 | 28 | public AddSecondaryEmailsErrorException(String routeName, String requestId, LocalizedText userMessage, AddSecondaryEmailsError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/FeaturesGetValuesBatchErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * FeaturesGetValuesBatchError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#featuresGetValues(java.util.List)}.

15 | */ 16 | public class FeaturesGetValuesBatchErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/features/get_values 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#featuresGetValues(java.util.List)}. 25 | */ 26 | public final FeaturesGetValuesBatchError errorValue; 27 | 28 | public FeaturesGetValuesBatchErrorException(String routeName, String requestId, LocalizedText userMessage, FeaturesGetValuesBatchError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/LegalHoldsListPoliciesErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * LegalHoldsListPoliciesError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#legalHoldsListPolicies(boolean)}.

15 | */ 16 | public class LegalHoldsListPoliciesErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/legal_holds/list_policies 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#legalHoldsListPolicies(boolean)}. 25 | */ 26 | public final LegalHoldsListPoliciesError errorValue; 27 | 28 | public LegalHoldsListPoliciesErrorException(String routeName, String requestId, LocalizedText userMessage, LegalHoldsListPoliciesError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/LegalHoldsPolicyUpdateErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * LegalHoldsPolicyUpdateError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#legalHoldsUpdatePolicy(String)}.

15 | */ 16 | public class LegalHoldsPolicyUpdateErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/legal_holds/update_policy 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#legalHoldsUpdatePolicy(String)}. 25 | */ 26 | public final LegalHoldsPolicyUpdateError errorValue; 27 | 28 | public LegalHoldsPolicyUpdateErrorException(String routeName, String requestId, LocalizedText userMessage, LegalHoldsPolicyUpdateError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/TeamFolderListContinueErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * TeamFolderListContinueError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#teamFolderListContinue(String)}.

15 | */ 16 | public class TeamFolderListContinueErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/team_folder/list/continue 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#teamFolderListContinue(String)}. 25 | */ 26 | public final TeamFolderListContinueError errorValue; 27 | 28 | public TeamFolderListContinueErrorException(String routeName, String requestId, LocalizedText userMessage, TeamFolderListContinueError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/paper/PaperDocUpdateErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.paper; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link PaperDocUpdateError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxUserPaperRequests#docsUpdate(String,PaperDocUpdatePolicy,long,ImportFormat)}. 15 | *

16 | */ 17 | public class PaperDocUpdateErrorException extends DbxApiException { 18 | // exception for routes: 19 | // 2/paper/docs/update 20 | 21 | private static final long serialVersionUID = 0L; 22 | 23 | /** 24 | * The error reported by {@link 25 | * DbxUserPaperRequests#docsUpdate(String,PaperDocUpdatePolicy,long,ImportFormat)}. 26 | */ 27 | public final PaperDocUpdateError errorValue; 28 | 29 | public PaperDocUpdateErrorException(String routeName, String requestId, LocalizedText userMessage, PaperDocUpdateError errorValue) { 30 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 31 | if (errorValue == null) { 32 | throw new NullPointerException("errorValue"); 33 | } 34 | this.errorValue = errorValue; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/ExcludedUsersListErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * ExcludedUsersListError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#memberSpaceLimitsExcludedUsersList(long)}.

15 | */ 16 | public class ExcludedUsersListErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/member_space_limits/excluded_users/list 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#memberSpaceLimitsExcludedUsersList(long)}. 25 | */ 26 | public final ExcludedUsersListError errorValue; 27 | 28 | public ExcludedUsersListErrorException(String routeName, String requestId, LocalizedText userMessage, ExcludedUsersListError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/GroupMembersAddErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link GroupMembersAddError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#groupsMembersAdd(GroupSelector,java.util.List,boolean)}. 15 | *

16 | */ 17 | public class GroupMembersAddErrorException extends DbxApiException { 18 | // exception for routes: 19 | // 2/team/groups/members/add 20 | 21 | private static final long serialVersionUID = 0L; 22 | 23 | /** 24 | * The error reported by {@link 25 | * DbxTeamTeamRequests#groupsMembersAdd(GroupSelector,java.util.List,boolean)}. 26 | */ 27 | public final GroupMembersAddError errorValue; 28 | 29 | public GroupMembersAddErrorException(String routeName, String requestId, LocalizedText userMessage, GroupMembersAddError errorValue) { 30 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 31 | if (errorValue == null) { 32 | throw new NullPointerException("errorValue"); 33 | } 34 | this.errorValue = errorValue; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/LegalHoldsPolicyReleaseErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link 11 | * LegalHoldsPolicyReleaseError} error. 12 | * 13 | *

This exception is raised by {@link 14 | * DbxTeamTeamRequests#legalHoldsReleasePolicy(String)}.

15 | */ 16 | public class LegalHoldsPolicyReleaseErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/legal_holds/release_policy 19 | 20 | private static final long serialVersionUID = 0L; 21 | 22 | /** 23 | * The error reported by {@link 24 | * DbxTeamTeamRequests#legalHoldsReleasePolicy(String)}. 25 | */ 26 | public final LegalHoldsPolicyReleaseError errorValue; 27 | 28 | public LegalHoldsPolicyReleaseErrorException(String routeName, String requestId, LocalizedText userMessage, LegalHoldsPolicyReleaseError errorValue) { 29 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 30 | if (errorValue == null) { 31 | throw new NullPointerException("errorValue"); 32 | } 33 | this.errorValue = errorValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/java/com/dropbox/core/v1/DbxThumbnailSize.java: -------------------------------------------------------------------------------- 1 | package com.dropbox.core.v1; 2 | 3 | /** 4 | * Thumbnail size presets, to be used with {@link DbxClientV1#getThumbnail}. 5 | */ 6 | public class DbxThumbnailSize 7 | { 8 | public final String ident; 9 | public final int width; 10 | public final int height; 11 | 12 | public DbxThumbnailSize(String ident, int width, int height) 13 | { 14 | this.ident = ident; 15 | this.width = width; 16 | this.height = height; 17 | } 18 | 19 | public String toString() 20 | { 21 | return "(" + ident + " " + width + "x" + height + ")"; 22 | } 23 | 24 | /** 25 | * 32x32 pixels. 26 | */ 27 | public static final DbxThumbnailSize w32h32 = new DbxThumbnailSize("xs", 32, 32); 28 | 29 | /** 30 | * 64x64 pixels. 31 | */ 32 | public static final DbxThumbnailSize w64h64 = new DbxThumbnailSize("s", 64, 64); 33 | 34 | /** 35 | * 128x128 pixels. 36 | */ 37 | public static final DbxThumbnailSize w128h128 = new DbxThumbnailSize("m", 128, 128); 38 | 39 | /** 40 | * 640x480 pixels. 41 | */ 42 | public static final DbxThumbnailSize w640h480 = new DbxThumbnailSize("l", 640, 480); 43 | 44 | /** 45 | * 1024x768 pixels. 46 | */ 47 | public static final DbxThumbnailSize w1024h768 = new DbxThumbnailSize("xl", 1024, 768); 48 | } 49 | -------------------------------------------------------------------------------- /core/build/generated_stone_source/main/src/com/dropbox/core/v2/team/MembersListErrorException.java: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT */ 2 | /* This file was generated by Stone */ 3 | 4 | package com.dropbox.core.v2.team; 5 | 6 | import com.dropbox.core.DbxApiException; 7 | import com.dropbox.core.LocalizedText; 8 | 9 | /** 10 | * Exception thrown when the server responds with a {@link MembersListError} 11 | * error. 12 | * 13 | *

This exception is raised by {@link DbxTeamTeamRequests#membersList} and 14 | * {@link DbxTeamTeamRequests#membersListV2}.

15 | */ 16 | public class MembersListErrorException extends DbxApiException { 17 | // exception for routes: 18 | // 2/team/members/list 19 | // 2/team/members/list_v2 20 | 21 | private static final long serialVersionUID = 0L; 22 | 23 | /** 24 | * The error reported by {@link DbxTeamTeamRequests#membersList} and {@link 25 | * DbxTeamTeamRequests#membersListV2}. 26 | */ 27 | public final MembersListError errorValue; 28 | 29 | public MembersListErrorException(String routeName, String requestId, LocalizedText userMessage, MembersListError errorValue) { 30 | super(requestId, userMessage, buildMessage(routeName, userMessage, errorValue)); 31 | if (errorValue == null) { 32 | throw new NullPointerException("errorValue"); 33 | } 34 | this.errorValue = errorValue; 35 | } 36 | } 37 | --------------------------------------------------------------------------------