Showing preview only (1,196K chars total). Download the full file or copy to clipboard to get everything.
Repository: OneDrive/onedrive-sdk-android
Branch: master
Commit: 1af2f0e788b1
Files: 386
Total size: 1.0 MB
Directory structure:
gitextract_y9dr_hog/
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── THIRD PARTY NOTICES
├── build.gradle
├── checkstyle.xml
├── docs/
│ ├── authentication.md
│ ├── collections.md
│ ├── contributions.md
│ ├── errors.md
│ ├── extensibility.md
│ ├── items.md
│ └── overview.md
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── onedrivesdk/
│ ├── .gitignore
│ ├── build.gradle
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── onedrive/
│ │ └── sdk/
│ │ ├── concurrency/
│ │ │ └── MockExecutors.java
│ │ ├── core/
│ │ │ ├── CoreTests.java
│ │ │ └── MockClient.java
│ │ ├── http/
│ │ │ ├── BaseRequestTests.java
│ │ │ ├── DefaultHttpProviderTests.java
│ │ │ ├── MockInterceptor.java
│ │ │ ├── MockRequest.java
│ │ │ └── MockSingleConnectionFactory.java
│ │ ├── logger/
│ │ │ └── MockLogger.java
│ │ └── serializer/
│ │ ├── DefaultSerializerTests.java
│ │ ├── ISO8601Test.java
│ │ └── MockSerializer.java
│ └── main/
│ ├── AndroidManifest.xml
│ └── java/
│ └── com/
│ └── onedrive/
│ └── sdk/
│ ├── authentication/
│ │ ├── ADALAccountInfo.java
│ │ ├── ADALAuthenticator.java
│ │ ├── AccountType.java
│ │ ├── AuthorizationInterceptor.java
│ │ ├── ClientAuthenticatorException.java
│ │ ├── DisambiguationAuthenticator.java
│ │ ├── DisambiguationDialog.java
│ │ ├── DisambiguationRequest.java
│ │ ├── DisambiguationResponse.java
│ │ ├── DisambiguationWebView.java
│ │ ├── DiscoveryServiceResponse.java
│ │ ├── IAccountInfo.java
│ │ ├── IAuthenticator.java
│ │ ├── MSAAccountInfo.java
│ │ ├── MSAAuthenticator.java
│ │ ├── MicrosoftOAuthConfig.java
│ │ ├── ServiceInfo.java
│ │ └── adal/
│ │ └── BrokerPermissionsChecker.java
│ ├── concurrency/
│ │ ├── AsyncMonitor.java
│ │ ├── AsyncMonitorLocation.java
│ │ ├── AsyncMonitorResponseHandler.java
│ │ ├── AsyncOperationException.java
│ │ ├── ChunkedUploadProvider.java
│ │ ├── ChunkedUploadRequest.java
│ │ ├── ChunkedUploadResponseHandler.java
│ │ ├── DefaultExecutors.java
│ │ ├── ICallback.java
│ │ ├── IExecutors.java
│ │ ├── IProgressCallback.java
│ │ ├── ResultGetter.java
│ │ ├── SimpleWaiter.java
│ │ └── SynchronousExecutor.java
│ ├── core/
│ │ ├── BaseClient.java
│ │ ├── ClientException.java
│ │ ├── DefaultClientConfig.java
│ │ ├── IBaseClient.java
│ │ ├── IClientConfig.java
│ │ └── OneDriveErrorCodes.java
│ ├── extensions/
│ │ ├── AsyncOperationStatus.java
│ │ ├── Audio.java
│ │ ├── ChunkedUploadResult.java
│ │ ├── ChunkedUploadSessionDescriptor.java
│ │ ├── CopyBody.java
│ │ ├── CopyRequest.java
│ │ ├── CopyRequestBuilder.java
│ │ ├── CreateLinkBody.java
│ │ ├── CreateLinkRequest.java
│ │ ├── CreateLinkRequestBuilder.java
│ │ ├── CreateSessionBody.java
│ │ ├── CreateSessionRequest.java
│ │ ├── CreateSessionRequestBuilder.java
│ │ ├── Deleted.java
│ │ ├── DeltaCollectionPage.java
│ │ ├── DeltaRequest.java
│ │ ├── DeltaRequestBuilder.java
│ │ ├── DeltaResponse.java
│ │ ├── Drive.java
│ │ ├── DriveCollectionPage.java
│ │ ├── DriveCollectionRequest.java
│ │ ├── DriveCollectionRequestBuilder.java
│ │ ├── DriveRequest.java
│ │ ├── DriveRequestBuilder.java
│ │ ├── File.java
│ │ ├── FileSystemInfo.java
│ │ ├── Folder.java
│ │ ├── Hashes.java
│ │ ├── ICopyRequest.java
│ │ ├── ICopyRequestBuilder.java
│ │ ├── ICreateLinkRequest.java
│ │ ├── ICreateLinkRequestBuilder.java
│ │ ├── ICreateSessionRequest.java
│ │ ├── ICreateSessionRequestBuilder.java
│ │ ├── IDeltaCollectionPage.java
│ │ ├── IDeltaRequest.java
│ │ ├── IDeltaRequestBuilder.java
│ │ ├── IDriveCollectionPage.java
│ │ ├── IDriveCollectionRequest.java
│ │ ├── IDriveCollectionRequestBuilder.java
│ │ ├── IDriveRequest.java
│ │ ├── IDriveRequestBuilder.java
│ │ ├── IItemCollectionPage.java
│ │ ├── IItemCollectionRequest.java
│ │ ├── IItemCollectionRequestBuilder.java
│ │ ├── IItemRequest.java
│ │ ├── IItemRequestBuilder.java
│ │ ├── IItemStreamRequest.java
│ │ ├── IItemStreamRequestBuilder.java
│ │ ├── IOneDriveClient.java
│ │ ├── IPermissionCollectionPage.java
│ │ ├── IPermissionCollectionRequest.java
│ │ ├── IPermissionCollectionRequestBuilder.java
│ │ ├── IPermissionRequest.java
│ │ ├── IPermissionRequestBuilder.java
│ │ ├── IRecentCollectionPage.java
│ │ ├── IRecentRequest.java
│ │ ├── IRecentRequestBuilder.java
│ │ ├── ISearchCollectionPage.java
│ │ ├── ISearchRequest.java
│ │ ├── ISearchRequestBuilder.java
│ │ ├── IShareCollectionPage.java
│ │ ├── IShareCollectionRequest.java
│ │ ├── IShareCollectionRequestBuilder.java
│ │ ├── IShareRequest.java
│ │ ├── IShareRequestBuilder.java
│ │ ├── IStringCollectionPage.java
│ │ ├── IStringCollectionRequest.java
│ │ ├── IStringCollectionRequestBuilder.java
│ │ ├── IThumbnailRequest.java
│ │ ├── IThumbnailRequestBuilder.java
│ │ ├── IThumbnailSetCollectionPage.java
│ │ ├── IThumbnailSetCollectionRequest.java
│ │ ├── IThumbnailSetCollectionRequestBuilder.java
│ │ ├── IThumbnailSetRequest.java
│ │ ├── IThumbnailSetRequestBuilder.java
│ │ ├── IThumbnailStreamRequest.java
│ │ ├── IThumbnailStreamRequestBuilder.java
│ │ ├── Identity.java
│ │ ├── IdentitySet.java
│ │ ├── Image.java
│ │ ├── Item.java
│ │ ├── ItemCollectionPage.java
│ │ ├── ItemCollectionRequest.java
│ │ ├── ItemCollectionRequestBuilder.java
│ │ ├── ItemReference.java
│ │ ├── ItemRequest.java
│ │ ├── ItemRequestBuilder.java
│ │ ├── ItemStreamRequest.java
│ │ ├── ItemStreamRequestBuilder.java
│ │ ├── Location.java
│ │ ├── OneDriveClient.java
│ │ ├── OpenWithApp.java
│ │ ├── OpenWithSet.java
│ │ ├── Permission.java
│ │ ├── PermissionCollectionPage.java
│ │ ├── PermissionCollectionRequest.java
│ │ ├── PermissionCollectionRequestBuilder.java
│ │ ├── PermissionRequest.java
│ │ ├── PermissionRequestBuilder.java
│ │ ├── Photo.java
│ │ ├── Quota.java
│ │ ├── RecentCollectionPage.java
│ │ ├── RecentRequest.java
│ │ ├── RecentRequestBuilder.java
│ │ ├── SearchCollectionPage.java
│ │ ├── SearchRequest.java
│ │ ├── SearchRequestBuilder.java
│ │ ├── SearchResult.java
│ │ ├── Share.java
│ │ ├── ShareCollectionPage.java
│ │ ├── ShareCollectionRequest.java
│ │ ├── ShareCollectionRequestBuilder.java
│ │ ├── ShareRequest.java
│ │ ├── ShareRequestBuilder.java
│ │ ├── Shared.java
│ │ ├── SharingInvitation.java
│ │ ├── SharingLink.java
│ │ ├── SpecialFolder.java
│ │ ├── StringCollectionPage.java
│ │ ├── StringCollectionRequest.java
│ │ ├── StringCollectionRequestBuilder.java
│ │ ├── Thumbnail.java
│ │ ├── ThumbnailRequest.java
│ │ ├── ThumbnailRequestBuilder.java
│ │ ├── ThumbnailSet.java
│ │ ├── ThumbnailSetCollectionPage.java
│ │ ├── ThumbnailSetCollectionRequest.java
│ │ ├── ThumbnailSetCollectionRequestBuilder.java
│ │ ├── ThumbnailSetRequest.java
│ │ ├── ThumbnailSetRequestBuilder.java
│ │ ├── ThumbnailStreamRequest.java
│ │ ├── ThumbnailStreamRequestBuilder.java
│ │ ├── UploadSession.java
│ │ └── Video.java
│ ├── generated/
│ │ ├── BaseAsyncOperationStatus.java
│ │ ├── BaseAudio.java
│ │ ├── BaseChunkedUploadSessionDescriptor.java
│ │ ├── BaseCopyBody.java
│ │ ├── BaseCopyRequest.java
│ │ ├── BaseCopyRequestBuilder.java
│ │ ├── BaseCreateLinkBody.java
│ │ ├── BaseCreateLinkRequest.java
│ │ ├── BaseCreateLinkRequestBuilder.java
│ │ ├── BaseCreateSessionBody.java
│ │ ├── BaseCreateSessionRequest.java
│ │ ├── BaseCreateSessionRequestBuilder.java
│ │ ├── BaseDeleted.java
│ │ ├── BaseDeltaCollectionPage.java
│ │ ├── BaseDeltaCollectionResponse.java
│ │ ├── BaseDeltaRequest.java
│ │ ├── BaseDeltaRequestBuilder.java
│ │ ├── BaseDeltaResponse.java
│ │ ├── BaseDrive.java
│ │ ├── BaseDriveCollectionPage.java
│ │ ├── BaseDriveCollectionRequest.java
│ │ ├── BaseDriveCollectionRequestBuilder.java
│ │ ├── BaseDriveCollectionResponse.java
│ │ ├── BaseDriveRequest.java
│ │ ├── BaseDriveRequestBuilder.java
│ │ ├── BaseFile.java
│ │ ├── BaseFileSystemInfo.java
│ │ ├── BaseFolder.java
│ │ ├── BaseHashes.java
│ │ ├── BaseIdentity.java
│ │ ├── BaseIdentitySet.java
│ │ ├── BaseImage.java
│ │ ├── BaseItem.java
│ │ ├── BaseItemCollectionPage.java
│ │ ├── BaseItemCollectionRequest.java
│ │ ├── BaseItemCollectionRequestBuilder.java
│ │ ├── BaseItemCollectionResponse.java
│ │ ├── BaseItemReference.java
│ │ ├── BaseItemRequest.java
│ │ ├── BaseItemRequestBuilder.java
│ │ ├── BaseItemStreamRequest.java
│ │ ├── BaseItemStreamRequestBuilder.java
│ │ ├── BaseLocation.java
│ │ ├── BaseOneDriveClient.java
│ │ ├── BaseOpenWithApp.java
│ │ ├── BaseOpenWithSet.java
│ │ ├── BasePermission.java
│ │ ├── BasePermissionCollectionPage.java
│ │ ├── BasePermissionCollectionRequest.java
│ │ ├── BasePermissionCollectionRequestBuilder.java
│ │ ├── BasePermissionCollectionResponse.java
│ │ ├── BasePermissionRequest.java
│ │ ├── BasePermissionRequestBuilder.java
│ │ ├── BasePhoto.java
│ │ ├── BaseQuota.java
│ │ ├── BaseRecentCollectionPage.java
│ │ ├── BaseRecentCollectionResponse.java
│ │ ├── BaseRecentRequest.java
│ │ ├── BaseRecentRequestBuilder.java
│ │ ├── BaseSearchCollectionPage.java
│ │ ├── BaseSearchCollectionResponse.java
│ │ ├── BaseSearchRequest.java
│ │ ├── BaseSearchRequestBuilder.java
│ │ ├── BaseSearchResult.java
│ │ ├── BaseShare.java
│ │ ├── BaseShareCollectionPage.java
│ │ ├── BaseShareCollectionRequest.java
│ │ ├── BaseShareCollectionRequestBuilder.java
│ │ ├── BaseShareCollectionResponse.java
│ │ ├── BaseShareRequest.java
│ │ ├── BaseShareRequestBuilder.java
│ │ ├── BaseShared.java
│ │ ├── BaseSharingInvitation.java
│ │ ├── BaseSharingLink.java
│ │ ├── BaseSpecialFolder.java
│ │ ├── BaseStringCollectionPage.java
│ │ ├── BaseStringCollectionRequest.java
│ │ ├── BaseStringCollectionRequestBuilder.java
│ │ ├── BaseStringCollectionResponse.java
│ │ ├── BaseThumbnail.java
│ │ ├── BaseThumbnailRequest.java
│ │ ├── BaseThumbnailRequestBuilder.java
│ │ ├── BaseThumbnailSet.java
│ │ ├── BaseThumbnailSetCollectionPage.java
│ │ ├── BaseThumbnailSetCollectionRequest.java
│ │ ├── BaseThumbnailSetCollectionRequestBuilder.java
│ │ ├── BaseThumbnailSetCollectionResponse.java
│ │ ├── BaseThumbnailSetRequest.java
│ │ ├── BaseThumbnailSetRequestBuilder.java
│ │ ├── BaseThumbnailStreamRequest.java
│ │ ├── BaseThumbnailStreamRequestBuilder.java
│ │ ├── BaseUploadSession.java
│ │ ├── BaseVideo.java
│ │ ├── IBaseCopyRequest.java
│ │ ├── IBaseCopyRequestBuilder.java
│ │ ├── IBaseCreateLinkRequest.java
│ │ ├── IBaseCreateLinkRequestBuilder.java
│ │ ├── IBaseCreateSessionRequest.java
│ │ ├── IBaseCreateSessionRequestBuilder.java
│ │ ├── IBaseDeltaCollectionPage.java
│ │ ├── IBaseDeltaRequest.java
│ │ ├── IBaseDeltaRequestBuilder.java
│ │ ├── IBaseDriveCollectionPage.java
│ │ ├── IBaseDriveCollectionRequest.java
│ │ ├── IBaseDriveCollectionRequestBuilder.java
│ │ ├── IBaseDriveRequest.java
│ │ ├── IBaseDriveRequestBuilder.java
│ │ ├── IBaseItemCollectionPage.java
│ │ ├── IBaseItemCollectionRequest.java
│ │ ├── IBaseItemCollectionRequestBuilder.java
│ │ ├── IBaseItemRequest.java
│ │ ├── IBaseItemRequestBuilder.java
│ │ ├── IBaseItemStreamRequest.java
│ │ ├── IBaseItemStreamRequestBuilder.java
│ │ ├── IBaseOneDriveClient.java
│ │ ├── IBasePermissionCollectionPage.java
│ │ ├── IBasePermissionCollectionRequest.java
│ │ ├── IBasePermissionCollectionRequestBuilder.java
│ │ ├── IBasePermissionRequest.java
│ │ ├── IBasePermissionRequestBuilder.java
│ │ ├── IBaseRecentCollectionPage.java
│ │ ├── IBaseRecentRequest.java
│ │ ├── IBaseRecentRequestBuilder.java
│ │ ├── IBaseSearchCollectionPage.java
│ │ ├── IBaseSearchRequest.java
│ │ ├── IBaseSearchRequestBuilder.java
│ │ ├── IBaseShareCollectionPage.java
│ │ ├── IBaseShareCollectionRequest.java
│ │ ├── IBaseShareCollectionRequestBuilder.java
│ │ ├── IBaseShareRequest.java
│ │ ├── IBaseShareRequestBuilder.java
│ │ ├── IBaseStringCollectionPage.java
│ │ ├── IBaseStringCollectionRequest.java
│ │ ├── IBaseStringCollectionRequestBuilder.java
│ │ ├── IBaseThumbnailRequest.java
│ │ ├── IBaseThumbnailRequestBuilder.java
│ │ ├── IBaseThumbnailSetCollectionPage.java
│ │ ├── IBaseThumbnailSetCollectionRequest.java
│ │ ├── IBaseThumbnailSetCollectionRequestBuilder.java
│ │ ├── IBaseThumbnailSetRequest.java
│ │ ├── IBaseThumbnailSetRequestBuilder.java
│ │ ├── IBaseThumbnailStreamRequest.java
│ │ └── IBaseThumbnailStreamRequestBuilder.java
│ ├── http/
│ │ ├── BaseCollectionPage.java
│ │ ├── BaseCollectionRequest.java
│ │ ├── BaseRequest.java
│ │ ├── BaseRequestBuilder.java
│ │ ├── BaseStreamRequest.java
│ │ ├── DefaultConnectionFactory.java
│ │ ├── DefaultHttpProvider.java
│ │ ├── HttpMethod.java
│ │ ├── HttpResponseCode.java
│ │ ├── IBaseCollectionPage.java
│ │ ├── IConnection.java
│ │ ├── IConnectionFactory.java
│ │ ├── IHttpProvider.java
│ │ ├── IHttpRequest.java
│ │ ├── IHttpStreamRequest.java
│ │ ├── IRequestBuilder.java
│ │ ├── IRequestInterceptor.java
│ │ ├── IStatefulResponseHandler.java
│ │ ├── OneDriveError.java
│ │ ├── OneDriveErrorResponse.java
│ │ ├── OneDriveFatalServiceException.java
│ │ ├── OneDriveInnerError.java
│ │ ├── OneDriveServiceException.java
│ │ └── UrlConnection.java
│ ├── logger/
│ │ ├── DefaultLogger.java
│ │ ├── ILogger.java
│ │ └── LoggerLevel.java
│ ├── options/
│ │ ├── HeaderOption.java
│ │ ├── Option.java
│ │ └── QueryOption.java
│ └── serializer/
│ ├── CalendarSerializer.java
│ ├── DefaultSerializer.java
│ ├── GsonFactory.java
│ ├── IJsonBackedObject.java
│ └── ISerializer.java
└── settings.gradle
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
*.iml
.idea/
## Directory-based project format:
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# Gradle:
.idea/gradle.xml
.idea/libraries
# Mongo Explorer plugin:
.idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
.DS_Store
================================================
FILE: .travis.yml
================================================
language: android
env:
global:
- ADB_INSTALL_TIMEOUT=8
matrix:
- ANDROID_TARGET=15 ANDROID_ABI=default/armeabi-v7a
- ANDROID_TARGET=21 ANDROID_ABI=default/armeabi-v7a
android:
components:
- platform-tools
- extra
- android-23
- build-tools-23.0.1
before_script:
- echo no | android create avd --force -n test -t android-$ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
before_install:
- chmod +x gradlew
script:
- ./gradlew clean assemble
- ./gradlew connectedAndroidTest
================================================
FILE: LICENSE
================================================
OneDrive SDK Android
Copyright (c) 2015 Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# OneDrive SDK for Android
[  ](https://bintray.com/onedrive/Maven/onedrive-sdk-android/_latestVersion)
[](https://travis-ci.org/OneDrive/onedrive-sdk-android)
Integrate the [OneDrive API](https://dev.onedrive.com/README.htm) into your Android application!
## 1. Installation
### 1.1 Install AAR via Gradle
Add the maven central repository to your projects build.gradle file then add a compile dependency for com.onedrive.sdk:onedrive-sdk-android:1.3+
```gradle
repository {
jcenter()
}
dependency {
// Include the sdk as a dependency
compile ('com.onedrive.sdk:onedrive-sdk-android:1.3+') {
transitive = false
}
// Include the gson dependency
compile ('com.google.code.gson:gson:2.3.1')
// Include supported authentication methods for your application
compile ('com.microsoft.services.msa:msa-auth:0.8.+')
compile ('com.microsoft.aad:adal:1.1.+')
}
```
## 2. Getting started
### 2.1 Register your application
Register your application by following [these](https://dev.onedrive.com/app-registration.htm) steps.
### 2.2 Set your application Id and scopes
The OneDrive SDK for Android comes with Authenticator objects that have already been initialized for OneDrive with Microsoft accounts and Azure Activity Directory accounts. Replace the current settings with the required settings to start authenticating.
Application that authenicate via MSA need to have a [scope of access](https://github.com/OneDrive/onedrive-api-docs/blob/master/auth/msa_oauth.md#authentication-scopes) defined to use features on OneDrive. If your application is being used in for OneDrive for business AAD will need the [administrators consent](https://dev.onedrive.com/app-registration.htm) for your application to communicate with OneDrive.
Note that your _msa-client-id_ and _adal-client-id_ should look be in GUID format like `00000000-0000-0000-0000-000000000000`. For legacy MSA application, the _msa-client-id_ should look like `0000000000000000`.
```java
final MSAAuthenticator msaAuthenticator = new MSAAuthenticator() {
@Override
public String getClientId() {
return "<msa-client-id>";
}
@Override
public String[] getScopes() {
return new String[] { "onedrive.appfolder" };
}
}
final ADALAuthenticator adalAuthenticator = new ADALAuthenticator() {
@Override
public String getClientId() {
return "<adal-client-id>";
}
@Override
protected String getRedirectUrl() {
return "https://localhost";
}
}
```
### 2.3 Get a OneDriveClient object
Once you have set the correct application Id and scopes, you must get a **OneDriveClient** object to make requests against the service. The SDK will store the account information for you, but when a user logs on for the first time, it will invoke UI to get the user's account information.
```java
final IClientConfig oneDriveConfig = DefaultClientConfig.createWithAuthenticators(
msaAuthenticator,
adalAuthenticator);
final DefaultCallback<IOneDriveClient> callback = new DefaultCallback<IOneDriveClient>(activity) {
@Override
public void success(final IOneDriveClient result) {
// OneDrive client created successfully.
}
@Override
public void failure(final ClientException error) {
// Exception happened during creation.
}
};
final IOneDriveClient oneDriveClient = new OneDriveClient.Builder()
.fromConfig(oneDriveConfig)
.loginAndBuildClient(getActivity(), callback);
```
## 3. Make requests against the service
Once you have an OneDriveClient that is authenticated you can begin making calls against the service. The requests against the service look like our [REST API](https://dev.onedrive.com/README.htm).
### Get the drive
To retrieve a user's drive:
```java
oneDriveClient
.getDrive()
.buildRequest()
.get(new ICallback<Drive>() {
@Override
public void success(final Drive result) {
final String msg = "Found Drive " + result.id;
Toast.makeText(getActivity(), msg, Toast.LENGTH_SHORT)
.show();
}
...
// Handle failure case
});
```
### Get the root folder
To get a user's root folder of their drive:
```java
oneDriveClient
.getDrive()
.getRoot()
.buildRequest()
.get(new ICallback<Item>() {
@Override
public void success(final Item result) {
final String msg = "Found Root " + result.id;
Toast.makeText(getActivity(), msg, Toast.LENGTH_SHORT)
.show();
}
...
// Handle failure case
});
```
For a general overview of how the SDK is designed, see [overview](docs/overview.md).
## 4. Documentation
For a more detailed documentation see:
* [Overview](docs/overview.md)
* [Authentication](docs/authentication.md)
* [Extensibility](docs/extensibility.md)
* [Items](docs/items.md)
* [Collections](docs/collections.md)
* [Errors](docs/errors.md)
* [Contributions](docs/contributions.md)
## 5. Issues
For known issues, see [issues](https://github.com/OneDrive/onedrive-sdk-android/issues).
## 6. Contributions
The OneDrive SDK is open for contribution. Please read how to contribute to this project [here](docs/contributions.md).
## 7. Supported Android Versions
The OneDrive SDK for Android library is supported at runtime for [Android API revision 15](http://source.android.com/source/build-numbers.html) and greater. To build the sdk you need to install Android API revision 23 or greater.
## 8. License
[License](LICENSE)
## 9. Third Party Notices
[Third Party Notices](THIRD PARTY NOTICES)
## 10. Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
================================================
FILE: THIRD PARTY NOTICES
================================================
This file is based on or incorporates material from the projects listed below
(Third Party IP). The original copyright notice and the license under which
Microsoft received such Third Party IP, are set forth below. Such licenses and
notices are provided for informational purposes only. Microsoft licenses the
Third Party IP to you under the licensing terms for the Microsoft product.
Microsoft reserves all other rights not expressly granted under this agreement,
whether by implication, estoppel or otherwise.
Gson
Copyright 2008-2011 Google Inc.
Provided for Informational Purposes Only
Apache 2.0 License
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
================================================
FILE: build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
allprojects {
repositories {
maven {
url project.nightliesUrl
}
jcenter()
}
}
================================================
FILE: checkstyle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: Default
Description: none
-->
<module name="Checker">
<property name="severity" value="warning"/>
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
<module name="JavadocMethod">
<property name="suppressLoadErrors" value="true"/>
</module>
<module name="JavadocType"/>
<module name="JavadocVariable"/>
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName">
<metadata name="net.sf.eclipsecs.core.comment" value="only public starts without m"/>
<property name="applyToProtected" value="false"/>
<property name="applyToPrivate" value="false"/>
</module>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName">
<metadata name="net.sf.eclipsecs.core.comment" value="starts with 's'"/>
<property name="format" value="^[s][a-zA-Z0-9]*$"/>
</module>
<module name="TypeName"/>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="LineLength">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="EmptyForIteratorPad"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter">
<property name="tokens" value="COMMA,SEMI"/>
</module>
<module name="WhitespaceAround"/>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<module name="AvoidInlineConditionals"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="HiddenField"/>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MagicNumber"/>
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="DesignForExtension">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>
<module name="ArrayTypeStyle"/>
<module name="TodoComment">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="UpperEll"/>
<module name="MemberName">
<metadata name="net.sf.eclipsecs.core.comment" value="non public members should start with m"/>
<property name="applyToPublic" value="false"/>
<property name="format" value="^[m][a-zA-Z0-9]*$"/>
</module>
<module name="LineLength">
<property name="max" value="120"/>
</module>
<module name="NoWhitespaceAfter"/>
<module name="JavadocStyle">
<property name="checkEmptyJavadoc" value="true"/>
<property name="checkFirstSentence" value="false"/>
</module>
<module name="FinalParameters">
<property name="tokens" value="METHOD_DEF,CTOR_DEF,LITERAL_CATCH"/>
</module>
</module>
<module name="NewlineAtEndOfFile">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="Translation"/>
<module name="FileTabCharacter">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="RegexpSingleline">
<property name="severity" value="ignore"/>
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="Header">
<property name="header" value="// Copyright 2014 Microsoft Corporation"/>
<property name="ignoreLines" value="1"/>
</module>
</module>
================================================
FILE: docs/authentication.md
================================================
# Authenticating with the OneDrive SDK for Android
The OneDrive SDK requires that all requests are authenticated with OneDrive. This SDK is built to make it easy to incorporate any application with the authentication provider.
## Authenticators
Authenticators are provided with the SDK to handle authentication settings.
### Disambiguation Authenticator
In order to support as many different users as possible with a single application, we supplied a disambiguation authenticator to provide a user experience that determines which authenticator that user requires. This is the recommended way to distribute your application.
### MSA Authenticator
Use the **MSAAuthenticator** object for any account that needs to authenticate with the Microsoft account service.
Once you have your client id, you need to determine the appropriate scopes of authority that your application will need. For a complete list of scopes, consult the OAuth [documentation](https://dev.onedrive.com/auth/msa_oauth.htm#authentication-scopes).
* For applications that need to store data, use the __onedrive.appfolder__ scope and interact with /drive/special/approot.
* For applications that need to read only the contents of user's OneDrive, request the __onedrive.readonly__ scope.
Your client id should be formatted like `0000000000000000`.
```java
final MSAAuthenticator msaAuthenticator = new MSAAuthenticator {
@Override
public String getClientId() {
return "0000000000000000";
}
@Override
public String[] getScopes() {
return new String[] { "onedrive.appfolder" };
}
}
```
### ADAL Authenticator
Use the **ADALAuthenticator** object for accounts that are hosted on Azure Active Directory.
After you've [configured](https://dev.onedrive.com/auth/aad_oauth.htm) your service to allow access to an application for OneDrive, you will need create an **ADALAuthenticator** object with the client id and the redirect url in your application. Your client id should be formatted like `00000000-0000-0000-0000-000000000000`.
```java
final ADALAuthenticator adalAuthenticator = new ADALAuthenticator {
@Override
public String getClientId() {
return "<client_id>";
}
@Override
protected String getRedirectUrl() {
return "https://localhost";
}
}
```
## Using Authenticators in your application
Creating the **OneDriveClient** object enables the silent or interactive login appropriately, but the only functionality that needs be implemented is the sign out user experience. All the provided authenticators will clear preserved tokens after a sign out has completed, ensuring your application has a clean state.
```java
oneDriveClient.getAuthenticator().logout(new ICallback<Void>() {
@Override
public void success(final Void result) {
// Handle any state change your application needs to undergo
}
...
// Handle failure
```
================================================
FILE: docs/collections.md
================================================
# Collections in the OneDrive SDK for Android
The OneDrive SDK for Android allows you to work with item collections in OneDrive.
Collection information is contained within a `BaseCollectionPage` object, to which there are three core aspects:
* `getCurrentPage` The list of items within the current page.
* `getNextPage` The next page request builder. `null` if there are no additional pages.
* `getRawObject` The json that represents this page response, containing additional data.
## Getting a children collection by expansion
There are several navigation properties within the OneDrive service which can be expanded and returned in collections pages. In order to access these properties, the service request needs to call `expand(...)` once the request is issued.
#### Parameters
|Name|Description|
|----|-----------|
|_itemId_|The item id of the item that has the children.|
|_propertyToExpand_|The name of the navigation property to expand.|
|_callback_|The callback when the get call is returned.|
```java
final String itemId = "0000000000000000000000";
final String propertyToExpand = "children";
final ICallback<Item> callback = new ICallback<Item> {
@Override
public void success(final Item result) {
final IItemCollectionPage page = result.children;
Toast.makeText(getActivity(), "Got children", Toast.LENGTH_LONG).show();
}
...
// Handle failure
}
oneDriveClient
.getDrive()
.getItems(itemId)
.buildRequest()
.expand(propertyToExpand)
.get(callback);
```
## Getting a children collection by request
You can reference navigation properties directly by using the `getChildren()` function within the item's request builder.
#### Parameters
|Name|Description|
|----|-----------|
|_itemId_|The item id of the item that has the children.|
|_callback_|The callback when the get call is returned.|
```java
final String itemId = "0000000000000000000000";
final ICallback<IItemCollectionPage> callback = new ICallback<IItemCollectionPage> {
@Override
public void success(final IItemCollectionPage result) {
Toast.makeText(getActivity(), "Got children", Toast.LENGTH_LONG).show();
}
...
// Handle failure
}
oneDriveClient
.getDrive()
.getItems(itemId)
.getChildren()
.buildRequest()
.get(callback);
```
## Getting the next page
When getting a collection response, the `getNextPage()` function will return the null if there are no more pages, or the request builder to get the next page. By using these request builders you can retrieve all of the items under a collection no matter the size.
|Name|Description|
|----|-----------|
|**itemId**|The item id of the item that has the children|
|**callback**|The callback when the get call is returned|
```java
final String itemId = "0000000000000000000000";
final ICallback<IItemCollectionPage> callback = new ICallback<IItemCollectionPage> {
@Override
public void success(final IItemCollectionPage result) {
// If there was more pages retrieve them too
if (result.getNextPage() != null) {
result.getNextPage()
.buildRequest()
.get(new ICallback<IItemCollectionPage> ...);
}
Toast.makeText(getActivity(), "Got children", Toast.LENGTH_LONG).show();
}
...
// Handle failure
}
oneDriveClient
.getDrive()
.getItems(itemId)
.getChildren()
.buildRequest()
.get(callback);
```
## Create a folder
You can create a folder within an item collection by using the request builders `getDrive`, `getItems`, and `getChildren` with the `create` method.
#### Parameters
|Name|Description|
|----|-----------|
|_folderToCreate_|The folder to create.|
|_parentId_|The item id for the parent item.|
|_callback_|The callback when the folder has been created.|
```java
final String parentId = "0000000000000000000000";
final Item folderToCreate = new Item();
folderToCreate.name = "NewFolder";
folderToCreate.folder = new Folder();
final ICallback<Item> callback = new ICallback<Item> {
@Override
public void success(final Item result) {
Toast.makeText(getActivity(), "Created Folder", Toast.LENGTH_LONG).show();
}
...
// Handle failure
}
oneDriveClient
.getDrive()
.getItems(parentId)
.getChildren()
.buildRequest()
.create(folderToCreate, callback);
```
================================================
FILE: docs/contributions.md
================================================
# Contributing to the OneDrive SDK for Android
The OneDrive SDK is avaliable for all manner of contribution. There are a couple of different recommended paths to get contributions into the released version of this SDK.
__NOTE__ A signed a contribution license agreement is required for all contributions, and is checked automatically on new pull requests. Please read and sign the agreement https://cla.microsoft.com/ before starting any work for this repository.
## File issues
The best way to get started with a contribution is to start a dialog with the owners of this repository. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution.
## Submit pull requests for trivial changes
If you are making a change that does not affect the interface components and does not affect other downstream callers, feel free to make a pull request against the __master__ branch. The master branch will be updated frequently, and the gradle dependency will be kept closely inline with it.
Revisions of this nature will result in a 0.0.X change of the version number.
## Submit pull requests for features
If major functionality is being added, or there will need to be gestation time for a change, it should be submitted against the __feature__ branch.
Revisions of this nature will result in a 0.X.X change of the version number.
================================================
FILE: docs/errors.md
================================================
# Handling errors in the OneDrive SDK for Android
Errors in the OneDrive SDK for Android behave just like errors returned from the service. You can read more about them [here](https://github.com/OneDrive/onedrive-api-docs/blob/master/misc/errors.md).
Anytime you make a request against the service there is the potential for an error. You will see that all requests to the service can return an error. The errors are returned as `ClientException`, with possible subclasses `ClientAuthenticationException` and `OneDriveServiceException` which your application will want to handle.
## Checking the error
There are a few different types of errors that can occur during a network call. We have provided some helper methods to make it easy to check what kind of error occurred. These error types are defined in [OneDriveErrorCodes.java](../OneDriveSDK/src/main/java/com/onedrive/sdk/core/OneDriveErrorCodes.java).
```java
try {
// ...
} catch (final ClientExcepion ex) {
if (ex.isError(OneDriveErrorCodes.AuthenticationCancelled)) {
// Handle the specific authentication cancelled case
}
// Handle the authentication exception
}
```
### Client authentication exceptions
These exceptions represent errors during the authentication flow. The two exceptions are `AuthenticationCancelled` for interactive user cancelation and `AuthenticationFailure` for a problem with the underlying authentication system.
### OneDrive service exceptions
These are exceptions from the OneDrive service, that contain extra error diagnostic information. The standard error codes should give your application more than enough detail to message users. However, there is useful debug information contained in the response.
__Note__: Sometimes you might see a `OneDriveFatalServiceException`. If you do, please open a [new issue](https://github.com/OneDrive/onedrive-sdk-android/issues/new) so that we can fix it.
================================================
FILE: docs/extensibility.md
================================================
# Extensibility with the OneDrive SDK for Android
The OneDrive SDKs are built to allow for customization and enhancement over time while maintaining backwards compatibility.
## Contribution
Contributions are welcome on the OneDrive SDKs. To contribute, please open a [new issue](https://github.com/OneDrive/onedrive-sdk-android/issues/new) to start a dialog with the team about what you are creating.
__Note__ There is an area of the SDK which is not available for direct contribution, which is anything under the com.onedrive.sdk.generated package. These components are built using automated tools and will be overwritten. As this tooling matures this process will be open to contributions as well.
## Minor modification
OneDrive's service is described in accordance with OData. This service description is [available](https://api.onedrive.com/v1.0/$metadata) and continuously updated as new features become available. However, the OneDrive $metadata description does not encompass all features and functionality. To aid with elements of the service that are not described here, the `com.onedrive.sdk.extensions` package was created. The files are all generated automatically but will not be overwritten. Some functionality is already exposed in this manner, and here is example using the `OneDriveClient`.
The class hierarchy:
```java
class OneDriveClient extends BaseOneDriveClient implements IOneDriveClient {}
class BaseOneDriveClient extends BaseClient implements IBaseOneDriveClient {}
class BaseClient implements IBaseClient {}
```
The companion interface hierarchy:
```java
interface IOneDriveClient extends IBaseOneDriveClient {}
interface IBaseOneDriveClient extends IBaseClient {}
interface IBaseClient {}
```
- The `BaseClient` layer represents the under-pinnings of an OData client. These objects are open for modification and additions.
- The `BaseOneDriveClient` layer is supplied by the OData $metadata description, and is automatically populated with the features described therein.
- The `OneDriveClient` layer is where extra functionality above and beyond the $metadata description can be placed.
The OneDrive team keeps the interfaces up to date to detect backwards compatibility breaking changes.
Most classes generated at this 'top tier' will be empty to support future modification, and OneDriveClient already has been modified to support the 'drive()' behavior. 'drive' is exposed to shorten the `{service-root}/drives/{default-drive-id}` into `{service-root}/drive`.
## Major dependencies
During the construction of the `IOneDriveClient` object an `IClientConfig` is used. This configuration determines how the internal functionality of the SDK is supplied. By creating a new `IClientConfig` implementation the components can be modified or wholly replaced to best meet the needs of the caller.
### IHttpProvider
Provides the http fabric that is used for all network requests within the SDK.
### IAuthenticator
Provides the facilities to authenticate users and supply an authentication token for requests to the service.
### ISerializer
Serializes and deserializes the structured object from the service.
### IExecutors
Handles executing tasks for the SDK on foreground and background threads.
### ILogger
The logging system used by the SDK to report debug and error messages for debugging purposes.
================================================
FILE: docs/items.md
================================================
# Items in the OneDrive SDK for Android
Items in the OneDrive SDK behave just like items through the OneDrive API. All actions on items described in the OneDrive API are available through the SDK. For more information, see the [Items Reference](https://dev.onedrive.com/README.htm#item-resource).
The examples in this topic all use a previously created `oneDriveClient` object.
* [Get an item](#get-an-item)
* [Delete an item](#delete-an-item)
* [Upload a file](#upload-a-file)
* [Download a file](#download-a-file)
* [Move an item](#move-an-item)
* [Rename an item](#rename-an-item)
* [Copy an item](#copy-an-item)
* [Upload a large file](#upload-a-large-file)
## Get an item
To get an item, you construct request builders `getDrive` and `getItems`, you call `buildRequest` to build the request, and then make a final call to `get`.
#### Parameters
|Name|Description|
|----|-----------|
|_itemId_|The item id of the item to retrieve.|
|_callback_|The callback for when the get call is returned.|
#### Example
```java
//Enter the itemId here.
final String itemId = "0000000000000000000000";
final ICallback<Item> callback = new ICallback<Item>() {
@Override
public void success(final Item result) {
Toast.makeText(getActivity(), "Got item", Toast.LENGTH_LONG).show();
}
...
// Handle failure
}
oneDriveClient
.getDrive()
.getItems(itemId)
.buildRequest()
.get(callback);
```
## Delete an item
To delete an item, you construct request builders to get the item you want to delete, and then call `delete` on the item.
#### Parameters
|Name|Description|
|--------------|-----------|
|_itemId_|The item id of the item to delete.|
|_callback_|The callback for when the get call is completed.|
#### Example
```java
final String itemId = "0000000000000000000000";
final ICallback<Void> callback = new ICallback<Void>() {
@Override
public void success(final Void ignored) {
Toast.makeText(getActivity(), "Deleted item", Toast.LENGTH_LONG).show();
}
...
// Handle failure
}
oneDriveClient
.getDrive()
.getItems(itemId)
.buildRequest()
.delete(callback);
```
## Upload a file
To upload a file, you chain together build requests in this order: `getDrive`, `getItems`, `getChildren`, `byID`, and then `getContent`. You then call `buildRequest` to build the requests, and finally, `put` to complete the upload.
#### Parameters
|Name|Description|
|----|-----------|
|_filename_|The name of the file to upload.|
|_fileContents_|The byte array (byte[]) that contains the file contents.|
|_callback_|The callback when the file is uploaded, as well as progress reported.|
#### Example
```java
final String filename = "The Filename.txt";
final byte[] fileContents = new byte[] { /* The File contents to upload */};
final IProgressCallback<Item> callback = new IProgressCallback<Item>() {
public void success(final Item item) {
Toast.makeText(getActivity(), "Item uploaded", Toast.LENGTH_LONG).show();
}
...
// Handle progress
// Handle failure
}
oneDriveClient
.getDrive()
.getItems(ItemId)
.getChildren()
.byId(filename)
.getContent()
.buildRequest()
.put(fileContents, callback);
```
## Download a file
To download a file, you construct the request builders `getDrive`, `getItems`, and `getContent`, and then call `buildRequest` to build the request. Finally, you call `get` to retrieve the item to download.
#### Parameters
|Name|Description|
|----|-----------|
|_itemId_|The item id of the item to download.|
#### Example
```java
final String itemId = "0000000000000000000000";
final InputStream inputStream = oneDriveClient
.getDrive()
.getItems(itemId)
.getContent()
.buildRequest()
.get();
// Use the input stream
// Close the input stream
```
## Move an item
To move an item, construct request builders to get the item with `getItem`, and then call `update` with the new location.
#### Parameters
|Name|Description|
|----|-----------|
|_newParentId_|The new parent's item id.|
|_itemId_|The item id of the item to move.|
|_newLocation_|The specific aspects of the item to update.|
|_callback_|The callback when the item update has returned.|
#### Example
```java
final String newParentId = "0000000000000000000000";
final String itemId = "0000000000000000000000";
final Item newLocation = new Item();
newLocation.parentReference = new ItemReference();
newLocation.parentReference.id = newParentId;
final ICallback<Item> callback = new ICallback<Item>() {
@Override
public void success(final Item result) {
Toast.makeText(getActivity(), "Update the item location", Toast.LENGTH_LONG).show();
}
...
// Handle failure
}
oneDriveClient
.getDrive()
.getItems(itemId)
.buildRequest()
.update(newLocation, callback);
```
## Rename an item
Like all other operations, you rename an item by constructing request builders `getDrive` and `getItems` on the item, and then calling `update` with the new name.
#### Parameters
|Name|Description|
|----|-----------|
|_newItemName_|The new name for the item.|
|_itemId_|The item id of the item to rename.|
|_newName_|The specific aspects of the item to update.|
|_callback_|The callback when the item update has returned.|
#### Example
```java
final String newItemName = "My File.txt";
final String itemId = "0000000000000000000000";
final Item newName = new Item();
newName.name = newItemName;
final ICallback<Item> callback = new ICallback<Item>() {
@Override
public void success(final Item result) {
Toast.makeText(getActivity(), "Update the item name", Toast.LENGTH_LONG).show();
}
...
// Handle failure
}
oneDriveClient
.getDrive()
.getItems(itemId)
.buildRequest()
.update(newName, callback);
```
## Copy an item
Copy requests are processed asynchronously on the service, so the pattern is slightly different, and can require multiple sets of requests.
### Starting a copy request
You create a copy request for an item by constructing request builders `getDrive`, `getItems` and 'getCopy' on the item, and then calling `create` to start the request.
#### Parameters
|Name|Description|
|----|-----------|
|_itemId_|The item id of the item to copy.|
|_copiedItemName_|The name for the copied item.|
|_parentId_|The parent's item id for the copied item.|
|_callback_|The callback when the copy request has started.|
#### Example
```java
final String itemId = "0000000000000000000000";
final String copiedItemName = "My File Copy.txt"
final String newParentId = "0000000000000000000000";
final ItemReference parentReference = new ItemReference();
parentReference.id = newParentId;
final ICallback<AsyncMonitor<Item>> callback = new ICallback<AsyncMonitor<Item>>() {
@Override
public void success(final AsyncMonitor<Item> itemAsyncMonitor) {
Toast.makeText(getActivity(), "Started the copy session", Toast.LENGTH_LONG).show();
}
...
// Handle failure
};
oneDriveClient
.getDrive()
.getItems(itemId)
.getCopy(copiedItemName, parentReference)
.buildRequest()
.create(callback);
```
### Waiting for a copy request to finish
The result from the copy requests creation is a monitor that can be checked for status updates, return result of the operation, and automatically poll for the result.
Most applications will want to get the result to the user as soon as possible via a polling approach, the following shows how to get the resulting item from with a process notifications.
#### Parameters
|Name|Description|
|----|-----------|
|_millisBetweenPoll_|The time in milliseconds between progress updates.|
|_asyncMonitor_|The name for the copied item.|
|_callback_|The callback when the copy request has finished and progressed.|
#### Example
```java
final int millisBetweenPoll = 1000; // 1 second
final AsyncMonitor<Item> asyncMonitor = ...;
final IProgressCallback<Item> callback = new IProgressCallback<Item>() {
public void success(final Item item) {
Toast.makeText(getActivity(), "Item copied!", Toast.LENGTH_LONG).show();
}
public void progress(final int progress, final int progressMax) {
Toast.makeText(getActivity(), "Item copy process " + progress, Toast.LENGTH_SHORT).show();
}
...
// Handle failure
}
asyncMonitor
.pollForResult(millisBetweenPoll, callback);
```
## Upload a large file
Uploading a large file to OneDrive needs create upload session and uploading bytes to the session url.
#### Make create session request
You create a create session request for an item by constructing request builders `getDrive`, `getRoot`, `getItemWithPath`, `getCreateSession`, `buildRequest` on the item, and then calling `post` to start the create session request. The response is an upload session object which you call `createUploadProvider` of the object to create an upload provider which handles large file uploading.
#### Parameters
|Name|Description|
|----|-----------|
|_itemPath_|The path to the file.|
|_chunkedUploadSessionDescriptor_| The chunked upload session descriptor.|
|_oneDriveClient_|The one drive client.|
|_fileStream_|The input file stream.|
|_fileSize_|The size of the file.|
|_uploadType_|The upload class type.|
|_uploadOptions_|The upload options.|
|_callback_|The upload callback.|
|_chunkSize_|The chunk size for each upload chunk, default is 5MiB.|
|_maxRetry_| The max retry times for each upload chunk, default is 3.|
#### Example
```java
final String itemPath = "documents/file to copy.txt";
final Option uploadOptions = new QueryOption("@name.conflictBehavior", "fail");
final int chunkSize = 640 * 1024; //must be the multiple of 320KiB
final int maxRetry = 5;
final IProgressCallback<Item> callback = new IProgressCallback<Item>() {
@Override
public void progress(long current, long max) {
dialog.setProgress((int) current);
dialog.setMax((int) max);
}
@Override
public void success(Item item) {dialog.dismiss();
Toast.makeText(getActivity(),
application
.getString(R.string.upload_complete,
item.name),
Toast.LENGTH_LONG).show();
refresh();
}
@Override
public void failure(ClientException error) {
dialog.dismiss();
if (error.isError(OneDriveErrorCodes.NameAlreadyExists)) {
Toast.makeText(getActivity(),
R.string.upload_failed_name_conflict,
Toast.LENGTH_LONG).show();
} else {
Toast.makeText(getActivity(),
application
.getString(R.string.upload_failed,
filename),
Toast.LENGTH_LONG).show();
}
}
}
oneDriveClient
.getDrive()
.getRoot()
.getItemWithPath(itemPath)
.getCreateSession(new ChunkedUploadSessionDescriptor())
.buildRequest()
.post()
.createUploadProvider(oneDriveClient, fileStream, fileSize, Item.class)
.upload(Collections.singletonList(uploadOptions),
callback,
chunkSize,
maxRetry);
```
================================================
FILE: docs/overview.md
================================================
# Overview for the OneDrive SDK for Android
The OneDrive SDK for Android is designed to look just like the OneDrive API.
## OneDriveClient
A `OneDriveClient` is always associated with a authentication session. This can be created by using the **Builder** subclass of the `OneDriveClient` implementation, `loginAndBuildClient(..)`. All requests use this object to send information to the service and it should be constructed once for your applications life cycle.
## Resource model
Resources, like [items](/docs/items.md) or drives, are represented by `Item` and `Drive`, respectively. These objects contain properties that represent the properties of a resource. These objects can't make calls against the service-they are purely models.
To get the name of an item you address the `name` property. It is possible for any of these properties to be null at any time. To check if an item is a folder you address the `folder` property. If the item is a folder an `ODFolder` facet on that object will be returned, and it contains all of the properties described by the [folder](https://github.com/OneDrive/onedrive-api-docs/blob/master/facets/folder_facet.md) facet.
See [Resource model](https://github.com/onedrive/onedrive-api-docs/#resource-model) for more info.
The resources that are generated map to the json model described by the $metadata service document. There are items that might not be exposed because they expire very quickly or represent functionality that is not featured in this SDK as of yet. To access these fields use `getRawObject()` on the model items and access the specific properties that are not in the model.
## Issuing requests
To make requests against the service, first build a request with **RequestBuilder** and then build it into a Request object, which is then sent against the service. This follows the URL scheme that the OneDrive API uses for all its resources.
### Request builders
To generate requests you chain together calls on request builder objects. You get the first request builder from the `OneDriveClient` object. To get a drive, create a request builder by calling **OneDriveClient.getDrive**.
|Task | SDK | URL |
|:---------------|:-----------------:|:--------------------------------|
|Get a drive | `oneDriveClient.getDrive()` | GET api.onedrive.com/v1.0/drive/|
`getDrive` will return an `IDriveRequestBuilder` object. From `getDrive`, you can continue to chain the requests to get everything else in the API, like an item.
|Task | SDK | URL |
|:---------------|:----------------------------------:|:------------------------------------------|
|Get an item | `oneDriveClient.getDrive().getItems("1234")` | GET api.onedrive.com/v1.0/drive/items/1234|
Here, `oneDriveClient.getDrive()` returns an `IDriveRequestBuilder` that contains a method `getItems(...)` to get an `IItemRequestBuilder`.
Similarly, to get thumbnails, you chain together the request builders `getThumbnails` and `getItems`.
|Task | SDK | URL |
|----------------|--------------------------------|--------------------------|
| Get thumbnails | `... .getItems("1234").getThumbnails()` | .../items/1234/thumbnails|
Here, `oneDriveClient.getDrive().getItems("1234")` returns an `IItemRequestBuilder` that contains the method `getThumbnails()`.
This returns a collection of [thumbnail sets](https://github.com/OneDrive/onedrive-api-docs/blob/master/resources/thumbnailSet.md). To index the collection directly you can call:
|Task | SDK | URL |
|-------------------|-------------------------------------|----------------------------|
| Get thumbnail Set | `... .getItems("1234").getThumbnails("0")` | ...items/1234/thumbnails/0 |
To return a thumbnail set, and to get a specific [thumbnail](https://github.com/OneDrive/onedrive-api-docs/blob/master/resources/thumbnail.md), you can add the name of the thumbnail to the URL like this:
|Task | SDK | URL |
|-----------------|-----------------------------|------------------------|
| Get a thumbnail | `... .getThumbnails("0").getThumbnailSize("small")` | .../thumbnails/0/small |
### Requests
Once you have constructed the request you call the `buildRequest()` method on the request builder. This will construct the request object needed to make calls against the service.
For an item you call:
```java
final IItemRequest itemRequest = OneDriveClient.getDrive().getItems("1234").buildRequest();
```
All request builders have a `buildRequest()` method that can generate a `IHttpRequest` object. Request objects may have different methods on them depending on the type of request. To get an item you call:
```java
itemRequest.get(new ICallback<Item>{
@Override
public void success(final Item result) {
// This will make the network request and return the item
}
@Override
public void failure(final ClientException ex) {
// or an error if there was one
}
});
```
You could also chain this together with call above :
```java
OneDriveClient.getDrive().getItems("1234").buildRequest().get(new ICallback<Item>{
@Override
public void success(final Item result) {
// This will make the network request and return the item
}
@Override
public void failure(final ClientException ex) {
// or an error if there was one
}
});
```
See [items](/docs/items.md) for more info on items and [errors](/docs/errors.md) for more info on errors.
## Query options
If you only want to retrieve certain properties of a resource, you use `select` specify them. Here's how to get only the names and ids of an item:
```java
oneDriveClient.getDrive().getItems("1234").buildRequest().select("name,id").get(new ICallback<Item>() {
@Override
public void success(final Item result) {
// The item object will have null properties for everything except name and id
}
});
```
To expand certain properties on resources you can call a similar `expand` method, like this:
```java
oneDriveClient.getDrive().getItems("1234").buildRequest().expand("thumbnails").get(new ICallback<Item>() {
@Override
public void success(final Item result) {
// the item object will have collection page of thumbnails for its thumbnails property if thumbnails exist.
}
});
```
## Additional request options
If you need to include more specific behavior during a request, there are `Option` objects that you can add when calling `buildRequest`. See a detailed list of query parameters in the [OneDrive API optional query parameters](https://dev.onedrive.com/odata/optional-query-parameters.htm) documentation.
Here's an example of how to add an additional query parameter to sort the returned collection page results by size:
```java
final List<Option> options = new LinkedList<Option>();
options.add(new QueryOption("orderby", "size"));
oneDriveClient
.getDrive()
.getRoot()
.getChildren()
.buildRequest(options)
.get(new ICallback<IItemCollectionPage>() {
@Override
public void success(final IItemCollectionPage iItemCollectionPage) {
// Handle success of this page and its getNextPage() results will have their contents sorted by size
}
@Override
public void failure(final ClientException ex) {
// Handle failure
}
});
```
Here's how to add an additional HTTP header to request only a specific set of bytes from a file (partial download):
```java
final String myItemId = "1234"; // The id of the item to download
final List<Option> options = new LinkedList<Option>();
options.add(new HeaderOption("Range", "bytes=0-128"));
oneDriveClient()
.getDrive()
.getItems(myItemId)
.getContent()
.buildRequest(options)
.get(new ICallback<InputStream>() {
@Override
public void success(final InputStream inputStream) {
// Handle success of this partial range of the file
}
@Override
public void failure(final ClientException ex) {
// Handle failure
}
});
```
================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
================================================
FILE: gradle.properties
================================================
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.jvmargs=-XX:MaxPermSize=512m
mavenRepoUrl = https://api.bintray.com/maven/onedrive/Maven/onedrive-sdk-android
mavenGroupId = com.onedrive.sdk
mavenArtifactId = onedrive-sdk-android
mavenMajorVersion = 1
mavenMinorVersion = 3
mavenPatchVersion = 1
nightliesUrl = http://dl.bintray.com/onedrive/Maven
================================================
FILE: gradlew
================================================
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
================================================
FILE: gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: onedrivesdk/.gitignore
================================================
/build
================================================
FILE: onedrivesdk/build.gradle
================================================
apply plugin: 'com.android.library'
apply plugin: 'maven'
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
def getVersionCode() {
return mavenMajorVersion.toInteger() * 10000 + mavenMinorVersion.toInteger() * 100 + mavenPatchVersion.toInteger()
}
def getVersionName() {
return "${mavenMajorVersion}.${mavenMinorVersion}.${mavenPatchVersion}"
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode this.getVersionCode()
versionName this.getVersionName()
}
lintOptions {
disable 'InvalidPackage', 'AllowBackup'
}
buildTypes {
debug {
testCoverageEnabled = true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
apply plugin: 'checkstyle'
check.dependsOn 'checkstyle'
task checkstyle(type: Checkstyle) {
configFile file("../checkstyle.xml")
source 'src'
include 'main/**/*.java'
exclude '**/generated/**',
'**/extensions/**',
'**/core/OneDriveErrorCodes.java',
'**/http/OneDrive*Error*.java',
'**/authentication/ServiceInfo.java',
'**/authentication/DiscoveryServiceResponse.java'
ignoreFailures = false
classpath = files()
}
dependencies {
compile ('com.microsoft.services.msa:msa-auth:0.8.4') {
exclude module: 'com.microsoft.services.msa'
}
compile ('com.microsoft.aad:adal:1.1.7') {
exclude module: 'com.microsoft.aad'
}
compile ('com.google.code.gson:gson:2.3.1') {
exclude module: 'com.google.code.gson'
}
}
uploadArchives {
def bintrayUsername = ""
def bintrayApikey = ""
if (project.rootProject.file('local.properties').exists()) {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintrayUsername = properties.getProperty('bintray.user')
bintrayApikey = properties.getProperty('bintray.apikey')
}
configuration = configurations.archives
repositories.mavenDeployer {
pom {
setGroupId project.mavenGroupId
setArtifactId project.mavenArtifactId
setVersion getVersionName()
}
repository (url: project.mavenRepoUrl) {
authentication(
// put these values in local file ~/.gradle/gradle.properties
userName: project.hasProperty("bintrayUsername") ? project.bintrayUsername : bintrayUsername,
password: project.hasProperty("bintrayApikey") ? project.bintrayApikey : bintrayApikey
)
}
}
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath())
classpath += configurations.compile
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives javadocJar
archives sourcesJar
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/concurrency/MockExecutors.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.concurrency;
import com.onedrive.sdk.core.ClientException;
/**
* Mock {@see IExecutors}, everything runs on the current thread
*/
public class MockExecutors implements IExecutors {
@Override
public void performOnBackground(final Runnable runnable) {
runnable.run();
}
@Override
public <Result> void performOnForeground(final Result result,
final ICallback<Result> callback) {
callback.success(result);
}
@Override
public <Result> void performOnForeground(final int progress,
final int progressMax,
final IProgressCallback<Result> callback) {
callback.progress(progress, progressMax);
}
@Override
public <Result> void performOnForeground(final ClientException exception,
final ICallback<Result> callback) {
callback.failure(exception);
}
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/core/CoreTests.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.core;
import android.test.AndroidTestCase;
import com.microsoft.onedrivesdk.BuildConfig;
import junit.framework.Assert;
/**
* Test cases for the Core components
*/
public class CoreTests extends AndroidTestCase {
public void testMinVersionNumber() throws Exception {
Assert.assertTrue("Regression in version number, " + BuildConfig.VERSION_CODE, BuildConfig.VERSION_CODE >= 10102);
}
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/core/MockClient.java
================================================
package com.onedrive.sdk.core;
import com.onedrive.sdk.authentication.IAuthenticator;
import com.onedrive.sdk.concurrency.IExecutors;
import com.onedrive.sdk.extensions.IDriveCollectionRequestBuilder;
import com.onedrive.sdk.extensions.IDriveRequestBuilder;
import com.onedrive.sdk.extensions.IOneDriveClient;
import com.onedrive.sdk.extensions.IShareCollectionRequestBuilder;
import com.onedrive.sdk.extensions.IShareRequestBuilder;
import com.onedrive.sdk.http.IHttpProvider;
import com.onedrive.sdk.logger.ILogger;
import com.onedrive.sdk.serializer.ISerializer;
public class MockClient implements IOneDriveClient{
private ILogger mLogger;
@Override
public IDriveRequestBuilder getDrive() {
return null;
}
@Override
public IDriveCollectionRequestBuilder getDrives() {
return null;
}
@Override
public IDriveRequestBuilder getDrive(String id) {
return null;
}
@Override
public IShareCollectionRequestBuilder getShares() {
return null;
}
@Override
public IShareRequestBuilder getShare(String id) {
return null;
}
@Override
public IAuthenticator getAuthenticator() {
return null;
}
@Override
public String getServiceRoot() {
return null;
}
@Override
public IExecutors getExecutors() {
return null;
}
@Override
public IHttpProvider getHttpProvider() {
return null;
}
@Override
public ILogger getLogger() {
return mLogger;
}
@Override
public ISerializer getSerializer() {
return null;
}
@Override
public void validate() {
}
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/BaseRequestTests.java
================================================
package com.onedrive.sdk.http;
import android.graphics.Path;
import android.net.Uri;
import android.test.AndroidTestCase;
import com.onedrive.sdk.core.MockClient;
import com.onedrive.sdk.extensions.IOneDriveClient;
import com.onedrive.sdk.options.Option;
import com.onedrive.sdk.options.QueryOption;
import junit.framework.Assert;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
/**
* Test cases for (@see BaseRequest)
*/
public class BaseRequestTests extends AndroidTestCase{
private IOneDriveClient mockClient;
private BaseRequest mRequest;
private final String baseUrl = "https://localhost:8080";
private final String[] testingSegments = { "Hello World", "你好世界", "Καλημέρα κόσμε", "안녕하세요", "コンニチハ", "แผ่นดินฮั่นเสื่อมโทรมแสนสังเวช" };
@Override
public void setUp() {
mockClient = new MockClient();
StringBuilder sb = new StringBuilder(baseUrl);
for (String segment : testingSegments) {
sb.append("/");
sb.append(segment);
}
mRequest = new BaseRequest(sb.toString(), mockClient, /*options:*/ null, null) {
@Override
public IOneDriveClient getClient() {
return mockClient;
}
};
}
public void testUrlEncoded() throws Exception {
URL requestUrl = mRequest.getRequestUrl();
final Uri.Builder expectBuilder = Uri.parse(baseUrl).buildUpon();
for (String segment : testingSegments) {
expectBuilder.appendPath(segment);
}
Assert.assertEquals(expectBuilder.build().toString(), requestUrl.toString());
}
public void testUrlWithQuery() throws Exception {
final String queryInUrl = "expand=foo&$select=id,name";
final String testUrl = baseUrl + "?" + queryInUrl;
final List<Option> options = new ArrayList<Option>();
final QueryOption queryInOption = new QueryOption("queryWithEncode", "!");
options.add(queryInOption);
mRequest = new BaseRequest(testUrl, mockClient, options, null) {
public IOneDriveClient getClient() {
return mockClient;
}
};
URL requestUrl = mRequest.getRequestUrl();
final Uri.Builder expectBuilder = Uri.parse(testUrl).buildUpon();
for (final Option option: options) {
expectBuilder.appendQueryParameter(option.getName(), option.getValue());
}
Assert.assertEquals(expectBuilder.build().toString(), requestUrl.toString());
}
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/DefaultHttpProviderTests.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.http;
import com.onedrive.sdk.concurrency.AsyncMonitorLocation;
import com.onedrive.sdk.concurrency.AsyncMonitorResponseHandler;
import com.onedrive.sdk.concurrency.ChunkedUploadResponseHandler;
import com.onedrive.sdk.concurrency.IProgressCallback;
import com.onedrive.sdk.concurrency.MockExecutors;
import com.onedrive.sdk.core.ClientException;
import com.onedrive.sdk.core.OneDriveErrorCodes;
import com.onedrive.sdk.extensions.AsyncOperationStatus;
import com.onedrive.sdk.extensions.ChunkedUploadResult;
import com.onedrive.sdk.extensions.Drive;
import com.onedrive.sdk.extensions.Item;
import com.onedrive.sdk.extensions.UploadSession;
import com.onedrive.sdk.logger.MockLogger;
import com.onedrive.sdk.serializer.MockSerializer;
import android.test.AndroidTestCase;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Test cases for {@see DefaultHttpProvider}
*/
public class DefaultHttpProviderTests extends AndroidTestCase {
private MockInterceptor mInterceptor;
private DefaultHttpProvider mProvider;
public void testAsyncSessionResult() throws Exception {
final String expectedLocation = "http://localhost:1234";
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 200;
}
@Override
public String getJsonResponse() {
return "{ \"operation\": \"Copy\", \"percentageComplete\": 100.0, \"status\": \"inProgress\" }";
}
@Override
public Map<String, String> getHeaders() {
final HashMap<String, String> map = new HashMap<>();
map.put("Location", expectedLocation);
return map;
}
};
setDefaultHttpProvider(new AsyncOperationStatus());
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
AsyncOperationStatus response = mProvider.send(new MockRequest(), AsyncOperationStatus.class, null, new AsyncMonitorResponseHandler());
assertEquals(expectedLocation, response.seeOther);
assertEquals(1, mInterceptor.getInterceptionCount());
}
public void testAsyncSessionResultCompleted() throws Exception {
final String expectedLocation = "http://localhost:1111";
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 303;
}
@Override
public String getJsonResponse() {
return "";
}
@Override
public Map<String, String> getHeaders() {
final HashMap<String, String> map = new HashMap<>();
map.put("Location", expectedLocation);
return map;
}
};
setDefaultHttpProvider(new AsyncOperationStatus());
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
AsyncOperationStatus response = mProvider.send(new MockRequest(), AsyncOperationStatus.class, null, new AsyncMonitorResponseHandler());
assertEquals(expectedLocation, response.seeOther);
assertEquals("Completed", response.status);
assertEquals(1, mInterceptor.getInterceptionCount());
}
public void testNoContentType() throws Exception {
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 200;
}
@Override
public String getJsonResponse() {
return "{ \"id\": \"zzz\" }";
}
@Override
public Map<String, String> getHeaders() {
return new HashMap<>();
}
};
setDefaultHttpProvider(null);
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
try {
mProvider.send(new MockRequest(), Drive.class, null);
fail("Expected exception");
} catch (final ClientException ce) {
if (!(ce.getCause() instanceof NullPointerException)) {
fail("Wrong inner exception!");
}
}
assertEquals(1, mInterceptor.getInterceptionCount());
}
public void testDriveResponse() throws Exception {
final String driveId = "driveId";
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 200;
}
@Override
public String getJsonResponse() {
return "{ \"id\": \"zzz\" }";
}
@Override
public Map<String, String> getHeaders() {
final HashMap<String, String> map = new HashMap<>();
map.put("Content-Type", "application/json");
return map;
}
};
final Drive expectedDrive = new Drive();
expectedDrive.id = driveId;
setDefaultHttpProvider(expectedDrive);
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
final Drive drive = mProvider.send(new MockRequest(), Drive.class, null);
assertEquals(driveId, drive.id);
assertEquals(1, mInterceptor.getInterceptionCount());
}
public void testBinaryResponse() throws Exception {
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 200;
}
@Override
public String getJsonResponse() {
return "{ \"id\": \"zzz\" }";
}
@Override
public Map<String, String> getHeaders() {
final HashMap<String, String> map = new HashMap<>();
map.put("Content-Type", "application/octet-stream");
return map;
}
};
setDefaultHttpProvider(null);
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
mProvider.send(new MockRequest(), InputStream.class, null);
assertEquals(1, mInterceptor.getInterceptionCount());
}
public void testPostItem() throws Exception {
final String itemId = "itemId";
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 200;
}
@Override
public String getJsonResponse() {
return "{ \"id\": \"zzz\" }";
}
@Override
public Map<String, String> getHeaders() {
final HashMap<String, String> map = new HashMap<>();
map.put("Content-Type", "application/json");
return map;
}
};
final Item expectedItem = new Item();
expectedItem.id = itemId;
setDefaultHttpProvider(expectedItem);
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
final Item item = mProvider.send(new MockRequest(), Item.class, new Item());
assertEquals(itemId, item.id);
assertEquals(1, mInterceptor.getInterceptionCount());
}
public void testPostByte() throws Exception {
final String itemId = "itemId";
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 200;
}
@Override
public String getJsonResponse() {
return "{ \"id\": \"zzz\" }";
}
@Override
public Map<String, String> getHeaders() {
final HashMap<String, String> map = new HashMap<>();
map.put("Content-Type", "application/json");
return map;
}
};
final Item expectedItem = new Item();
expectedItem.id = itemId;
setDefaultHttpProvider(expectedItem);
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
final AtomicBoolean progress = new AtomicBoolean(false);
final AtomicBoolean success = new AtomicBoolean(false);
final AtomicBoolean failure = new AtomicBoolean(false);
final IProgressCallback<Item> progressCallback = new IProgressCallback<Item>() {
@Override
public void progress(final long current, final long max) {
progress.set(true);
}
@Override
public void success(final Item item) {
success.set(true);
}
@Override
public void failure(final ClientException ex) {
failure.set(true);
}
};
mProvider.send(new MockRequest(), progressCallback, Item.class, new byte[]{1, 2, 3, 4});
assertTrue(progress.get());
assertTrue(success.get());
assertEquals(1, mInterceptor.getInterceptionCount());
}
public void testErrorResponse() throws Exception {
final OneDriveErrorCodes expectedErrorCode = OneDriveErrorCodes.InvalidRequest;
final String expectedMessage = "Test error!";
final OneDriveErrorResponse toSerialize = new OneDriveErrorResponse();
toSerialize.error = new OneDriveError();
toSerialize.error.code = expectedErrorCode.toString();
toSerialize.error.message = expectedMessage;
toSerialize.error.innererror = null;
setDefaultHttpProvider(toSerialize);
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 415;
}
@Override
public String getJsonResponse() {
return "{}";
}
@Override
public Map<String, String> getHeaders() {
final HashMap<String, String> headers = new HashMap<>();
headers.put("Content-Type", "application/json");
return headers;
}
};
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
try {
mProvider.send(new MockRequest(), Item.class, null);
fail("Expected exception in previous statement");
} catch (final OneDriveServiceException e) {
assertTrue(e.isError(expectedErrorCode));
assertEquals(expectedMessage, e.getServiceError().message);
}
}
public void testBodyLessResponse() throws Exception {
final int[] codes = new int[] {204, 304 };
final AtomicInteger currentCode = new AtomicInteger(0);
setDefaultHttpProvider(null);
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return codes[currentCode.get()];
}
@Override
public String getJsonResponse() {
throw new UnsupportedOperationException("Should not ever hit this");
}
@Override
public Map<String, String> getHeaders() {
return new HashMap<>();
}
};
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
for (final int ignored : codes) {
Item result = mProvider.send(new MockRequest(), Item.class, null);
currentCode.incrementAndGet();
assertNull(result);
}
assertEquals(codes.length, mInterceptor.getInterceptionCount());
}
public void testMonitorCreation() throws Exception {
final String expectedLocation = "http://localhost/monitorlocation";
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 202;
}
@Override
public String getJsonResponse() {
return "{ }";
}
@Override
public Map<String, String> getHeaders() {
final HashMap<String, String> map = new HashMap<>();
map.put("Location", expectedLocation);
return map;
}
};
setDefaultHttpProvider(new AsyncMonitorLocation(""));
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
final AsyncMonitorLocation monitorLocation = mProvider.send(new MockRequest(), AsyncMonitorLocation.class, new Item());
assertEquals(expectedLocation, monitorLocation.getLocation());
assertEquals(1, mInterceptor.getInterceptionCount());
}
public void testUploadReturnNextSession() throws Exception {
final String expectedLocation = "http://localhost/up/uploadlocation";
final byte[] chunk = new byte[100];
final UploadSession<Item> toSerialize = new UploadSession<Item>();
toSerialize.uploadUrl = expectedLocation;
toSerialize.nextExpectedRanges = Arrays.asList("100-199");
setDefaultHttpProvider(toSerialize);
final ChunkedUploadResponseHandler<Item> handler = new ChunkedUploadResponseHandler(Item.class);
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 202;
}
@Override
public String getJsonResponse() {
return "{ }";
}
@Override
public Map<String, String> getHeaders() {
final HashMap<String, String> headers = new HashMap<>();
headers.put("Content-Type", "application/json");
return headers;
}
};
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
ChunkedUploadResult result = mProvider.send(new MockRequest(), ChunkedUploadResult.class, chunk, handler);
assertTrue(result.chunkCompleted());
assertEquals(result.getSession(), toSerialize);
}
public void testUploadReturnUploadedItem() throws Exception {
final String expectedLocation = "http://localhost/up/uploadlocation";
final byte[] chunk = new byte[30];
final Item toSerialize = new Item();
toSerialize.id = "abc!123";
setDefaultHttpProvider(toSerialize);
final ChunkedUploadResponseHandler<Item> handler = new ChunkedUploadResponseHandler(Item.class);
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 201;
}
@Override
public String getJsonResponse() {
return "{ }";
}
@Override
public Map<String, String> getHeaders() {
final HashMap<String, String> headers = new HashMap<>();
headers.put("Content-Type", "application/json");
return headers;
}
};
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
ChunkedUploadResult result = mProvider.send(new MockRequest(), ChunkedUploadResult.class, chunk, handler);
assertTrue(result.uploadCompleted());
assertEquals(toSerialize, result.getItem());
}
public void testUploadReturnError() throws Exception {
final String expectedLocation = "http://localhost/up/uploadlocation";
final byte[] chunk = new byte[30];
final OneDriveErrorCodes errorCode = OneDriveErrorCodes.UploadSessionFailed;
final OneDriveError toSerialize = new OneDriveError();
toSerialize.code = errorCode.toString();
setDefaultHttpProvider(toSerialize);
final ChunkedUploadResponseHandler<Item> handler = new ChunkedUploadResponseHandler(Item.class);
final ITestData data = new ITestData() {
@Override
public int getRequestCode() {
return 500;
}
@Override
public String getJsonResponse() {
return "{ }";
}
@Override
public Map<String, String> getHeaders() {
final HashMap<String, String> headers = new HashMap<>();
headers.put("Content-Type", "application/json");
return headers;
}
};
mProvider.setConnectionFactory(new MockSingleConnectionFactory(new TestDataConnection(data)));
ChunkedUploadResult result = mProvider.send(new MockRequest(), ChunkedUploadResult.class, chunk, handler);
assertFalse(result.chunkCompleted());
assertTrue(result.getError().isError(errorCode));
}
/**
* Mock {@see IConnection} backed with test data
*/
private class TestDataConnection implements IConnection {
private final ITestData mData;
public TestDataConnection(ITestData data) {
mData = data;
}
@Override
public void setFollowRedirects(final boolean followRedirects) {
}
@Override
public void addRequestHeader(final String headerName, final String headerValue) {
}
@Override
public OutputStream getOutputStream() throws IOException {
return new ByteArrayOutputStream();
}
@Override
public InputStream getInputStream() throws IOException {
return new ByteArrayInputStream(mData.getJsonResponse().getBytes());
}
@Override
public int getResponseCode() throws IOException {
return mData.getRequestCode();
}
@Override
public String getResponseMessage() throws IOException {
return null;
}
@Override
public void close() {
}
@Override
public Map<String, String> getHeaders() {
return mData.getHeaders();
}
@Override
public String getRequestMethod() {
return null;
}
@Override
public void setContentLength(int length) {
}
}
/**
* Test data to use in configuring the mock connection object
*/
private interface ITestData {
int getRequestCode();
String getJsonResponse();
Map<String,String> getHeaders();
}
/**
* Configures the http provider for test cases
* @param toSerialize The object to serialize
*/
private void setDefaultHttpProvider(final Object toSerialize) {
mProvider = new DefaultHttpProvider(new MockSerializer(toSerialize, ""),
mInterceptor = new MockInterceptor(),
new MockExecutors(),
new MockLogger());
}
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/MockInterceptor.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.http;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Mock {@see IRequestInterceptor}
*/
public class MockInterceptor implements IRequestInterceptor {
/**
* Interception counter
*/
private AtomicInteger mInterceptionCount = new AtomicInteger(0);
@Override
public void intercept(final IHttpRequest request) {
mInterceptionCount.incrementAndGet();
}
/**
* Gets the number of intercepted requests
* @return The number of intercepted requests
*/
public int getInterceptionCount() {
return mInterceptionCount.get();
}
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/MockRequest.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.http;
import com.onedrive.sdk.options.HeaderOption;
import com.onedrive.sdk.options.Option;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
/**
* Mock request for {@see IHttpRequest}
*/
class MockRequest implements IHttpRequest {
@Override
public URL getRequestUrl() {
try {
return new URL("http://localhost");
} catch (final MalformedURLException ignored) {
}
return null;
}
@Override
public HttpMethod getHttpMethod() {
return HttpMethod.GET;
}
@Override
public List<HeaderOption> getHeaders() {
return new ArrayList<>();
}
@Override
public List<Option> getOptions() {
return new ArrayList<>();
}
@Override
public void addHeader(final String header, final String value) {
}
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/MockSingleConnectionFactory.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.http;
import java.io.IOException;
/**
* Mock {@see IConnectionFactory} that only returns a single connect
*/
class MockSingleConnectionFactory implements IConnectionFactory {
/**
* The connection to return
*/
private final IConnection mConnection;
/**
* Creates an instance of this connection factory
* @param connection The connection to return
*/
public MockSingleConnectionFactory(IConnection connection) {
mConnection = connection;
}
@Override
public IConnection createFromRequest(final IHttpRequest request) throws IOException {
return mConnection;
}
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/logger/MockLogger.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.logger;
/**
* Mock {@see ILogger}, logs nothing
*/
public class MockLogger implements ILogger {
@Override
public void setLoggingLevel(final LoggerLevel level) {
}
@Override
public LoggerLevel getLoggingLevel() {
return null;
}
@Override
public void logDebug(final String message) {
}
@Override
public void logError(final String message, final Throwable throwable) {
}
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/serializer/DefaultSerializerTests.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.serializer;
import com.onedrive.sdk.extensions.Drive;
import com.onedrive.sdk.logger.DefaultLogger;
import android.test.AndroidTestCase;
/**
* Test cases for the {@see DefaultSerializer}
*/
public class DefaultSerializerTests extends AndroidTestCase {
/**
* Make sure that deserializing a Drive also returns members from BaseDrive
* @throws Exception If there is an exception during the test
*/
public void testDriveDeserialization() throws Exception {
final DefaultSerializer serializer = new DefaultSerializer(new DefaultLogger());
String source = "{\"@odata.context\":\"https://api.onedrive.com/v1.0/$metadata#drives/$entity\",\"id\":\"8bf6ae90006c4a4c\",\"driveType\":\"personal\",\"owner\":{\"user\":{\"displayName\":\"Peter\",\"id\":\"8bf6ae90006c4a4c\"}},\"quota\":{\"deleted\":1485718314,\"remaining\":983887466461,\"state\":\"normal\",\"total\":1142461300736,\"used\":158573834275}}";
Drive result = serializer.deserializeObject(source, Drive.class);
assertNotNull(result);
assertEquals("personal", result.driveType);
assertEquals(Long.valueOf(983887466461L), result.quota.remaining);
assertEquals("8bf6ae90006c4a4c", result.id);
}
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/serializer/ISO8601Test.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.serializer;
import junit.framework.Assert;
import android.test.AndroidTestCase;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
/**
* Test cases for the {@see ISO8601} class
*/
public class ISO8601Test extends AndroidTestCase {
/**
* Make sure that dates with and without millis can be converted properly into strings
* @throws Exception If there is an exception during the test
*/
public void testFromDate() throws Exception {
// I sure hope this works in other timezones...
TimeZone.setDefault(TimeZone.getTimeZone("PST"));
final Calendar date = Calendar.getInstance();
date.setTime(new Date(123456789012345L));
Assert.assertEquals("5882-03-11T00:30:12.345Z", CalendarSerializer.serialize(date));
final Calendar dateNoMillis = Calendar.getInstance();
dateNoMillis.setTime(new Date(123456789012000L));
Assert.assertEquals("5882-03-11T00:30:12.000Z", CalendarSerializer.serialize(dateNoMillis));
}
/**
* Make sure that dates in string format with and without millis can be converted properly into date objects
* @throws Exception If there is an exception during the test
*/
public void testToDate() throws Exception {
TimeZone.setDefault(TimeZone.getTimeZone("PST"));
final long toTheSecondDate = 123456789012000L;
final Calendar dateToSecond = CalendarSerializer.deserialize("5882-03-11T00:30:12Z");
Assert.assertEquals(toTheSecondDate, dateToSecond.getTimeInMillis());
final long toTheMillisecondDate = 123456789012345L;
final Calendar dateToTheMillisecond = CalendarSerializer.deserialize("5882-03-11T00:30:12.345Z");
Assert.assertEquals(toTheMillisecondDate, dateToTheMillisecond.getTimeInMillis());
final Calendar dateToTheExtremeMillisecond = CalendarSerializer.deserialize("5882-03-11T00:30:12.3456789Z");
Assert.assertEquals(toTheMillisecondDate, dateToTheExtremeMillisecond.getTimeInMillis());
}
}
================================================
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/serializer/MockSerializer.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.serializer;
/**
* Mock instance of the {@see ISerializer}
*/
public class MockSerializer implements ISerializer {
/**
* The deserialization response
*/
private final Object mDeserializeReturn;
/**
* The serialization response
*/
private final String mSerializeReturn;
/**
* Creates a MockSerializer
* @param deserializeReturn The object to return on deserializeObject calls
*/
public MockSerializer(final Object deserializeReturn, final String serializeReturn) {
mDeserializeReturn = deserializeReturn;
mSerializeReturn = serializeReturn;
}
@Override
public <T> T deserializeObject(final String inputString, final Class<T> clazz) {
//noinspection unchecked
return (T) mDeserializeReturn;
}
@Override
public <T> String serializeObject(final T serializableObject) {
return mSerializeReturn;
}
}
================================================
FILE: onedrivesdk/src/main/AndroidManifest.xml
================================================
<manifest package="com.microsoft.onedrivesdk" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.USE_CREDENTIALS"/>
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
</manifest>
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ADALAccountInfo.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import com.microsoft.aad.adal.AuthenticationResult;
import com.onedrive.sdk.logger.ILogger;
/**
* Account information for an ADAL based account.
*/
public class ADALAccountInfo implements IAccountInfo {
/**
* The authenticator that can refresh this account.
*/
private final ADALAuthenticator mAuthenticator;
/**
* The authentication result for this account.
*/
private AuthenticationResult mAuthenticationResult;
/**
* The service info for OneDrive.
*/
private final ServiceInfo mOneDriveServiceInfo;
/**
* The logger.
*/
private final ILogger mLogger;
/**
* Creates an ADALAccountInfo object.
* @param authenticator The authenticator that this account info was created from.
* @param authenticationResult The authentication result for this account.
* @param oneDriveServiceInfo The service info for OneDrive.
* @param logger The logger
*/
public ADALAccountInfo(final ADALAuthenticator authenticator,
final AuthenticationResult authenticationResult,
final ServiceInfo oneDriveServiceInfo,
final ILogger logger) {
mAuthenticator = authenticator;
mAuthenticationResult = authenticationResult;
mOneDriveServiceInfo = oneDriveServiceInfo;
mLogger = logger;
}
/**
* Get the type of the account.
* @return The ActiveDirectory account type.
*/
@Override
public AccountType getAccountType() {
return AccountType.ActiveDirectory;
}
/**
* Get the access token for requests against the service root.
* @return The access token for requests against the service root.
*/
@Override
public String getAccessToken() {
return mAuthenticationResult.getAccessToken();
}
/**
* Get the OneDrive service root for this account.
* @return The OneDrive service root for this account.
*/
@Override
public String getServiceRoot() {
return mOneDriveServiceInfo.serviceEndpointUri;
}
/**
* Determines if the access token is expired and needs to be refreshed.
* @return true if the refresh() needs to be called and
* false if the account is still valid.
*/
@Override
public boolean isExpired() {
return mAuthenticationResult.isExpired();
}
/**
* Refreshes the access token for this Account info.
*/
@Override
public void refresh() {
mLogger.logDebug("Refreshing access token...");
final ADALAccountInfo newInfo = (ADALAccountInfo)mAuthenticator.loginSilent();
mAuthenticationResult = newInfo.mAuthenticationResult;
}
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ADALAuthenticator.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import com.microsoft.aad.adal.AuthenticationCallback;
import com.microsoft.aad.adal.AuthenticationCancelError;
import com.microsoft.aad.adal.AuthenticationContext;
import com.microsoft.aad.adal.AuthenticationException;
import com.microsoft.aad.adal.AuthenticationResult;
import com.microsoft.aad.adal.PromptBehavior;
import com.onedrive.sdk.authentication.adal.BrokerPermissionsChecker;
import com.microsoft.onedrivesdk.BuildConfig;
import com.onedrive.sdk.concurrency.ICallback;
import com.onedrive.sdk.concurrency.IExecutors;
import com.onedrive.sdk.concurrency.SimpleWaiter;
import com.onedrive.sdk.core.ClientException;
import com.onedrive.sdk.core.OneDriveErrorCodes;
import com.onedrive.sdk.http.BaseRequest;
import com.onedrive.sdk.http.HttpMethod;
import com.onedrive.sdk.http.IHttpProvider;
import com.onedrive.sdk.logger.ILogger;
import com.onedrive.sdk.options.HeaderOption;
import com.onedrive.sdk.options.Option;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import javax.crypto.NoSuchPaddingException;
/**
* Wrapper for the ADAL authentication library:
* https://github.com/AzureAD/azure-activedirectory-library-for-android
*/
public abstract class ADALAuthenticator implements IAuthenticator {
/**
* The login authority for Azure Active Directory.
*/
private static final String LOGIN_AUTHORITY
= "https://login.windows.net/common/oauth2/authorize";
/**
* The Discovery Service url.
*/
private static final String DISCOVERY_SERVICE_URL = "https://api.office.com/discovery/v2.0/me/Services";
/**
* The Discovery Service resource id.
*/
private static final String DISCOVER_SERVICE_RESOURCE_ID = "https://api.office.com/discovery/";
/**
* The preferences for this authenticator.
*/
private static final String ADAL_AUTHENTICATOR_PREFS = "ADALAuthenticatorPrefs";
/**
* The key for the user id.
*/
private static final String USER_ID_KEY = "userId";
/**
* The key for the resource url.
*/
private static final String RESOURCE_URL_KEY = "resourceUrl";
/**
* The key for the service info.
*/
private static final String SERVICE_INFO_KEY = "serviceInfo";
/**
* The key for the version code
*/
private static final String VERSION_CODE_KEY = "versionCode";
/**
* Determines if the authority should be validated.
*/
private static final boolean VALIDATE_AUTHORITY = true;
/**
* The active resource url.
*/
private final AtomicReference<String> mResourceUrl = new AtomicReference<>();
/**
* The active user id.
*/
private final AtomicReference<String> mUserId = new AtomicReference<>();
/**
* The active service info object.
*/
private final AtomicReference<ServiceInfo> mOneDriveServiceInfo = new AtomicReference<>();
/**
* The active account info.
*/
private final AtomicReference<IAccountInfo> mAccountInfo = new AtomicReference<>();
/**
* Determines if this authenticator has been initialized.
*/
private boolean mInitialized;
/**
* The context UI, with which interactions should happen.
*/
private Activity mActivity;
/**
* The http provider.
*/
private IHttpProvider mHttpProvider;
/**
* The executors.
*/
private IExecutors mExecutors;
/**
* The authentication context for ADAL.
*/
private AuthenticationContext mAdalContext;
/**
* The logger.
*/
private ILogger mLogger;
/**
* The client id for this authenticator.
* @return The client id.
*/
protected abstract String getClientId();
/**
* The redirect url that corresponds with this client id.
* @return The redirect url.
*/
protected abstract String getRedirectUrl();
/**
* Gets the current account info for this authenticator.
* @return NULL if no account is available.
*/
@Override
public IAccountInfo getAccountInfo() {
return mAccountInfo.get();
}
/**
* Initializes the authenticator.
* @param executors The executors to schedule foreground and background tasks.
* @param httpProvider The http provider for sending requests.
* @param activity The activity to create interactive UI on.
* @param logger The logger for diagnostic information.
*/
@Override
public synchronized void init(final IExecutors executors,
final IHttpProvider httpProvider,
final Activity activity,
final ILogger logger) {
if (mInitialized) {
return;
}
mExecutors = executors;
mHttpProvider = httpProvider;
mActivity = activity;
mLogger = logger;
final BrokerPermissionsChecker brokerPermissionsChecker = new BrokerPermissionsChecker(mActivity, mLogger);
brokerPermissionsChecker.check();
try {
mAdalContext = new AuthenticationContext(activity,
LOGIN_AUTHORITY,
VALIDATE_AUTHORITY);
} catch (final NoSuchAlgorithmException | NoSuchPaddingException e) {
final ClientAuthenticatorException exception = new ClientAuthenticatorException(
"Unable to access required cryptographic libraries for ADAL",
e,
OneDriveErrorCodes.AuthenticationFailure);
mLogger.logError("Problem creating the AuthenticationContext for ADAL", exception);
throw exception;
}
final SharedPreferences prefs = getSharedPreferences();
mUserId.set(prefs.getString(USER_ID_KEY, null));
mResourceUrl.set(prefs.getString(RESOURCE_URL_KEY, null));
final String serviceInfoAsString = prefs.getString(SERVICE_INFO_KEY, null);
ServiceInfo serviceInfo = null;
try {
if (serviceInfoAsString != null) {
serviceInfo = mHttpProvider.getSerializer()
.deserializeObject(serviceInfoAsString, ServiceInfo.class);
}
} catch (final Exception ex) {
mLogger.logError("Unable to parse serviceInfo from saved preferences", ex);
}
mOneDriveServiceInfo.set(serviceInfo);
mInitialized = true;
// If there is incomplete information about the account, clear everything so
// the application is in a known state.
if (mUserId.get() != null || mResourceUrl.get() != null || mOneDriveServiceInfo.get() != null) {
mLogger.logDebug("Found existing login information");
if (mUserId.get() == null || mResourceUrl.get() == null || mOneDriveServiceInfo.get() == null) {
mLogger.logDebug("Existing login information was incompletely, flushing sign in state");
this.logout();
}
}
}
/**
* Starts an interactive login asynchronously.
* @param emailAddressHint The hint for the email address during the interactive login.
* @param loginCallback The callback to be called when the login is complete.
*/
@Override
public void login(final String emailAddressHint, final ICallback<IAccountInfo> loginCallback) {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
if (loginCallback == null) {
throw new IllegalArgumentException("loginCallback");
}
mLogger.logDebug("Starting login async");
mExecutors.performOnBackground(new Runnable() {
@Override
public void run() {
try {
loginCallback.success(login(emailAddressHint));
} catch (final ClientException e) {
loginCallback.failure(e);
}
}
});
}
/**
* Starts an interactive login.
* @param emailAddressHint The hint for the email address during the interactive login.
* @return The account info.
* @throws ClientException An exception occurs if the login was unable to complete for any reason.
*/
@Override
public synchronized IAccountInfo login(final String emailAddressHint) throws ClientException {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
mLogger.logDebug("Starting login");
final AuthenticationResult discoveryServiceAuthToken =
getDiscoveryServiceAuthResult(emailAddressHint);
if (discoveryServiceAuthToken.getStatus() != AuthenticationResult.AuthenticationStatus.Succeeded) {
final ClientAuthenticatorException clientAuthenticatorException
= new ClientAuthenticatorException("Unable to authenticate user with ADAL, Error Code: "
+ discoveryServiceAuthToken.getErrorCode()
+ " Error Message"
+ discoveryServiceAuthToken
.getErrorDescription(),
OneDriveErrorCodes.AuthenticationFailure);
mLogger.logError("Unsuccessful login attempt", clientAuthenticatorException);
throw clientAuthenticatorException;
}
// Get the resource information for the OneDrive services.
final ServiceInfo oneDriveServiceInfo =
getOneDriveServiceInfoFromDiscoveryService(discoveryServiceAuthToken.getAccessToken());
// Request a fresh auth token for the OneDrive service.
final AuthenticationResult oneDriveServiceAuthToken =
getOneDriveServiceAuthResult(oneDriveServiceInfo);
// Get the OneDrive auth token and save a reference to it.
final String serviceInfoAsString = mHttpProvider.getSerializer()
.serializeObject(oneDriveServiceInfo);
mLogger.logDebug("Successful login, saving information for silent re-auth");
final SharedPreferences preferences = getSharedPreferences();
mResourceUrl.set(oneDriveServiceInfo.serviceEndpointUri);
mUserId.set(discoveryServiceAuthToken.getUserInfo().getUserId());
mOneDriveServiceInfo.set(oneDriveServiceInfo);
preferences
.edit()
.putString(RESOURCE_URL_KEY, mResourceUrl.get())
.putString(USER_ID_KEY, mUserId.get())
.putString(SERVICE_INFO_KEY, serviceInfoAsString)
.putInt(VERSION_CODE_KEY, BuildConfig.VERSION_CODE)
.apply();
mLogger.logDebug("Successfully retrieved login information");
mLogger.logDebug(" Resource Url: " + mResourceUrl.get());
mLogger.logDebug(" User ID: " + mUserId.get());
mLogger.logDebug(" Service Info: " + serviceInfoAsString);
final ADALAccountInfo adalAccountInfo = new ADALAccountInfo(this,
oneDriveServiceAuthToken,
oneDriveServiceInfo,
mLogger);
mAccountInfo.set(adalAccountInfo);
return mAccountInfo.get();
}
/**
* Starts a silent login asynchronously.
* @param loginCallback The callback to be called when the login is complete.
*/
@Override
public void loginSilent(final ICallback<IAccountInfo> loginCallback) {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
if (loginCallback == null) {
throw new IllegalArgumentException("loginCallback");
}
mLogger.logDebug("Starting login silent async");
mExecutors.performOnBackground(new Runnable() {
@Override
public void run() {
try {
mExecutors.performOnForeground(loginSilent(), loginCallback);
} catch (final ClientException e) {
mExecutors.performOnForeground(e, loginCallback);
}
}
});
}
/**
* Starts a silent login.
* @return The account info.
* @throws ClientException An exception occurs if the login was unable to complete for any reason.
*/
@Override
public synchronized IAccountInfo loginSilent() throws ClientException {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
mLogger.logDebug("Starting login silent");
if (mResourceUrl.get() == null) {
mLogger.logDebug("No login information found for silent authentication");
return null;
}
final SimpleWaiter loginSilentWaiter = new SimpleWaiter();
final AtomicReference<AuthenticationResult> authResult = new AtomicReference<>();
final AtomicReference<ClientException> error = new AtomicReference<>();
final AuthenticationCallback<AuthenticationResult> callback
= new AuthenticationCallback<AuthenticationResult>() {
@Override
public void onSuccess(final AuthenticationResult authenticationResult) {
final String userId;
if (authenticationResult.getUserInfo() == null) {
userId = "Invalid User Id";
} else {
userId = authenticationResult.getUserInfo().getUserId();
}
final String tenantId = authenticationResult.getTenantId();
mLogger.logDebug(String.format("Successful silent auth for user id '%s', tenant id '%s'",
userId,
tenantId));
authResult.set(authenticationResult);
loginSilentWaiter.signal();
}
@Override
public void onError(final Exception e) {
String message = "Silent authentication failure from ADAL";
if (e instanceof AuthenticationException) {
message = String.format("%s; Code %s",
message,
((AuthenticationException)e).getCode().getDescription());
}
mLogger.logDebug(message);
error.set(new ClientAuthenticatorException(message,
e,
OneDriveErrorCodes.AuthenticationFailure));
loginSilentWaiter.signal();
}
};
mAdalContext.acquireTokenSilent(mOneDriveServiceInfo.get().serviceResourceId,
getClientId(),
mUserId.get(),
callback);
loginSilentWaiter.waitForSignal();
//noinspection ThrowableResultOfMethodCallIgnored
if (error.get() != null) {
throw error.get();
}
final ADALAccountInfo adalAccountInfo = new ADALAccountInfo(this,
authResult.get(),
mOneDriveServiceInfo.get(),
mLogger);
mAccountInfo.set(adalAccountInfo);
return mAccountInfo.get();
}
/**
* Logs the current user out.
* @param logoutCallback The callback to be called when the logout is complete.
*/
@Override
public void logout(final ICallback<Void> logoutCallback) {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
if (logoutCallback == null) {
throw new IllegalArgumentException("logoutCallback");
}
mLogger.logDebug("Starting logout async");
mExecutors.performOnBackground(new Runnable() {
@Override
public void run() {
try {
logout();
mExecutors.performOnForeground((Void) null, logoutCallback);
} catch (final ClientException e) {
mExecutors.performOnForeground((Void) null, logoutCallback);
}
}
});
}
/**
* Logs the current user out.
* @throws ClientException An exception occurs if the logout was unable to complete for any reason.
*/
@SuppressWarnings("deprecation")
@Override
public synchronized void logout() throws ClientException {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
mLogger.logDebug("Starting logout");
mLogger.logDebug("Clearing ADAL cache");
mAdalContext.getCache().removeAll();
mLogger.logDebug("Clearing all webview cookies");
CookieSyncManager.createInstance(mActivity);
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie();
CookieSyncManager.getInstance().sync();
mLogger.logDebug("Clearing all ADAL Authenticator shared preferences");
final SharedPreferences prefs = getSharedPreferences();
prefs.edit()
.clear()
.putInt(VERSION_CODE_KEY, BuildConfig.VERSION_CODE)
.apply();
mUserId.set(null);
mResourceUrl.set(null);
}
/**
* Get the Discovery Service authentication result.
* @param emailAddressHint The username to populate in the UI.
* @return The authentication result.
*/
private AuthenticationResult getDiscoveryServiceAuthResult(final String emailAddressHint) {
final SimpleWaiter discoveryCallbackWaiter = new SimpleWaiter();
final AtomicReference<ClientException> error = new AtomicReference<>();
final AtomicReference<AuthenticationResult> discoveryServiceToken =
new AtomicReference<>();
final AuthenticationCallback<AuthenticationResult> discoveryCallback =
new AuthenticationCallback<AuthenticationResult>() {
@Override
public void onSuccess(final AuthenticationResult authenticationResult) {
final String userId;
if (authenticationResult.getUserInfo() == null) {
userId = "Invalid User Id";
} else {
userId = authenticationResult.getUserInfo().getUserId();
}
final String tenantId = authenticationResult.getTenantId();
mLogger.logDebug(String.format(
"Successful response from the discover service for user id '%s', tenant id '%s'",
userId,
tenantId));
discoveryServiceToken.set(authenticationResult);
discoveryCallbackWaiter.signal();
}
@Override
public void onError(final Exception ex) {
OneDriveErrorCodes code = OneDriveErrorCodes.AuthenticationFailure;
if (ex instanceof AuthenticationCancelError) {
code = OneDriveErrorCodes.AuthenticationCancelled;
}
String message = "Error while retrieving the discovery service auth token";
if (ex instanceof AuthenticationException) {
message = String.format("%s; Code %s",
message,
((AuthenticationException)ex).getCode().getDescription());
}
error.set(new ClientAuthenticatorException(message, ex, code));
mLogger.logError("Error while attempting to login interactively", error.get());
discoveryCallbackWaiter.signal();
}
};
mLogger.logDebug("Starting interactive login for the discover service access token");
// Initial resource is the Discovery Service.
mAdalContext.acquireToken(DISCOVER_SERVICE_RESOURCE_ID,
getClientId(),
getRedirectUrl(),
emailAddressHint,
PromptBehavior.Auto,
null,
discoveryCallback);
mLogger.logDebug("Waiting for interactive login to complete");
discoveryCallbackWaiter.waitForSignal();
//noinspection ThrowableResultOfMethodCallIgnored
if (error.get() != null) {
throw error.get();
}
return discoveryServiceToken.get();
}
/**
* Gets the shared preferences for this authenticator.
* @return The shared preferences.
*/
private SharedPreferences getSharedPreferences() {
return mActivity.getSharedPreferences(ADAL_AUTHENTICATOR_PREFS, Context.MODE_PRIVATE);
}
/**
* Finds the OneDrive API service from the list of services.
* @param services The list of services.
* @return The service info object for OneDrive.
*/
private ServiceInfo getOneDriveApiService(final ServiceInfo[] services) {
for (final ServiceInfo serviceInfo : services) {
mLogger.logDebug(String.format("Service info resource id%s capabilities %s version %s",
serviceInfo.serviceResourceId,
serviceInfo.capability,
serviceInfo.serviceApiVersion));
if (serviceInfo.capability.equalsIgnoreCase("MyFiles")
&& serviceInfo.serviceApiVersion.equalsIgnoreCase("v2.0")) {
return serviceInfo;
}
}
throw new ClientAuthenticatorException("Unable to file the files services from the directory provider",
OneDriveErrorCodes.AuthenticationFailure);
}
/**
* Queries the Discovery Service from the list of services for OneDrive.
* @param accessToken The access token for the Discovery Service.
* @return The OneDrive service info.
*/
private ServiceInfo getOneDriveServiceInfoFromDiscoveryService(final String accessToken) {
final List<Option> options = new ArrayList<>();
options.add(new HeaderOption(AuthorizationInterceptor.AUTHORIZATION_HEADER_NAME,
AuthorizationInterceptor.OAUTH_BEARER_PREFIX + accessToken));
mLogger.logDebug("Starting discovery service request");
final BaseRequest discoveryServiceRequest = new BaseRequest(DISCOVERY_SERVICE_URL,
/* client */ null,
options,
/* response class */ null) { };
discoveryServiceRequest.setHttpMethod(HttpMethod.GET);
final DiscoveryServiceResponse discoveryServiceResponse =
mHttpProvider.send(discoveryServiceRequest,
DiscoveryServiceResponse.class,
/* serialization object*/ null);
return getOneDriveApiService(discoveryServiceResponse.services);
}
/**
* Gets the authentication token for the OneDrive service.
* @param oneDriveServiceInfo The OneDrive services info.
* @return The authentication result for this OneDrive service.
*/
private AuthenticationResult getOneDriveServiceAuthResult(final ServiceInfo oneDriveServiceInfo) {
final SimpleWaiter authorityCallbackWaiter = new SimpleWaiter();
final AtomicReference<ClientException> error = new AtomicReference<>();
final AtomicReference<AuthenticationResult> oneDriveServiceAuthToken = new AtomicReference<>();
final AuthenticationCallback<AuthenticationResult> authorityCallback =
new AuthenticationCallback<AuthenticationResult>() {
@Override
public void onSuccess(final AuthenticationResult authenticationResult) {
mLogger.logDebug("Successful refreshed the OneDrive service authentication token");
oneDriveServiceAuthToken.set(authenticationResult);
authorityCallbackWaiter.signal();
}
@Override
public void onError(final Exception e) {
String message = "Error while retrieving the service specific auth token";
OneDriveErrorCodes code = OneDriveErrorCodes.AuthenticationFailure;
if (e instanceof AuthenticationCancelError) {
code = OneDriveErrorCodes.AuthenticationCancelled;
}
if (e instanceof AuthenticationException) {
message = String.format("%s; Code %s",
message,
((AuthenticationException)e).getCode().getDescription());
}
error.set(new ClientAuthenticatorException(message,
e,
code));
mLogger.logError("Unable to refresh token into OneDrive service access token", error.get());
authorityCallbackWaiter.signal();
}
};
mLogger.logDebug("Starting OneDrive resource refresh token request");
mAdalContext.acquireToken(mActivity,
oneDriveServiceInfo.serviceResourceId,
getClientId(),
getRedirectUrl(),
PromptBehavior.Auto,
authorityCallback);
mLogger.logDebug("Waiting for token refresh");
authorityCallbackWaiter.waitForSignal();
//noinspection ThrowableResultOfMethodCallIgnored
if (error.get() != null) {
throw error.get();
}
return oneDriveServiceAuthToken.get();
}
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/AccountType.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
/**
* The type of account.
*/
public enum AccountType {
/**
* A Microsoft account.
*/
MicrosoftAccount("MSA"),
/**
* An Azure Active Directory account.
*/
ActiveDirectory("AAD");
/**
* The shorthand string representation from the disambiguation service.
*/
private final String[] mRepresentations;
/**
* Creates an AccountType object.
* @param representations The shorthand string representation from the disambiguation service.
*/
AccountType(final String... representations) {
mRepresentations = representations;
}
/**
* Gets an AccountType object from a string representation.
* @param representation The shorthand string representation from the disambiguation service.
* @return The account type for this string representation.
*/
public static AccountType fromRepresentation(final String representation) {
for (final AccountType accountType : AccountType.values()) {
for (final String possibleRepresentation : accountType.mRepresentations) {
if (possibleRepresentation.equalsIgnoreCase(representation)) {
return accountType;
}
}
}
final String message = String.format("Unable to find a representation for '%s", representation);
throw new UnsupportedOperationException(message);
}
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/AuthorizationInterceptor.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import com.onedrive.sdk.http.IHttpRequest;
import com.onedrive.sdk.http.IRequestInterceptor;
import com.onedrive.sdk.logger.ILogger;
import com.onedrive.sdk.options.HeaderOption;
/**
* Intercepts a request and adds authorization headers.
*/
public class AuthorizationInterceptor implements IRequestInterceptor {
/**
* The authorization header name.
*/
public static final String AUTHORIZATION_HEADER_NAME = "Authorization";
/**
* The bearer prefix.
*/
public static final String OAUTH_BEARER_PREFIX = "bearer ";
/**
* The authenticator.
*/
private final IAuthenticator mAuthenticator;
/**
* The logger.
*/
private final ILogger mLogger;
/**
* Creates the authorization interceptor.
* @param authenticator The authenticator.
* @param logger The logger.
*/
public AuthorizationInterceptor(final IAuthenticator authenticator, final ILogger logger) {
mAuthenticator = authenticator;
mLogger = logger;
}
/**
* Intercepts the request.
* @param request The request to intercept.
*/
@Override
public void intercept(final IHttpRequest request) {
mLogger.logDebug("Intercepting request, " + request.getRequestUrl());
// If the request already has an authorization header, do not intercept it.
for (final HeaderOption option : request.getHeaders()) {
if (option.getName().equals(AUTHORIZATION_HEADER_NAME)) {
mLogger.logDebug("Found an existing authorization header!");
return;
}
}
if (mAuthenticator.getAccountInfo() != null) {
mLogger.logDebug("Found account information");
if (mAuthenticator.getAccountInfo().isExpired()) {
mLogger.logDebug("Account access token is expired, refreshing");
mAuthenticator.getAccountInfo().refresh();
}
final String accessToken = mAuthenticator.getAccountInfo().getAccessToken();
request.addHeader(AUTHORIZATION_HEADER_NAME, OAUTH_BEARER_PREFIX + accessToken);
} else {
mLogger.logDebug("No active account found, skipping writing auth header");
}
}
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ClientAuthenticatorException.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import com.onedrive.sdk.core.ClientException;
import com.onedrive.sdk.core.OneDriveErrorCodes;
/**
* An exception from the client that is specifically authentication related.
*/
public class ClientAuthenticatorException extends ClientException {
/**
* Creates a client authentication message.
* @param message The message to display.
* @param ex The exception from the client.
* @param code The code for this error.
*/
public ClientAuthenticatorException(final String message, final Throwable ex, final OneDriveErrorCodes code) {
super(message, ex, code);
}
/**
* Creates a client authentication message.
* @param message The message to display.
* @param code The code for this error.
*/
public ClientAuthenticatorException(final String message, final OneDriveErrorCodes code) {
this(message, null, code);
}
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationAuthenticator.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import com.microsoft.onedrivesdk.BuildConfig;
import com.onedrive.sdk.concurrency.ICallback;
import com.onedrive.sdk.concurrency.IExecutors;
import com.onedrive.sdk.concurrency.SimpleWaiter;
import com.onedrive.sdk.core.ClientException;
import com.onedrive.sdk.core.OneDriveErrorCodes;
import com.onedrive.sdk.http.IHttpProvider;
import com.onedrive.sdk.logger.ILogger;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.support.annotation.Nullable;
import java.security.InvalidParameterException;
import java.util.concurrent.atomic.AtomicReference;
/**
* Wrapper around the ADAL and MSA authenticators which can disambiguate between them.
*/
public class DisambiguationAuthenticator implements IAuthenticator {
/**
* The preferences for this authenticator.
*/
private static final String DISAMBIGUATION_AUTHENTICATOR_PREFS = "DisambiguationAuthenticatorPrefs";
/**
* The key for the version code
*/
public static final String VERSION_CODE_KEY = "versionCode";
/**
* The key for the account type
*/
public static final String ACCOUNT_TYPE_KEY = "accountType";
/**
* The current account info object.
*/
private final AtomicReference<IAccountInfo> mAccountInfo = new AtomicReference<>();
/**
* The MSA Authenticator.
*/
private final MSAAuthenticator mMSAAuthenticator;
/**
* The ADAL Authenticator.
*/
private final ADALAuthenticator mADALAuthenticator;
/**
* The executors.
*/
private IExecutors mExecutors;
/**
* The context UI interactions should happen with.
*/
private Activity mActivity;
/**
* Indicates if this authenticator has been initialized.
*/
private boolean mInitialized;
/**
* The logger.
*/
private ILogger mLogger;
/**
* Creates a disambiguation authenticator.
* @param msaAuthenticator The MSA Authenticator.
* @param adalAuthenticator The ADAL Authenticator.
*/
public DisambiguationAuthenticator(final MSAAuthenticator msaAuthenticator,
final ADALAuthenticator adalAuthenticator)
{
mMSAAuthenticator = msaAuthenticator;
mADALAuthenticator = adalAuthenticator;
}
/**
* Initializes the authenticator.
* @param executors The executors to schedule foreground and background tasks.
* @param httpProvider The http provider for sending requests.
* @param activity The activity to create interactive UI on.
* @param logger The logger for diagnostic information.
*/
@Override
public synchronized void init(final IExecutors executors,
final IHttpProvider httpProvider,
final Activity activity,
final ILogger logger) {
if (mInitialized) {
return;
}
mExecutors = executors;
mActivity = activity;
mLogger = logger;
mLogger.logDebug("Initializing MSA and ADAL authenticators");
mMSAAuthenticator.init(executors, httpProvider, activity, logger);
mADALAuthenticator.init(executors, httpProvider, activity, logger);
mInitialized = true;
}
/**
* Starts an interactive login asynchronously.
* @param emailAddressHint The hint for the email address during the interactive login.
* @param loginCallback The callback to be called when the login is complete.
*/
@Override
public void login(final String emailAddressHint, final ICallback<IAccountInfo> loginCallback) {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
if (loginCallback == null) {
throw new InvalidParameterException("loginCallback");
}
mLogger.logDebug("Starting login async");
mExecutors.performOnBackground(new Runnable() {
@Override
public void run() {
try {
mExecutors.performOnForeground(login(emailAddressHint), loginCallback);
} catch (final ClientException e) {
mExecutors.performOnForeground(e, loginCallback);
}
}
});
}
/**
* Starts an interactive login.
* @param emailAddressHint The hint for the email address during the interactive login.
* @return The account info.
* @throws ClientException If the login was unable to complete for any reason.
*/
@Override
public synchronized IAccountInfo login(final String emailAddressHint) throws ClientException {
mLogger.logDebug("Starting login");
final SimpleWaiter disambiguationWaiter = new SimpleWaiter();
final AtomicReference<DisambiguationResponse> response = new AtomicReference<>();
final AtomicReference<ClientException> error = new AtomicReference<>();
final ICallback<DisambiguationResponse> disambiguationCallback = new ICallback<DisambiguationResponse>() {
@Override
public void success(final DisambiguationResponse result) {
mLogger.logDebug(String.format("Successfully disambiguated '%s' as account type '%s'",
result.getAccount(),
result.getAccountType()));
response.set(result);
disambiguationWaiter.signal();
}
@Override
public void failure(final ClientException error2) {
error.set(new ClientAuthenticatorException("Unable to disambiguate account type",
OneDriveErrorCodes.AuthenticationFailure));
//noinspection ThrowableResultOfMethodCallIgnored
mLogger.logError(error.get().getMessage(), error.get());
disambiguationWaiter.signal();
}
};
AccountType accountType = getAccountTypeInPreferences();
String accountName = null;
if (accountType != null) {
mLogger.logDebug(String.format("Found saved account information %s type of account", accountType));
} else {
mLogger.logDebug("Creating disambiguation ui, waiting for user to sign in");
new DisambiguationRequest(mActivity, disambiguationCallback, mLogger).execute();
disambiguationWaiter.waitForSignal();
//noinspection ThrowableResultOfMethodCallIgnored
if (error.get() != null) {
throw error.get();
}
final DisambiguationResponse disambiguationResponse = response.get();
accountType = disambiguationResponse.getAccountType();
accountName = disambiguationResponse.getAccount();
}
final IAccountInfo accountInfo;
switch (accountType) {
case ActiveDirectory:
accountInfo = mADALAuthenticator.login(accountName);
break;
case MicrosoftAccount:
accountInfo = mMSAAuthenticator.login(accountName);
break;
default:
final UnsupportedOperationException unsupportedOperationException
= new UnsupportedOperationException("Unrecognized account type "
+ accountType);
mLogger.logError("Unrecognized account type", unsupportedOperationException);
throw unsupportedOperationException;
}
setAccountTypeInPreferences(accountType);
mAccountInfo.set(accountInfo);
return mAccountInfo.get();
}
/**
* Starts a silent login asynchronously.
* @param loginCallback The callback to be called when the login is complete.
*/
@Override
public void loginSilent(final ICallback<IAccountInfo> loginCallback) {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
if (loginCallback == null) {
throw new InvalidParameterException("loginCallback");
}
mLogger.logDebug("Starting login silent async");
mExecutors.performOnBackground(new Runnable() {
@Override
public void run() {
try {
mExecutors.performOnForeground(loginSilent(), loginCallback);
} catch (final ClientException e) {
mExecutors.performOnForeground(e, loginCallback);
}
}
});
}
/**
* Starts a silent login.
* @return The account info.
* @throws ClientException Exception occurs if the login was unable to complete for any reason.
*/
@Override
public synchronized IAccountInfo loginSilent() throws ClientException {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
mLogger.logDebug("Starting login silent");
final AccountType accountType = getAccountTypeInPreferences();
if (accountType != null) {
mLogger.logDebug(String.format("Expecting %s type of account", accountType));
}
mLogger.logDebug("Checking MSA");
IAccountInfo accountInfo = mMSAAuthenticator.loginSilent();
if (accountInfo != null) {
mLogger.logDebug("Found account info in MSA");
setAccountTypeInPreferences(accountType);
mAccountInfo.set(accountInfo);
return accountInfo;
}
mLogger.logDebug("Checking ADAL");
accountInfo = mADALAuthenticator.loginSilent();
mAccountInfo.set(accountInfo);
if (accountInfo != null) {
mLogger.logDebug("Found account info in ADAL");
setAccountTypeInPreferences(accountType);
}
return mAccountInfo.get();
}
/**
* Log the current user out.
* @param logoutCallback The callback to be called when the logout is complete.
*/
@Override
public void logout(final ICallback<Void> logoutCallback) {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
if (logoutCallback == null) {
throw new InvalidParameterException("logoutCallback");
}
mLogger.logDebug("Starting logout async");
mExecutors.performOnBackground(new Runnable() {
@Override
public void run() {
logout();
mExecutors.performOnForeground((Void) null, logoutCallback);
}
});
}
/**
* Log the current user out.
* @throws ClientException If the logout was unable to complete for any reason.
*/
@Override
public synchronized void logout() throws ClientException {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
mLogger.logDebug("Starting logout");
if (mMSAAuthenticator.getAccountInfo() != null) {
mLogger.logDebug("Starting logout of MSA account");
mMSAAuthenticator.logout();
}
if (mADALAuthenticator.getAccountInfo() != null) {
mLogger.logDebug("Starting logout of ADAL account");
mADALAuthenticator.logout();
}
getSharedPreferences()
.edit()
.clear()
.putInt(VERSION_CODE_KEY, BuildConfig.VERSION_CODE)
.commit();
}
/**
* Gets the current account info for this authenticator.
* @return NULL if no account is available.
*/
@Override
public IAccountInfo getAccountInfo() {
return mAccountInfo.get();
}
/**
* Gets the shared preferences for this authenticator.
* @return The shared preferences.
*/
private SharedPreferences getSharedPreferences() {
return mActivity.getSharedPreferences(DISAMBIGUATION_AUTHENTICATOR_PREFS, Context.MODE_PRIVATE);
}
/**
* Sets the AccountType from SharedPreferences
* @param accountType The account type, can be null
*/
private void setAccountTypeInPreferences(@Nullable final AccountType accountType) {
if (accountType == null) {
return;
}
getSharedPreferences()
.edit()
.putString(ACCOUNT_TYPE_KEY, accountType.toString())
.putInt(VERSION_CODE_KEY, BuildConfig.VERSION_CODE)
.commit();
}
/**
* Gets the AccountType from SharedPreferences
* @return The account type, null if none was found
*/
@Nullable
private AccountType getAccountTypeInPreferences() {
final String accountTypeString = getSharedPreferences().getString(ACCOUNT_TYPE_KEY, null);
if (accountTypeString == null) {
return null;
}
return AccountType.valueOf(accountTypeString);
}
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationDialog.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import com.onedrive.sdk.core.OneDriveErrorCodes;
import com.onedrive.sdk.logger.ILogger;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
/**
* A dialog that hosts a the disambiguation flow.
*/
class DisambiguationDialog extends Dialog implements DialogInterface.OnCancelListener {
/**
* The url for disambiguation page.
*/
private static final String DISAMBIGUATION_PAGE_URL = "https://onedrive.live"
+ ".com/picker/accountchooser?ru=https://localhost:777&load_login=false";
/**
* The disambiguation request object.
*/
private final DisambiguationRequest mRequest;
/**
* Creates the disambiguation dialog.
* @param context The context to show the UI in.
* @param request The disambiguation request.
*/
public DisambiguationDialog(final Context context,
final DisambiguationRequest request) {
super(context, android.R.style.Theme_Translucent_NoTitleBar);
mRequest = request;
}
/**
* Get the logger.
* @return The logger.
*/
public ILogger getLogger() {
return mRequest.getLogger();
}
@Override
public void onCancel(final DialogInterface dialogInterface) {
mRequest.getLogger().logDebug("Disambiguation dialog canceled");
mRequest.getCallback().failure(new ClientAuthenticatorException("Authentication Disambiguation Canceled",
OneDriveErrorCodes.AuthenticationCancelled));
}
@SuppressLint("SetJavaScriptEnabled")
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setOnCancelListener(this);
final FrameLayout content = new FrameLayout(this.getContext());
final LinearLayout webViewContainer = new LinearLayout(this.getContext());
final WebView webView = new WebView(this.getContext());
webView.setWebViewClient(new DisambiguationWebView(this, mRequest.getCallback()));
final WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
webView.loadUrl(DISAMBIGUATION_PAGE_URL);
final ViewGroup.LayoutParams matchParentLayout = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT);
webView.setLayoutParams(matchParentLayout);
webView.setVisibility(View.VISIBLE);
webViewContainer.addView(webView);
webViewContainer.setVisibility(View.VISIBLE);
content.addView(webViewContainer);
content.setVisibility(View.VISIBLE);
content.forceLayout();
webViewContainer.forceLayout();
this.addContentView(content, matchParentLayout);
}
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationRequest.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import android.app.Activity;
import com.onedrive.sdk.concurrency.ICallback;
import com.onedrive.sdk.logger.ILogger;
/**
* A disambiguation request.
*/
class DisambiguationRequest {
/**
* The current activity.
*/
private final Activity mActivity;
/**
* The callback when the request has completed.
*/
private final ICallback<DisambiguationResponse> mCallback;
/**
* The logger.
*/
private final ILogger mLogger;
/**
* Creates the disambiguation request.
* @param activity The context to show the UI in.
* @param callback The callback when the request has completed.
* @param logger The logger.
*/
public DisambiguationRequest(final Activity activity,
final ICallback<DisambiguationResponse> callback,
final ILogger logger) {
mActivity = activity;
mCallback = callback;
mLogger = logger;
}
/**
* Executes the disambiguation request.
*/
public void execute() {
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
new DisambiguationDialog(mActivity, DisambiguationRequest.this).show();
}
});
}
/**
* Gets the callback when the request has completed.
* @return The callback.
*/
public ICallback<DisambiguationResponse> getCallback() {
return mCallback;
}
/**
* Get the logger.
* @return The logger.
*/
public ILogger getLogger() {
return mLogger;
}
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationResponse.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
/**
* The response for the disambiguation request.
*/
class DisambiguationResponse {
/**
* The type of account.
*/
private final AccountType mAccountType;
/**
* The account's email address.
*/
private final String mAccount;
/**
* Creates the disambiguation response.
* @param accountType The account type.
* @param account The account email.
*/
public DisambiguationResponse(final AccountType accountType, final String account) {
mAccountType = accountType;
mAccount = account;
}
/**
* Gets the account type.
* @return The account type.
*/
public AccountType getAccountType() {
return mAccountType;
}
/**
* Gets the account email address.
* @return The account email address.
*/
public String getAccount() {
return mAccount;
}
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationWebView.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import android.graphics.Bitmap;
import android.net.Uri;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.onedrive.sdk.concurrency.ICallback;
import com.onedrive.sdk.core.OneDriveErrorCodes;
import java.util.Locale;
/**
* The web view to host the disambiguation UI in.
*/
class DisambiguationWebView extends WebViewClient {
/**
* The hosting dialog.
*/
private final DisambiguationDialog mDisambiguationDialog;
/**
* The callback when the UI has completed.
*/
private final ICallback<DisambiguationResponse> mCallback;
/**
* Creates the disambiguation web view.
* @param disambiguationDialog The hosting dialog.
* @param callback The callback when the UI has completed.
*/
public DisambiguationWebView(final DisambiguationDialog disambiguationDialog,
final ICallback<DisambiguationResponse> callback) {
mDisambiguationDialog = disambiguationDialog;
mCallback = callback;
}
@Override
public void onPageStarted(final WebView view, final String url, final Bitmap favicon) {
mDisambiguationDialog.getLogger().logDebug("onPageStarted for url '" + url + "'");
super.onPageStarted(view, url, favicon);
final Uri uri = Uri.parse(url);
if (uri.getAuthority().equalsIgnoreCase("localhost:777")) {
mDisambiguationDialog.getLogger().logDebug("Found callback from disambiguation service");
final AccountType accountType = AccountType.fromRepresentation(uri.getQueryParameter("account_type"));
final String account = uri.getQueryParameter("user_email");
mCallback.success(new DisambiguationResponse(accountType, account));
view.stopLoading();
mDisambiguationDialog.dismiss();
}
}
@SuppressWarnings("deprecation")
@Override
public void onReceivedError(final WebView view,
final int errorCode,
final String description,
final String failingUrl) {
super.onReceivedError(view, errorCode, description, failingUrl);
final String errorMessage = String.format(Locale.ROOT,
"Url %s, Error code: %d, Description %s",
failingUrl,
errorCode,
description);
mCallback.failure(new ClientAuthenticatorException(errorMessage, OneDriveErrorCodes.AuthenticationFailure));
mDisambiguationDialog.dismiss();
}
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DiscoveryServiceResponse.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import com.google.gson.annotations.SerializedName;
public class DiscoveryServiceResponse {
@SerializedName("value")
public ServiceInfo[] services;
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/IAccountInfo.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
/**
* Represents account information used to communicate with the OneDrive service.
*/
public interface IAccountInfo {
/**
* Gets the type of the account.
* @return The account type.
*/
AccountType getAccountType();
/**
* Gets the access token for requests against the service root.
* @return The access token for requests against the service root.
*/
String getAccessToken();
/**
* Gets the OneDrive service root for this account.
* @return The OneDrive service root for this account.
*/
String getServiceRoot();
/**
* Indicates if the account access token is expired and needs to be refreshed.
* @return true if the refresh() method needs to be called and
* false if the account is still valid.
*/
boolean isExpired();
/**
* Refreshes the authentication token for this account info.
*/
void refresh();
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/IAuthenticator.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import android.app.Activity;
import com.onedrive.sdk.concurrency.ICallback;
import com.onedrive.sdk.concurrency.IExecutors;
import com.onedrive.sdk.core.ClientException;
import com.onedrive.sdk.http.IHttpProvider;
import com.onedrive.sdk.logger.ILogger;
/**
* Authenticates a user interactively and silently.
*/
public interface IAuthenticator {
/**
* Gets the current account info for this authenticator.
* @return NULL if no account is available.
*/
IAccountInfo getAccountInfo();
/**
* Initializes the authenticator.
* @param executors The executors to schedule foreground and background tasks.
* @param httpProvider The http provider for sending requests.
* @param activity The activity to create interactive UI on.
* @param logger The logger for diagnostic information.
*/
void init(final IExecutors executors,
final IHttpProvider httpProvider,
final Activity activity,
final ILogger logger);
/**
* Starts an interactive login asynchronously.
* @param emailAddressHint The hint for the email address during the interactive login.
* @param loginCallback The callback to be called when the login is complete.
*/
void login(final String emailAddressHint, final ICallback<IAccountInfo> loginCallback);
/**
* Starts an interactive login.
* @param emailAddressHint The hint for the email address during the interactive login.
* @return The account info.
* @throws ClientException An exception occurs if the login was unable to complete for any reason.
*/
IAccountInfo login(final String emailAddressHint) throws ClientException;
/**
* Starts a silent login asynchronously.
* @param loginCallback The callback to be called when the login is complete.
*/
void loginSilent(final ICallback<IAccountInfo> loginCallback);
/**
* Starts a silent login.
* @return The account info.
* @throws ClientException If the login was unable to complete for any reason.
*/
IAccountInfo loginSilent() throws ClientException;
/**
* Log the current user out.
* @param logoutCallback The callback to be called when the logout is complete.
*/
void logout(final ICallback<Void> logoutCallback);
/**
* Log the current user out.
* @throws ClientException Indicates if the logout was unable to complete for any reason.
*/
void logout() throws ClientException;
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/MSAAccountInfo.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import com.microsoft.services.msa.LiveConnectSession;
import com.onedrive.sdk.logger.ILogger;
/**
* Account information for a MSA based account.
*/
public class MSAAccountInfo implements IAccountInfo {
/**
* The service root for the OneDrive personal API.
*/
public static final String ONE_DRIVE_PERSONAL_SERVICE_ROOT = "https://api.onedrive.com/v1.0";
/**
* The authenticator that can refresh this account.
*/
private final MSAAuthenticator mAuthenticator;
/**
* The session this account is based off of.
*/
private LiveConnectSession mSession;
/**
* The logger.
*/
private final ILogger mLogger;
/**
* Creates an MSAAccountInfo object.
* @param authenticator The authenticator that this account info was created from.
* @param liveConnectSession The session this account is based off of.
* @param logger The logger.
*/
public MSAAccountInfo(final MSAAuthenticator authenticator,
final LiveConnectSession liveConnectSession,
final ILogger logger) {
mAuthenticator = authenticator;
mSession = liveConnectSession;
mLogger = logger;
}
/**
* Get the type of the account.
* @return The MicrosoftAccount account type.
*/
@Override
public AccountType getAccountType() {
return AccountType.MicrosoftAccount;
}
/**
* Get the access token for requests against the service root.
* @return The access token for requests against the service root.
*/
@Override
public String getAccessToken() {
return mSession.getAccessToken();
}
/**
* Get the OneDrive service root for this account.
* @return the OneDrive service root for this account.
*/
@Override
public String getServiceRoot() {
return ONE_DRIVE_PERSONAL_SERVICE_ROOT;
}
/**
* Indicates if the account access token is expired and needs to be refreshed.
* @return true if refresh() needs to be called and
* false if the account is still valid.
*/
@Override
public boolean isExpired() {
return mSession.isExpired();
}
/**
* Refreshes the authentication token for this account info.
*/
@Override
public void refresh() {
mLogger.logDebug("Refreshing access token...");
final MSAAccountInfo newInfo = (MSAAccountInfo)mAuthenticator.loginSilent();
mSession = newInfo.mSession;
}
}
================================================
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/MSAAuthenticator.java
================================================
// ------------------------------------------------------------------------------
// Copyright (c) 2015 Microsoft Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ------------------------------------------------------------------------------
package com.onedrive.sdk.authentication;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import com.microsoft.onedrivesdk.BuildConfig;
import com.microsoft.services.msa.LiveAuthClient;
import com.microsoft.services.msa.LiveAuthException;
import com.microsoft.services.msa.LiveAuthListener;
import com.microsoft.services.msa.LiveConnectSession;
import com.microsoft.services.msa.LiveStatus;
import com.onedrive.sdk.concurrency.ICallback;
import com.onedrive.sdk.core.ClientException;
import com.onedrive.sdk.concurrency.SimpleWaiter;
import com.onedrive.sdk.concurrency.IExecutors;
import com.onedrive.sdk.core.OneDriveErrorCodes;
import com.onedrive.sdk.http.IHttpProvider;
import com.onedrive.sdk.logger.ILogger;
import java.security.InvalidParameterException;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicReference;
/**
* Wrapper around the MSA authentication library.
* https://github.com/MSOpenTech/msa-auth-for-android
*/
@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
public abstract class MSAAuthenticator implements IAuthenticator {
/**
* The sign in cancellation message.
*/
private static final String SIGN_IN_CANCELLED_MESSAGE = "The user cancelled the login operation.";
/**
* The preferences for this authenticator.
*/
private static final String MSA_AUTHENTICATOR_PREFS = "MSAAuthenticatorPrefs";
/**
* The key for the user id.
*/
private static final String USER_ID_KEY = "userId";
/**
* The key for the version code
*/
public static final String VERSION_CODE_KEY = "versionCode";
/**
* The default user id
*/
private static final String DEFAULT_USER_ID = "@@defaultUser";
/**
* The active user id.
*/
private final AtomicReference<String> mUserId = new AtomicReference<>();
/**
* The executors.
*/
private IExecutors mExecutors;
/**
* Indicates whether this authenticator has been initialized.
*/
private boolean mInitialized;
/**
* The context UI interactions should happen with.
*/
private Activity mActivity;
/**
* The logger.
*/
private ILogger mLogger;
/**
* The client id for this authenticator.
* https://dev.onedrive.com/auth/msa_oauth.htm#to-register-your-app
* @return The client id.
*/
public abstract String getClientId();
/**
* The scopes for this application.
* https://dev.onedrive.com/auth/msa_oauth.htm#authentication-scopes
* @return The scopes for this application.
*/
public abstract String[] getScopes();
/**
* The live authentication client.
*/
private LiveAuthClient mAuthClient;
/**
* Initializes the authenticator.
* @param executors The executors to schedule foreground and background tasks.
* @param httpProvider The http provider for sending requests.
* @param activity The activity to create interactive UI on.
* @param logger The logger for diagnostic information.
*/
@Override
public synchronized void init(final IExecutors executors,
final IHttpProvider httpProvider,
final Activity activity,
final ILogger logger) {
if (mInitialized) {
return;
}
mExecutors = executors;
mActivity = activity;
mLogger = logger;
mInitialized = true;
mAuthClient = new LiveAuthClient(activity, getClientId(), Arrays.asList(getScopes()));
final SharedPreferences prefs = getSharedPreferences();
mUserId.set(prefs.getString(USER_ID_KEY, null));
}
/**
* Starts an interactive login asynchronously.
* @param emailAddressHint The hint for the email address during the interactive login.
* @param loginCallback The callback to be called when the login is complete.
*/
@Override
public void login(final String emailAddressHint, final ICallback<IAccountInfo> loginCallback) {
if (!mInitialized) {
throw new IllegalStateException("init must be called");
}
if (loginCallback == null) {
throw new InvalidParameterException("loginCallback");
}
mLogger.logDebug("Starting login async");
mExecutors.performOnBackground(new Runnable() {
@Override
public void run() {
try {
mExecutors.performOnForeground(login(emailAddressHint), loginCallback);
} catch (final ClientException e) {
mExecutors.performOnForeground(e, loginCallback);
}
}
gitextract_y9dr_hog/ ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── THIRD PARTY NOTICES ├── build.gradle ├── checkstyle.xml ├── docs/ │ ├── authentication.md │ ├── collections.md │ ├── contributions.md │ ├── errors.md │ ├── extensibility.md │ ├── items.md │ └── overview.md ├── gradle/ │ └── wrapper/ │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── gradlew ├── gradlew.bat ├── onedrivesdk/ │ ├── .gitignore │ ├── build.gradle │ └── src/ │ ├── androidTest/ │ │ └── java/ │ │ └── com/ │ │ └── onedrive/ │ │ └── sdk/ │ │ ├── concurrency/ │ │ │ └── MockExecutors.java │ │ ├── core/ │ │ │ ├── CoreTests.java │ │ │ └── MockClient.java │ │ ├── http/ │ │ │ ├── BaseRequestTests.java │ │ │ ├── DefaultHttpProviderTests.java │ │ │ ├── MockInterceptor.java │ │ │ ├── MockRequest.java │ │ │ └── MockSingleConnectionFactory.java │ │ ├── logger/ │ │ │ └── MockLogger.java │ │ └── serializer/ │ │ ├── DefaultSerializerTests.java │ │ ├── ISO8601Test.java │ │ └── MockSerializer.java │ └── main/ │ ├── AndroidManifest.xml │ └── java/ │ └── com/ │ └── onedrive/ │ └── sdk/ │ ├── authentication/ │ │ ├── ADALAccountInfo.java │ │ ├── ADALAuthenticator.java │ │ ├── AccountType.java │ │ ├── AuthorizationInterceptor.java │ │ ├── ClientAuthenticatorException.java │ │ ├── DisambiguationAuthenticator.java │ │ ├── DisambiguationDialog.java │ │ ├── DisambiguationRequest.java │ │ ├── DisambiguationResponse.java │ │ ├── DisambiguationWebView.java │ │ ├── DiscoveryServiceResponse.java │ │ ├── IAccountInfo.java │ │ ├── IAuthenticator.java │ │ ├── MSAAccountInfo.java │ │ ├── MSAAuthenticator.java │ │ ├── MicrosoftOAuthConfig.java │ │ ├── ServiceInfo.java │ │ └── adal/ │ │ └── BrokerPermissionsChecker.java │ ├── concurrency/ │ │ ├── AsyncMonitor.java │ │ ├── AsyncMonitorLocation.java │ │ ├── AsyncMonitorResponseHandler.java │ │ ├── AsyncOperationException.java │ │ ├── ChunkedUploadProvider.java │ │ ├── ChunkedUploadRequest.java │ │ ├── ChunkedUploadResponseHandler.java │ │ ├── DefaultExecutors.java │ │ ├── ICallback.java │ │ ├── IExecutors.java │ │ ├── IProgressCallback.java │ │ ├── ResultGetter.java │ │ ├── SimpleWaiter.java │ │ └── SynchronousExecutor.java │ ├── core/ │ │ ├── BaseClient.java │ │ ├── ClientException.java │ │ ├── DefaultClientConfig.java │ │ ├── IBaseClient.java │ │ ├── IClientConfig.java │ │ └── OneDriveErrorCodes.java │ ├── extensions/ │ │ ├── AsyncOperationStatus.java │ │ ├── Audio.java │ │ ├── ChunkedUploadResult.java │ │ ├── ChunkedUploadSessionDescriptor.java │ │ ├── CopyBody.java │ │ ├── CopyRequest.java │ │ ├── CopyRequestBuilder.java │ │ ├── CreateLinkBody.java │ │ ├── CreateLinkRequest.java │ │ ├── CreateLinkRequestBuilder.java │ │ ├── CreateSessionBody.java │ │ ├── CreateSessionRequest.java │ │ ├── CreateSessionRequestBuilder.java │ │ ├── Deleted.java │ │ ├── DeltaCollectionPage.java │ │ ├── DeltaRequest.java │ │ ├── DeltaRequestBuilder.java │ │ ├── DeltaResponse.java │ │ ├── Drive.java │ │ ├── DriveCollectionPage.java │ │ ├── DriveCollectionRequest.java │ │ ├── DriveCollectionRequestBuilder.java │ │ ├── DriveRequest.java │ │ ├── DriveRequestBuilder.java │ │ ├── File.java │ │ ├── FileSystemInfo.java │ │ ├── Folder.java │ │ ├── Hashes.java │ │ ├── ICopyRequest.java │ │ ├── ICopyRequestBuilder.java │ │ ├── ICreateLinkRequest.java │ │ ├── ICreateLinkRequestBuilder.java │ │ ├── ICreateSessionRequest.java │ │ ├── ICreateSessionRequestBuilder.java │ │ ├── IDeltaCollectionPage.java │ │ ├── IDeltaRequest.java │ │ ├── IDeltaRequestBuilder.java │ │ ├── IDriveCollectionPage.java │ │ ├── IDriveCollectionRequest.java │ │ ├── IDriveCollectionRequestBuilder.java │ │ ├── IDriveRequest.java │ │ ├── IDriveRequestBuilder.java │ │ ├── IItemCollectionPage.java │ │ ├── IItemCollectionRequest.java │ │ ├── IItemCollectionRequestBuilder.java │ │ ├── IItemRequest.java │ │ ├── IItemRequestBuilder.java │ │ ├── IItemStreamRequest.java │ │ ├── IItemStreamRequestBuilder.java │ │ ├── IOneDriveClient.java │ │ ├── IPermissionCollectionPage.java │ │ ├── IPermissionCollectionRequest.java │ │ ├── IPermissionCollectionRequestBuilder.java │ │ ├── IPermissionRequest.java │ │ ├── IPermissionRequestBuilder.java │ │ ├── IRecentCollectionPage.java │ │ ├── IRecentRequest.java │ │ ├── IRecentRequestBuilder.java │ │ ├── ISearchCollectionPage.java │ │ ├── ISearchRequest.java │ │ ├── ISearchRequestBuilder.java │ │ ├── IShareCollectionPage.java │ │ ├── IShareCollectionRequest.java │ │ ├── IShareCollectionRequestBuilder.java │ │ ├── IShareRequest.java │ │ ├── IShareRequestBuilder.java │ │ ├── IStringCollectionPage.java │ │ ├── IStringCollectionRequest.java │ │ ├── IStringCollectionRequestBuilder.java │ │ ├── IThumbnailRequest.java │ │ ├── IThumbnailRequestBuilder.java │ │ ├── IThumbnailSetCollectionPage.java │ │ ├── IThumbnailSetCollectionRequest.java │ │ ├── IThumbnailSetCollectionRequestBuilder.java │ │ ├── IThumbnailSetRequest.java │ │ ├── IThumbnailSetRequestBuilder.java │ │ ├── IThumbnailStreamRequest.java │ │ ├── IThumbnailStreamRequestBuilder.java │ │ ├── Identity.java │ │ ├── IdentitySet.java │ │ ├── Image.java │ │ ├── Item.java │ │ ├── ItemCollectionPage.java │ │ ├── ItemCollectionRequest.java │ │ ├── ItemCollectionRequestBuilder.java │ │ ├── ItemReference.java │ │ ├── ItemRequest.java │ │ ├── ItemRequestBuilder.java │ │ ├── ItemStreamRequest.java │ │ ├── ItemStreamRequestBuilder.java │ │ ├── Location.java │ │ ├── OneDriveClient.java │ │ ├── OpenWithApp.java │ │ ├── OpenWithSet.java │ │ ├── Permission.java │ │ ├── PermissionCollectionPage.java │ │ ├── PermissionCollectionRequest.java │ │ ├── PermissionCollectionRequestBuilder.java │ │ ├── PermissionRequest.java │ │ ├── PermissionRequestBuilder.java │ │ ├── Photo.java │ │ ├── Quota.java │ │ ├── RecentCollectionPage.java │ │ ├── RecentRequest.java │ │ ├── RecentRequestBuilder.java │ │ ├── SearchCollectionPage.java │ │ ├── SearchRequest.java │ │ ├── SearchRequestBuilder.java │ │ ├── SearchResult.java │ │ ├── Share.java │ │ ├── ShareCollectionPage.java │ │ ├── ShareCollectionRequest.java │ │ ├── ShareCollectionRequestBuilder.java │ │ ├── ShareRequest.java │ │ ├── ShareRequestBuilder.java │ │ ├── Shared.java │ │ ├── SharingInvitation.java │ │ ├── SharingLink.java │ │ ├── SpecialFolder.java │ │ ├── StringCollectionPage.java │ │ ├── StringCollectionRequest.java │ │ ├── StringCollectionRequestBuilder.java │ │ ├── Thumbnail.java │ │ ├── ThumbnailRequest.java │ │ ├── ThumbnailRequestBuilder.java │ │ ├── ThumbnailSet.java │ │ ├── ThumbnailSetCollectionPage.java │ │ ├── ThumbnailSetCollectionRequest.java │ │ ├── ThumbnailSetCollectionRequestBuilder.java │ │ ├── ThumbnailSetRequest.java │ │ ├── ThumbnailSetRequestBuilder.java │ │ ├── ThumbnailStreamRequest.java │ │ ├── ThumbnailStreamRequestBuilder.java │ │ ├── UploadSession.java │ │ └── Video.java │ ├── generated/ │ │ ├── BaseAsyncOperationStatus.java │ │ ├── BaseAudio.java │ │ ├── BaseChunkedUploadSessionDescriptor.java │ │ ├── BaseCopyBody.java │ │ ├── BaseCopyRequest.java │ │ ├── BaseCopyRequestBuilder.java │ │ ├── BaseCreateLinkBody.java │ │ ├── BaseCreateLinkRequest.java │ │ ├── BaseCreateLinkRequestBuilder.java │ │ ├── BaseCreateSessionBody.java │ │ ├── BaseCreateSessionRequest.java │ │ ├── BaseCreateSessionRequestBuilder.java │ │ ├── BaseDeleted.java │ │ ├── BaseDeltaCollectionPage.java │ │ ├── BaseDeltaCollectionResponse.java │ │ ├── BaseDeltaRequest.java │ │ ├── BaseDeltaRequestBuilder.java │ │ ├── BaseDeltaResponse.java │ │ ├── BaseDrive.java │ │ ├── BaseDriveCollectionPage.java │ │ ├── BaseDriveCollectionRequest.java │ │ ├── BaseDriveCollectionRequestBuilder.java │ │ ├── BaseDriveCollectionResponse.java │ │ ├── BaseDriveRequest.java │ │ ├── BaseDriveRequestBuilder.java │ │ ├── BaseFile.java │ │ ├── BaseFileSystemInfo.java │ │ ├── BaseFolder.java │ │ ├── BaseHashes.java │ │ ├── BaseIdentity.java │ │ ├── BaseIdentitySet.java │ │ ├── BaseImage.java │ │ ├── BaseItem.java │ │ ├── BaseItemCollectionPage.java │ │ ├── BaseItemCollectionRequest.java │ │ ├── BaseItemCollectionRequestBuilder.java │ │ ├── BaseItemCollectionResponse.java │ │ ├── BaseItemReference.java │ │ ├── BaseItemRequest.java │ │ ├── BaseItemRequestBuilder.java │ │ ├── BaseItemStreamRequest.java │ │ ├── BaseItemStreamRequestBuilder.java │ │ ├── BaseLocation.java │ │ ├── BaseOneDriveClient.java │ │ ├── BaseOpenWithApp.java │ │ ├── BaseOpenWithSet.java │ │ ├── BasePermission.java │ │ ├── BasePermissionCollectionPage.java │ │ ├── BasePermissionCollectionRequest.java │ │ ├── BasePermissionCollectionRequestBuilder.java │ │ ├── BasePermissionCollectionResponse.java │ │ ├── BasePermissionRequest.java │ │ ├── BasePermissionRequestBuilder.java │ │ ├── BasePhoto.java │ │ ├── BaseQuota.java │ │ ├── BaseRecentCollectionPage.java │ │ ├── BaseRecentCollectionResponse.java │ │ ├── BaseRecentRequest.java │ │ ├── BaseRecentRequestBuilder.java │ │ ├── BaseSearchCollectionPage.java │ │ ├── BaseSearchCollectionResponse.java │ │ ├── BaseSearchRequest.java │ │ ├── BaseSearchRequestBuilder.java │ │ ├── BaseSearchResult.java │ │ ├── BaseShare.java │ │ ├── BaseShareCollectionPage.java │ │ ├── BaseShareCollectionRequest.java │ │ ├── BaseShareCollectionRequestBuilder.java │ │ ├── BaseShareCollectionResponse.java │ │ ├── BaseShareRequest.java │ │ ├── BaseShareRequestBuilder.java │ │ ├── BaseShared.java │ │ ├── BaseSharingInvitation.java │ │ ├── BaseSharingLink.java │ │ ├── BaseSpecialFolder.java │ │ ├── BaseStringCollectionPage.java │ │ ├── BaseStringCollectionRequest.java │ │ ├── BaseStringCollectionRequestBuilder.java │ │ ├── BaseStringCollectionResponse.java │ │ ├── BaseThumbnail.java │ │ ├── BaseThumbnailRequest.java │ │ ├── BaseThumbnailRequestBuilder.java │ │ ├── BaseThumbnailSet.java │ │ ├── BaseThumbnailSetCollectionPage.java │ │ ├── BaseThumbnailSetCollectionRequest.java │ │ ├── BaseThumbnailSetCollectionRequestBuilder.java │ │ ├── BaseThumbnailSetCollectionResponse.java │ │ ├── BaseThumbnailSetRequest.java │ │ ├── BaseThumbnailSetRequestBuilder.java │ │ ├── BaseThumbnailStreamRequest.java │ │ ├── BaseThumbnailStreamRequestBuilder.java │ │ ├── BaseUploadSession.java │ │ ├── BaseVideo.java │ │ ├── IBaseCopyRequest.java │ │ ├── IBaseCopyRequestBuilder.java │ │ ├── IBaseCreateLinkRequest.java │ │ ├── IBaseCreateLinkRequestBuilder.java │ │ ├── IBaseCreateSessionRequest.java │ │ ├── IBaseCreateSessionRequestBuilder.java │ │ ├── IBaseDeltaCollectionPage.java │ │ ├── IBaseDeltaRequest.java │ │ ├── IBaseDeltaRequestBuilder.java │ │ ├── IBaseDriveCollectionPage.java │ │ ├── IBaseDriveCollectionRequest.java │ │ ├── IBaseDriveCollectionRequestBuilder.java │ │ ├── IBaseDriveRequest.java │ │ ├── IBaseDriveRequestBuilder.java │ │ ├── IBaseItemCollectionPage.java │ │ ├── IBaseItemCollectionRequest.java │ │ ├── IBaseItemCollectionRequestBuilder.java │ │ ├── IBaseItemRequest.java │ │ ├── IBaseItemRequestBuilder.java │ │ ├── IBaseItemStreamRequest.java │ │ ├── IBaseItemStreamRequestBuilder.java │ │ ├── IBaseOneDriveClient.java │ │ ├── IBasePermissionCollectionPage.java │ │ ├── IBasePermissionCollectionRequest.java │ │ ├── IBasePermissionCollectionRequestBuilder.java │ │ ├── IBasePermissionRequest.java │ │ ├── IBasePermissionRequestBuilder.java │ │ ├── IBaseRecentCollectionPage.java │ │ ├── IBaseRecentRequest.java │ │ ├── IBaseRecentRequestBuilder.java │ │ ├── IBaseSearchCollectionPage.java │ │ ├── IBaseSearchRequest.java │ │ ├── IBaseSearchRequestBuilder.java │ │ ├── IBaseShareCollectionPage.java │ │ ├── IBaseShareCollectionRequest.java │ │ ├── IBaseShareCollectionRequestBuilder.java │ │ ├── IBaseShareRequest.java │ │ ├── IBaseShareRequestBuilder.java │ │ ├── IBaseStringCollectionPage.java │ │ ├── IBaseStringCollectionRequest.java │ │ ├── IBaseStringCollectionRequestBuilder.java │ │ ├── IBaseThumbnailRequest.java │ │ ├── IBaseThumbnailRequestBuilder.java │ │ ├── IBaseThumbnailSetCollectionPage.java │ │ ├── IBaseThumbnailSetCollectionRequest.java │ │ ├── IBaseThumbnailSetCollectionRequestBuilder.java │ │ ├── IBaseThumbnailSetRequest.java │ │ ├── IBaseThumbnailSetRequestBuilder.java │ │ ├── IBaseThumbnailStreamRequest.java │ │ └── IBaseThumbnailStreamRequestBuilder.java │ ├── http/ │ │ ├── BaseCollectionPage.java │ │ ├── BaseCollectionRequest.java │ │ ├── BaseRequest.java │ │ ├── BaseRequestBuilder.java │ │ ├── BaseStreamRequest.java │ │ ├── DefaultConnectionFactory.java │ │ ├── DefaultHttpProvider.java │ │ ├── HttpMethod.java │ │ ├── HttpResponseCode.java │ │ ├── IBaseCollectionPage.java │ │ ├── IConnection.java │ │ ├── IConnectionFactory.java │ │ ├── IHttpProvider.java │ │ ├── IHttpRequest.java │ │ ├── IHttpStreamRequest.java │ │ ├── IRequestBuilder.java │ │ ├── IRequestInterceptor.java │ │ ├── IStatefulResponseHandler.java │ │ ├── OneDriveError.java │ │ ├── OneDriveErrorResponse.java │ │ ├── OneDriveFatalServiceException.java │ │ ├── OneDriveInnerError.java │ │ ├── OneDriveServiceException.java │ │ └── UrlConnection.java │ ├── logger/ │ │ ├── DefaultLogger.java │ │ ├── ILogger.java │ │ └── LoggerLevel.java │ ├── options/ │ │ ├── HeaderOption.java │ │ ├── Option.java │ │ └── QueryOption.java │ └── serializer/ │ ├── CalendarSerializer.java │ ├── DefaultSerializer.java │ ├── GsonFactory.java │ ├── IJsonBackedObject.java │ └── ISerializer.java └── settings.gradle
SYMBOL INDEX (1454 symbols across 363 files)
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/concurrency/MockExecutors.java
class MockExecutors (line 30) | public class MockExecutors implements IExecutors {
method performOnBackground (line 32) | @Override
method performOnForeground (line 37) | @Override
method performOnForeground (line 43) | @Override
method performOnForeground (line 50) | @Override
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/core/CoreTests.java
class CoreTests (line 34) | public class CoreTests extends AndroidTestCase {
method testMinVersionNumber (line 36) | public void testMinVersionNumber() throws Exception {
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/core/MockClient.java
class MockClient (line 14) | public class MockClient implements IOneDriveClient{
method getDrive (line 17) | @Override
method getDrives (line 22) | @Override
method getDrive (line 27) | @Override
method getShares (line 32) | @Override
method getShare (line 37) | @Override
method getAuthenticator (line 42) | @Override
method getServiceRoot (line 47) | @Override
method getExecutors (line 52) | @Override
method getHttpProvider (line 57) | @Override
method getLogger (line 62) | @Override
method getSerializer (line 67) | @Override
method validate (line 72) | @Override
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/BaseRequestTests.java
class BaseRequestTests (line 21) | public class BaseRequestTests extends AndroidTestCase{
method setUp (line 28) | @Override
method testUrlEncoded (line 46) | public void testUrlEncoded() throws Exception {
method testUrlWithQuery (line 57) | public void testUrlWithQuery() throws Exception {
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/DefaultHttpProviderTests.java
class DefaultHttpProviderTests (line 56) | public class DefaultHttpProviderTests extends AndroidTestCase {
method testAsyncSessionResult (line 61) | public void testAsyncSessionResult() throws Exception {
method testAsyncSessionResultCompleted (line 90) | public void testAsyncSessionResultCompleted() throws Exception {
method testNoContentType (line 120) | public void testNoContentType() throws Exception {
method testDriveResponse (line 151) | public void testDriveResponse() throws Exception {
method testBinaryResponse (line 182) | public void testBinaryResponse() throws Exception {
method testPostItem (line 207) | public void testPostItem() throws Exception {
method testPostByte (line 239) | public void testPostByte() throws Exception {
method testErrorResponse (line 291) | public void testErrorResponse() throws Exception {
method testBodyLessResponse (line 330) | public void testBodyLessResponse() throws Exception {
method testMonitorCreation (line 360) | public void testMonitorCreation() throws Exception {
method testUploadReturnNextSession (line 390) | public void testUploadReturnNextSession() throws Exception {
method testUploadReturnUploadedItem (line 426) | public void testUploadReturnUploadedItem() throws Exception {
method testUploadReturnError (line 461) | public void testUploadReturnError() throws Exception {
class TestDataConnection (line 500) | private class TestDataConnection implements IConnection {
method TestDataConnection (line 504) | public TestDataConnection(ITestData data) {
method setFollowRedirects (line 508) | @Override
method addRequestHeader (line 513) | @Override
method getOutputStream (line 518) | @Override
method getInputStream (line 523) | @Override
method getResponseCode (line 528) | @Override
method getResponseMessage (line 533) | @Override
method close (line 538) | @Override
method getHeaders (line 543) | @Override
method getRequestMethod (line 548) | @Override
method setContentLength (line 553) | @Override
type ITestData (line 562) | private interface ITestData {
method getRequestCode (line 563) | int getRequestCode();
method getJsonResponse (line 565) | String getJsonResponse();
method getHeaders (line 567) | Map<String,String> getHeaders();
method setDefaultHttpProvider (line 574) | private void setDefaultHttpProvider(final Object toSerialize) {
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/MockInterceptor.java
class MockInterceptor (line 30) | public class MockInterceptor implements IRequestInterceptor {
method intercept (line 37) | @Override
method getInterceptionCount (line 46) | public int getInterceptionCount() {
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/MockRequest.java
class MockRequest (line 36) | class MockRequest implements IHttpRequest {
method getRequestUrl (line 38) | @Override
method getHttpMethod (line 47) | @Override
method getHeaders (line 52) | @Override
method getOptions (line 57) | @Override
method addHeader (line 62) | @Override
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/MockSingleConnectionFactory.java
class MockSingleConnectionFactory (line 30) | class MockSingleConnectionFactory implements IConnectionFactory {
method MockSingleConnectionFactory (line 41) | public MockSingleConnectionFactory(IConnection connection) {
method createFromRequest (line 45) | @Override
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/logger/MockLogger.java
class MockLogger (line 28) | public class MockLogger implements ILogger {
method setLoggingLevel (line 30) | @Override
method getLoggingLevel (line 35) | @Override
method logDebug (line 40) | @Override
method logError (line 45) | @Override
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/serializer/DefaultSerializerTests.java
class DefaultSerializerTests (line 33) | public class DefaultSerializerTests extends AndroidTestCase {
method testDriveDeserialization (line 39) | public void testDriveDeserialization() throws Exception {
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/serializer/ISO8601Test.java
class ISO8601Test (line 36) | public class ISO8601Test extends AndroidTestCase {
method testFromDate (line 42) | public void testFromDate() throws Exception {
method testToDate (line 58) | public void testToDate() throws Exception {
FILE: onedrivesdk/src/androidTest/java/com/onedrive/sdk/serializer/MockSerializer.java
class MockSerializer (line 28) | public class MockSerializer implements ISerializer {
method MockSerializer (line 44) | public MockSerializer(final Object deserializeReturn, final String ser...
method deserializeObject (line 49) | @Override
method serializeObject (line 55) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ADALAccountInfo.java
class ADALAccountInfo (line 31) | public class ADALAccountInfo implements IAccountInfo {
method ADALAccountInfo (line 60) | public ADALAccountInfo(final ADALAuthenticator authenticator,
method getAccountType (line 74) | @Override
method getAccessToken (line 83) | @Override
method getServiceRoot (line 92) | @Override
method isExpired (line 102) | @Override
method refresh (line 110) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ADALAuthenticator.java
class ADALAuthenticator (line 62) | public abstract class ADALAuthenticator implements IAuthenticator {
method getClientId (line 164) | protected abstract String getClientId();
method getRedirectUrl (line 170) | protected abstract String getRedirectUrl();
method getAccountInfo (line 176) | @Override
method init (line 188) | @Override
method login (line 251) | @Override
method login (line 281) | @Override
method loginSilent (line 345) | @Override
method loginSilent (line 374) | @Override
method logout (line 448) | @Override
method logout (line 477) | @SuppressWarnings("deprecation")
method getDiscoveryServiceAuthResult (line 509) | private AuthenticationResult getDiscoveryServiceAuthResult(final Strin...
method getSharedPreferences (line 577) | private SharedPreferences getSharedPreferences() {
method getOneDriveApiService (line 586) | private ServiceInfo getOneDriveApiService(final ServiceInfo[] services) {
method getOneDriveServiceInfoFromDiscoveryService (line 607) | private ServiceInfo getOneDriveServiceInfoFromDiscoveryService(final S...
method getOneDriveServiceAuthResult (line 631) | private AuthenticationResult getOneDriveServiceAuthResult(final Servic...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/AccountType.java
type AccountType (line 28) | public enum AccountType {
method AccountType (line 49) | AccountType(final String... representations) {
method fromRepresentation (line 58) | public static AccountType fromRepresentation(final String representati...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/AuthorizationInterceptor.java
class AuthorizationInterceptor (line 33) | public class AuthorizationInterceptor implements IRequestInterceptor {
method AuthorizationInterceptor (line 60) | public AuthorizationInterceptor(final IAuthenticator authenticator, fi...
method intercept (line 69) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ClientAuthenticatorException.java
class ClientAuthenticatorException (line 31) | public class ClientAuthenticatorException extends ClientException {
method ClientAuthenticatorException (line 39) | public ClientAuthenticatorException(final String message, final Throwa...
method ClientAuthenticatorException (line 48) | public ClientAuthenticatorException(final String message, final OneDri...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationAuthenticator.java
class DisambiguationAuthenticator (line 45) | public class DisambiguationAuthenticator implements IAuthenticator {
method DisambiguationAuthenticator (line 102) | public DisambiguationAuthenticator(final MSAAuthenticator msaAuthentic...
method init (line 116) | @Override
method login (line 139) | @Override
method login (line 169) | @Override
method loginSilent (line 238) | @Override
method loginSilent (line 266) | @Override
method logout (line 302) | @Override
method logout (line 326) | @Override
method getAccountInfo (line 354) | @Override
method getSharedPreferences (line 363) | private SharedPreferences getSharedPreferences() {
method setAccountTypeInPreferences (line 371) | private void setAccountTypeInPreferences(@Nullable final AccountType a...
method getAccountTypeInPreferences (line 387) | @Nullable
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationDialog.java
class DisambiguationDialog (line 43) | class DisambiguationDialog extends Dialog implements DialogInterface.OnC...
method DisambiguationDialog (line 61) | public DisambiguationDialog(final Context context,
method getLogger (line 71) | public ILogger getLogger() {
method onCancel (line 75) | @Override
method onCreate (line 82) | @SuppressLint("SetJavaScriptEnabled")
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationRequest.java
class DisambiguationRequest (line 33) | class DisambiguationRequest {
method DisambiguationRequest (line 56) | public DisambiguationRequest(final Activity activity,
method execute (line 67) | public void execute() {
method getCallback (line 80) | public ICallback<DisambiguationResponse> getCallback() {
method getLogger (line 88) | public ILogger getLogger() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationResponse.java
class DisambiguationResponse (line 28) | class DisambiguationResponse {
method DisambiguationResponse (line 45) | public DisambiguationResponse(final AccountType accountType, final Str...
method getAccountType (line 54) | public AccountType getAccountType() {
method getAccount (line 62) | public String getAccount() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationWebView.java
class DisambiguationWebView (line 38) | class DisambiguationWebView extends WebViewClient {
method DisambiguationWebView (line 55) | public DisambiguationWebView(final DisambiguationDialog disambiguation...
method onPageStarted (line 61) | @Override
method onReceivedError (line 76) | @SuppressWarnings("deprecation")
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DiscoveryServiceResponse.java
class DiscoveryServiceResponse (line 27) | public class DiscoveryServiceResponse {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/IAccountInfo.java
type IAccountInfo (line 28) | public interface IAccountInfo {
method getAccountType (line 34) | AccountType getAccountType();
method getAccessToken (line 40) | String getAccessToken();
method getServiceRoot (line 46) | String getServiceRoot();
method isExpired (line 53) | boolean isExpired();
method refresh (line 58) | void refresh();
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/IAuthenticator.java
type IAuthenticator (line 36) | public interface IAuthenticator {
method getAccountInfo (line 42) | IAccountInfo getAccountInfo();
method init (line 51) | void init(final IExecutors executors,
method login (line 61) | void login(final String emailAddressHint, final ICallback<IAccountInfo...
method login (line 69) | IAccountInfo login(final String emailAddressHint) throws ClientException;
method loginSilent (line 75) | void loginSilent(final ICallback<IAccountInfo> loginCallback);
method loginSilent (line 82) | IAccountInfo loginSilent() throws ClientException;
method logout (line 88) | void logout(final ICallback<Void> logoutCallback);
method logout (line 94) | void logout() throws ClientException;
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/MSAAccountInfo.java
class MSAAccountInfo (line 31) | public class MSAAccountInfo implements IAccountInfo {
method MSAAccountInfo (line 59) | public MSAAccountInfo(final MSAAuthenticator authenticator,
method getAccountType (line 71) | @Override
method getAccessToken (line 80) | @Override
method getServiceRoot (line 89) | @Override
method isExpired (line 99) | @Override
method refresh (line 107) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/MSAAuthenticator.java
class MSAAuthenticator (line 51) | @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
method getClientId (line 109) | public abstract String getClientId();
method getScopes (line 116) | public abstract String[] getScopes();
method init (line 130) | @Override
method login (line 154) | @Override
method login (line 184) | @Override
method loginSilent (line 259) | @Override
method loginSilent (line 288) | @Override
method logout (line 354) | @Override
method logout (line 383) | @Override
method getAccountInfo (line 433) | @Override
method getSharedPreferences (line 447) | private SharedPreferences getSharedPreferences() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/MicrosoftOAuthConfig.java
class MicrosoftOAuthConfig (line 32) | class MicrosoftOAuthConfig implements OAuthConfig {
method MicrosoftOAuthConfig (line 62) | public MicrosoftOAuthConfig() {
method getAuthorizeUri (line 69) | @Override
method getDesktopUri (line 74) | @Override
method getLogoutUri (line 79) | @Override
method getTokenUri (line 84) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ServiceInfo.java
class ServiceInfo (line 27) | public class ServiceInfo {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/authentication/adal/BrokerPermissionsChecker.java
class BrokerPermissionsChecker (line 37) | public class BrokerPermissionsChecker {
method BrokerPermissionsChecker (line 69) | public BrokerPermissionsChecker(final Context context, final ILogger l...
method check (line 79) | public void check() throws ClientAuthenticatorException {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/AsyncMonitor.java
class AsyncMonitor (line 36) | public class AsyncMonitor<T> {
method AsyncMonitor (line 64) | public AsyncMonitor(final IOneDriveClient client,
method getStatus (line 77) | public void getStatus(final ICallback<AsyncOperationStatus> callback) {
method getStatus (line 95) | public AsyncOperationStatus getStatus() throws ClientException {
method getResult (line 112) | public void getResult(final ICallback<T> callback) {
method getResult (line 130) | public T getResult() throws ClientException {
method pollForResult (line 145) | public void pollForResult(final long millisBetweenPoll, final IProgres...
method isCompleted (line 187) | private boolean isCompleted(final AsyncOperationStatus status) {
method isFailed (line 196) | private boolean isFailed(final AsyncOperationStatus status) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/AsyncMonitorLocation.java
class AsyncMonitorLocation (line 28) | public class AsyncMonitorLocation {
method AsyncMonitorLocation (line 39) | public AsyncMonitorLocation(final String monitorLocation) {
method getLocation (line 47) | public String getLocation() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/AsyncMonitorResponseHandler.java
class AsyncMonitorResponseHandler (line 40) | public class AsyncMonitorResponseHandler implements IStatefulResponseHan...
method configConnection (line 47) | @Override
method generateResult (line 62) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/AsyncOperationException.java
class AsyncOperationException (line 32) | public class AsyncOperationException extends ClientException {
method AsyncOperationException (line 43) | public AsyncOperationException(final AsyncOperationStatus status) {
method getStatus (line 52) | public AsyncOperationStatus getStatus() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/ChunkedUploadProvider.java
class ChunkedUploadProvider (line 40) | public class ChunkedUploadProvider<UploadType> {
method ChunkedUploadProvider (line 102) | public ChunkedUploadProvider(final UploadSession uploadSession,
method upload (line 140) | public void upload(final List<Option> options,
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/ChunkedUploadRequest.java
class ChunkedUploadRequest (line 38) | public class ChunkedUploadRequest {
method ChunkedUploadRequest (line 86) | public ChunkedUploadRequest(final String requestUrl,
method upload (line 114) | public <UploadType> ChunkedUploadResult upload(
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/ChunkedUploadResponseHandler.java
class ChunkedUploadResponseHandler (line 44) | public class ChunkedUploadResponseHandler<UploadType>
method ChunkedUploadResponseHandler (line 56) | public ChunkedUploadResponseHandler(final Class<UploadType> uploadType) {
method configConnection (line 65) | @Override
method generateResult (line 80) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/DefaultExecutors.java
class DefaultExecutors (line 34) | public class DefaultExecutors implements IExecutors {
method DefaultExecutors (line 55) | public DefaultExecutors(final ILogger logger) {
method performOnBackground (line 65) | @Override
method performOnForeground (line 78) | @Override
method performOnForeground (line 100) | public <Result> void performOnForeground(final int progress,
method performOnForeground (line 122) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/ICallback.java
type ICallback (line 31) | public interface ICallback<Result> {
method success (line 36) | void success(final Result result);
method failure (line 42) | void failure(final ClientException ex);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/IExecutors.java
type IExecutors (line 30) | public interface IExecutors {
method performOnBackground (line 36) | void performOnBackground(final Runnable runnable);
method performOnForeground (line 44) | <Result> void performOnForeground(final Result result,
method performOnForeground (line 54) | <Result> void performOnForeground(final int progress,
method performOnForeground (line 64) | <Result> void performOnForeground(final ClientException exception,
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/IProgressCallback.java
type IProgressCallback (line 29) | public interface IProgressCallback<Result> extends ICallback<Result> {
method progress (line 36) | void progress(final long current, final long max);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/ResultGetter.java
type ResultGetter (line 31) | public interface ResultGetter<T> {
method getResultFrom (line 39) | T getResultFrom(final String resourceUrl, final IOneDriveClient client);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/SimpleWaiter.java
class SimpleWaiter (line 28) | public class SimpleWaiter {
method waitForSignal (line 43) | public void waitForSignal() {
method signal (line 59) | public void signal() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/SynchronousExecutor.java
class SynchronousExecutor (line 34) | public class SynchronousExecutor implements Executor {
method execute (line 45) | @Override public void execute(@NonNull final Runnable runnable) {
method getActiveCount (line 65) | public int getActiveCount() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/core/BaseClient.java
class BaseClient (line 34) | public class BaseClient implements IBaseClient {
method getAuthenticator (line 65) | @Override
method getServiceRoot (line 74) | @Override
method getExecutors (line 83) | @Override
method getHttpProvider (line 92) | @Override
method getLogger (line 101) | public ILogger getLogger() {
method getSerializer (line 109) | @Override
method validate (line 117) | @Override
method setLogger (line 140) | protected void setLogger(final ILogger logger) {
method setExecutors (line 148) | protected void setExecutors(final IExecutors executors) {
method setAuthenticator (line 156) | protected void setAuthenticator(final IAuthenticator authenticator) {
method setHttpProvider (line 164) | protected void setHttpProvider(final IHttpProvider httpProvider) {
method setSerializer (line 172) | public void setSerializer(final ISerializer serializer) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/core/ClientException.java
class ClientException (line 28) | public class ClientException extends RuntimeException {
method ClientException (line 41) | public ClientException(final String message, final Throwable ex, final...
method isError (line 51) | public boolean isError(final OneDriveErrorCodes expectedCode) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/core/DefaultClientConfig.java
class DefaultClientConfig (line 43) | public abstract class DefaultClientConfig implements IClientConfig {
method createWithAuthenticator (line 80) | public static IClientConfig createWithAuthenticator(final IAuthenticat...
method createWithAuthenticators (line 93) | public static IClientConfig createWithAuthenticators(
method getAuthenticator (line 106) | @Override
method getHttpProvider (line 115) | @Override
method getSerializer (line 131) | @Override
method getExecutors (line 144) | @Override
method getLogger (line 157) | public ILogger getLogger() {
method getRequestInterceptor (line 169) | private IRequestInterceptor getRequestInterceptor() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/core/IBaseClient.java
type IBaseClient (line 34) | public interface IBaseClient {
method getAuthenticator (line 40) | IAuthenticator getAuthenticator();
method getServiceRoot (line 46) | String getServiceRoot();
method getExecutors (line 52) | IExecutors getExecutors();
method getHttpProvider (line 58) | IHttpProvider getHttpProvider();
method getLogger (line 64) | ILogger getLogger();
method getSerializer (line 70) | ISerializer getSerializer();
method validate (line 75) | void validate();
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/core/IClientConfig.java
type IClientConfig (line 34) | public interface IClientConfig {
method getAuthenticator (line 39) | IAuthenticator getAuthenticator();
method getExecutors (line 45) | IExecutors getExecutors();
method getHttpProvider (line 51) | IHttpProvider getHttpProvider();
method getLogger (line 57) | ILogger getLogger();
method getSerializer (line 63) | ISerializer getSerializer();
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/core/OneDriveErrorCodes.java
type OneDriveErrorCodes (line 29) | public enum OneDriveErrorCodes {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/AsyncOperationStatus.java
class AsyncOperationStatus (line 40) | public class AsyncOperationStatus extends BaseAsyncOperationStatus {
method createdCompleted (line 57) | public static AsyncOperationStatus createdCompleted(final String seeOt...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Audio.java
class Audio (line 40) | public class Audio extends BaseAudio {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ChunkedUploadResult.java
class ChunkedUploadResult (line 32) | public class ChunkedUploadResult<UploadType> {
method ChunkedUploadResult (line 52) | public ChunkedUploadResult(UploadType uploaded) {
method ChunkedUploadResult (line 62) | public ChunkedUploadResult(UploadSession session) {
method ChunkedUploadResult (line 72) | public ChunkedUploadResult(ClientException error) {
method ChunkedUploadResult (line 82) | public ChunkedUploadResult(OneDriveServiceException exception) {
method chunkCompleted (line 90) | public boolean chunkCompleted() {
method uploadCompleted (line 98) | public boolean uploadCompleted() {
method hasError (line 106) | public boolean hasError() {
method getItem (line 114) | public UploadType getItem() {
method getSession (line 122) | public UploadSession getSession() {
method getError (line 130) | public ClientException getError() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ChunkedUploadSessionDescriptor.java
class ChunkedUploadSessionDescriptor (line 40) | public class ChunkedUploadSessionDescriptor extends BaseChunkedUploadSes...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CopyBody.java
class CopyBody (line 43) | public class CopyBody extends BaseCopyBody {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CopyRequest.java
class CopyRequest (line 40) | public class CopyRequest extends BaseCopyRequest implements ICopyRequest {
method CopyRequest (line 49) | public CopyRequest(final String requestUrl, final IOneDriveClient clie...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CopyRequestBuilder.java
class CopyRequestBuilder (line 40) | public class CopyRequestBuilder extends BaseCopyRequestBuilder implement...
method CopyRequestBuilder (line 49) | public CopyRequestBuilder(final String requestUrl, final IOneDriveClie...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateLinkBody.java
class CreateLinkBody (line 43) | public class CreateLinkBody extends BaseCreateLinkBody {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateLinkRequest.java
class CreateLinkRequest (line 40) | public class CreateLinkRequest extends BaseCreateLinkRequest implements ...
method CreateLinkRequest (line 49) | public CreateLinkRequest(final String requestUrl, final IOneDriveClien...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateLinkRequestBuilder.java
class CreateLinkRequestBuilder (line 40) | public class CreateLinkRequestBuilder extends BaseCreateLinkRequestBuild...
method CreateLinkRequestBuilder (line 49) | public CreateLinkRequestBuilder(final String requestUrl, final IOneDri...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateSessionBody.java
class CreateSessionBody (line 43) | public class CreateSessionBody extends BaseCreateSessionBody {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateSessionRequest.java
class CreateSessionRequest (line 40) | public class CreateSessionRequest extends BaseCreateSessionRequest imple...
method CreateSessionRequest (line 49) | public CreateSessionRequest(final String requestUrl, final IOneDriveCl...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateSessionRequestBuilder.java
class CreateSessionRequestBuilder (line 40) | public class CreateSessionRequestBuilder extends BaseCreateSessionReques...
method CreateSessionRequestBuilder (line 49) | public CreateSessionRequestBuilder(final String requestUrl, final IOne...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Deleted.java
class Deleted (line 40) | public class Deleted extends BaseDeleted {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DeltaCollectionPage.java
class DeltaCollectionPage (line 40) | public class DeltaCollectionPage extends BaseDeltaCollectionPage impleme...
method DeltaCollectionPage (line 48) | public DeltaCollectionPage(final BaseDeltaCollectionResponse response,...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DeltaRequest.java
class DeltaRequest (line 40) | public class DeltaRequest extends BaseDeltaRequest implements IDeltaRequ...
method DeltaRequest (line 49) | public DeltaRequest(final String requestUrl, final IOneDriveClient cli...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DeltaRequestBuilder.java
class DeltaRequestBuilder (line 40) | public class DeltaRequestBuilder extends BaseDeltaRequestBuilder impleme...
method DeltaRequestBuilder (line 49) | public DeltaRequestBuilder(final String requestUrl, final IOneDriveCli...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DeltaResponse.java
class DeltaResponse (line 40) | public class DeltaResponse extends BaseDeltaResponse {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Drive.java
class Drive (line 40) | public class Drive extends BaseDrive {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DriveCollectionPage.java
class DriveCollectionPage (line 40) | public class DriveCollectionPage extends BaseDriveCollectionPage impleme...
method DriveCollectionPage (line 48) | public DriveCollectionPage(final BaseDriveCollectionResponse response,...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DriveCollectionRequest.java
class DriveCollectionRequest (line 40) | public class DriveCollectionRequest extends BaseDriveCollectionRequest i...
method DriveCollectionRequest (line 49) | public DriveCollectionRequest(final String requestUrl, final IOneDrive...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DriveCollectionRequestBuilder.java
class DriveCollectionRequestBuilder (line 40) | public class DriveCollectionRequestBuilder extends BaseDriveCollectionRe...
method DriveCollectionRequestBuilder (line 49) | public DriveCollectionRequestBuilder(final String requestUrl, final IO...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DriveRequest.java
class DriveRequest (line 40) | public class DriveRequest extends BaseDriveRequest implements IDriveRequ...
method DriveRequest (line 49) | public DriveRequest(final String requestUrl, final IOneDriveClient cli...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DriveRequestBuilder.java
class DriveRequestBuilder (line 40) | public class DriveRequestBuilder extends BaseDriveRequestBuilder impleme...
method DriveRequestBuilder (line 49) | public DriveRequestBuilder(final String requestUrl, final IOneDriveCli...
method getRoot (line 57) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/File.java
class File (line 40) | public class File extends BaseFile {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/FileSystemInfo.java
class FileSystemInfo (line 40) | public class FileSystemInfo extends BaseFileSystemInfo {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Folder.java
class Folder (line 40) | public class Folder extends BaseFolder {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Hashes.java
class Hashes (line 40) | public class Hashes extends BaseHashes {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICopyRequest.java
type ICopyRequest (line 40) | public interface ICopyRequest extends IBaseCopyRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICopyRequestBuilder.java
type ICopyRequestBuilder (line 40) | public interface ICopyRequestBuilder extends IBaseCopyRequestBuilder {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICreateLinkRequest.java
type ICreateLinkRequest (line 40) | public interface ICreateLinkRequest extends IBaseCreateLinkRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICreateLinkRequestBuilder.java
type ICreateLinkRequestBuilder (line 40) | public interface ICreateLinkRequestBuilder extends IBaseCreateLinkReques...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICreateSessionRequest.java
type ICreateSessionRequest (line 40) | public interface ICreateSessionRequest extends IBaseCreateSessionRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICreateSessionRequestBuilder.java
type ICreateSessionRequestBuilder (line 40) | public interface ICreateSessionRequestBuilder extends IBaseCreateSession...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDeltaCollectionPage.java
type IDeltaCollectionPage (line 40) | public interface IDeltaCollectionPage extends IBaseDeltaCollectionPage {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDeltaRequest.java
type IDeltaRequest (line 40) | public interface IDeltaRequest extends IBaseDeltaRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDeltaRequestBuilder.java
type IDeltaRequestBuilder (line 40) | public interface IDeltaRequestBuilder extends IBaseDeltaRequestBuilder {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDriveCollectionPage.java
type IDriveCollectionPage (line 40) | public interface IDriveCollectionPage extends IBaseDriveCollectionPage {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDriveCollectionRequest.java
type IDriveCollectionRequest (line 40) | public interface IDriveCollectionRequest extends IBaseDriveCollectionReq...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDriveCollectionRequestBuilder.java
type IDriveCollectionRequestBuilder (line 40) | public interface IDriveCollectionRequestBuilder extends IBaseDriveCollec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDriveRequest.java
type IDriveRequest (line 40) | public interface IDriveRequest extends IBaseDriveRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDriveRequestBuilder.java
type IDriveRequestBuilder (line 40) | public interface IDriveRequestBuilder extends IBaseDriveRequestBuilder {
method getRoot (line 46) | IItemRequestBuilder getRoot();
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemCollectionPage.java
type IItemCollectionPage (line 40) | public interface IItemCollectionPage extends IBaseItemCollectionPage {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemCollectionRequest.java
type IItemCollectionRequest (line 40) | public interface IItemCollectionRequest extends IBaseItemCollectionReque...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemCollectionRequestBuilder.java
type IItemCollectionRequestBuilder (line 40) | public interface IItemCollectionRequestBuilder extends IBaseItemCollecti...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemRequest.java
type IItemRequest (line 40) | public interface IItemRequest extends IBaseItemRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemRequestBuilder.java
type IItemRequestBuilder (line 40) | public interface IItemRequestBuilder extends IBaseItemRequestBuilder {
method getItemWithPath (line 47) | IItemRequestBuilder getItemWithPath(final String path);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemStreamRequest.java
type IItemStreamRequest (line 40) | public interface IItemStreamRequest extends IBaseItemStreamRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemStreamRequestBuilder.java
type IItemStreamRequestBuilder (line 40) | public interface IItemStreamRequestBuilder extends IBaseItemStreamReques...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IOneDriveClient.java
type IOneDriveClient (line 40) | public interface IOneDriveClient extends IBaseOneDriveClient {
method getDrive (line 46) | IDriveRequestBuilder getDrive();
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IPermissionCollectionPage.java
type IPermissionCollectionPage (line 40) | public interface IPermissionCollectionPage extends IBasePermissionCollec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IPermissionCollectionRequest.java
type IPermissionCollectionRequest (line 40) | public interface IPermissionCollectionRequest extends IBasePermissionCol...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IPermissionCollectionRequestBuilder.java
type IPermissionCollectionRequestBuilder (line 40) | public interface IPermissionCollectionRequestBuilder extends IBasePermis...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IPermissionRequest.java
type IPermissionRequest (line 40) | public interface IPermissionRequest extends IBasePermissionRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IPermissionRequestBuilder.java
type IPermissionRequestBuilder (line 40) | public interface IPermissionRequestBuilder extends IBasePermissionReques...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IRecentCollectionPage.java
type IRecentCollectionPage (line 40) | public interface IRecentCollectionPage extends IBaseRecentCollectionPage {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IRecentRequest.java
type IRecentRequest (line 40) | public interface IRecentRequest extends IBaseRecentRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IRecentRequestBuilder.java
type IRecentRequestBuilder (line 40) | public interface IRecentRequestBuilder extends IBaseRecentRequestBuilder {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ISearchCollectionPage.java
type ISearchCollectionPage (line 40) | public interface ISearchCollectionPage extends IBaseSearchCollectionPage {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ISearchRequest.java
type ISearchRequest (line 40) | public interface ISearchRequest extends IBaseSearchRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ISearchRequestBuilder.java
type ISearchRequestBuilder (line 40) | public interface ISearchRequestBuilder extends IBaseSearchRequestBuilder {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IShareCollectionPage.java
type IShareCollectionPage (line 40) | public interface IShareCollectionPage extends IBaseShareCollectionPage {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IShareCollectionRequest.java
type IShareCollectionRequest (line 40) | public interface IShareCollectionRequest extends IBaseShareCollectionReq...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IShareCollectionRequestBuilder.java
type IShareCollectionRequestBuilder (line 40) | public interface IShareCollectionRequestBuilder extends IBaseShareCollec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IShareRequest.java
type IShareRequest (line 40) | public interface IShareRequest extends IBaseShareRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IShareRequestBuilder.java
type IShareRequestBuilder (line 40) | public interface IShareRequestBuilder extends IBaseShareRequestBuilder {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IStringCollectionPage.java
type IStringCollectionPage (line 40) | public interface IStringCollectionPage extends IBaseStringCollectionPage {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IStringCollectionRequest.java
type IStringCollectionRequest (line 40) | public interface IStringCollectionRequest extends IBaseStringCollectionR...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IStringCollectionRequestBuilder.java
type IStringCollectionRequestBuilder (line 40) | public interface IStringCollectionRequestBuilder extends IBaseStringColl...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailRequest.java
type IThumbnailRequest (line 40) | public interface IThumbnailRequest extends IBaseThumbnailRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailRequestBuilder.java
type IThumbnailRequestBuilder (line 40) | public interface IThumbnailRequestBuilder extends IBaseThumbnailRequestB...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailSetCollectionPage.java
type IThumbnailSetCollectionPage (line 40) | public interface IThumbnailSetCollectionPage extends IBaseThumbnailSetCo...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailSetCollectionRequest.java
type IThumbnailSetCollectionRequest (line 40) | public interface IThumbnailSetCollectionRequest extends IBaseThumbnailSe...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailSetCollectionRequestBuilder.java
type IThumbnailSetCollectionRequestBuilder (line 40) | public interface IThumbnailSetCollectionRequestBuilder extends IBaseThum...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailSetRequest.java
type IThumbnailSetRequest (line 40) | public interface IThumbnailSetRequest extends IBaseThumbnailSetRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailSetRequestBuilder.java
type IThumbnailSetRequestBuilder (line 40) | public interface IThumbnailSetRequestBuilder extends IBaseThumbnailSetRe...
method getThumbnailSize (line 47) | IThumbnailRequestBuilder getThumbnailSize(final String size);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailStreamRequest.java
type IThumbnailStreamRequest (line 40) | public interface IThumbnailStreamRequest extends IBaseThumbnailStreamReq...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailStreamRequestBuilder.java
type IThumbnailStreamRequestBuilder (line 40) | public interface IThumbnailStreamRequestBuilder extends IBaseThumbnailSt...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Identity.java
class Identity (line 40) | public class Identity extends BaseIdentity {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IdentitySet.java
class IdentitySet (line 40) | public class IdentitySet extends BaseIdentitySet {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Image.java
class Image (line 40) | public class Image extends BaseImage {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Item.java
class Item (line 40) | public class Item extends BaseItem {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemCollectionPage.java
class ItemCollectionPage (line 40) | public class ItemCollectionPage extends BaseItemCollectionPage implement...
method ItemCollectionPage (line 48) | public ItemCollectionPage(final BaseItemCollectionResponse response, f...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemCollectionRequest.java
class ItemCollectionRequest (line 40) | public class ItemCollectionRequest extends BaseItemCollectionRequest imp...
method ItemCollectionRequest (line 49) | public ItemCollectionRequest(final String requestUrl, final IOneDriveC...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemCollectionRequestBuilder.java
class ItemCollectionRequestBuilder (line 40) | public class ItemCollectionRequestBuilder extends BaseItemCollectionRequ...
method ItemCollectionRequestBuilder (line 49) | public ItemCollectionRequestBuilder(final String requestUrl, final IOn...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemReference.java
class ItemReference (line 40) | public class ItemReference extends BaseItemReference {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemRequest.java
class ItemRequest (line 40) | public class ItemRequest extends BaseItemRequest implements IItemRequest {
method ItemRequest (line 49) | public ItemRequest(final String requestUrl, final IOneDriveClient clie...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemRequestBuilder.java
class ItemRequestBuilder (line 40) | public class ItemRequestBuilder extends BaseItemRequestBuilder implement...
method ItemRequestBuilder (line 49) | public ItemRequestBuilder(final String requestUrl, final IOneDriveClie...
method getItemWithPath (line 58) | public IItemRequestBuilder getItemWithPath(final String path) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemStreamRequest.java
class ItemStreamRequest (line 40) | public class ItemStreamRequest extends BaseItemStreamRequest implements ...
method ItemStreamRequest (line 49) | public ItemStreamRequest(final String requestUrl, final IOneDriveClien...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemStreamRequestBuilder.java
class ItemStreamRequestBuilder (line 40) | public class ItemStreamRequestBuilder extends BaseItemStreamRequestBuild...
method ItemStreamRequestBuilder (line 49) | public ItemStreamRequestBuilder(final String requestUrl, final IOneDri...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Location.java
class Location (line 40) | public class Location extends BaseLocation {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/OneDriveClient.java
class OneDriveClient (line 44) | public class OneDriveClient extends BaseOneDriveClient implements IOneDr...
method OneDriveClient (line 49) | protected OneDriveClient() {
method getDrive (line 56) | @Override
class Builder (line 64) | public static class Builder {
method serializer (line 76) | public Builder serializer(final ISerializer serializer) {
method httpProvider (line 86) | public Builder httpProvider(final IHttpProvider httpProvider) {
method authenticator (line 96) | public Builder authenticator(final IAuthenticator authenticator) {
method executors (line 106) | public Builder executors(final IExecutors executors) {
method logger (line 116) | private Builder logger(final ILogger logger) {
method fromConfig (line 126) | public Builder fromConfig(final IClientConfig clientConfig) {
method loginAndBuildClient (line 139) | public void loginAndBuildClient(final Activity activity, final ICall...
method loginAndBuildClient (line 160) | private IOneDriveClient loginAndBuildClient(final Activity activity)...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/OpenWithApp.java
class OpenWithApp (line 40) | public class OpenWithApp extends BaseOpenWithApp {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/OpenWithSet.java
class OpenWithSet (line 40) | public class OpenWithSet extends BaseOpenWithSet {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Permission.java
class Permission (line 40) | public class Permission extends BasePermission {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/PermissionCollectionPage.java
class PermissionCollectionPage (line 40) | public class PermissionCollectionPage extends BasePermissionCollectionPa...
method PermissionCollectionPage (line 48) | public PermissionCollectionPage(final BasePermissionCollectionResponse...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/PermissionCollectionRequest.java
class PermissionCollectionRequest (line 40) | public class PermissionCollectionRequest extends BasePermissionCollectio...
method PermissionCollectionRequest (line 49) | public PermissionCollectionRequest(final String requestUrl, final IOne...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/PermissionCollectionRequestBuilder.java
class PermissionCollectionRequestBuilder (line 40) | public class PermissionCollectionRequestBuilder extends BasePermissionCo...
method PermissionCollectionRequestBuilder (line 49) | public PermissionCollectionRequestBuilder(final String requestUrl, fin...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/PermissionRequest.java
class PermissionRequest (line 40) | public class PermissionRequest extends BasePermissionRequest implements ...
method PermissionRequest (line 49) | public PermissionRequest(final String requestUrl, final IOneDriveClien...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/PermissionRequestBuilder.java
class PermissionRequestBuilder (line 40) | public class PermissionRequestBuilder extends BasePermissionRequestBuild...
method PermissionRequestBuilder (line 49) | public PermissionRequestBuilder(final String requestUrl, final IOneDri...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Photo.java
class Photo (line 40) | public class Photo extends BasePhoto {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Quota.java
class Quota (line 40) | public class Quota extends BaseQuota {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/RecentCollectionPage.java
class RecentCollectionPage (line 40) | public class RecentCollectionPage extends BaseRecentCollectionPage imple...
method RecentCollectionPage (line 48) | public RecentCollectionPage(final BaseRecentCollectionResponse respons...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/RecentRequest.java
class RecentRequest (line 40) | public class RecentRequest extends BaseRecentRequest implements IRecentR...
method RecentRequest (line 49) | public RecentRequest(final String requestUrl, final IOneDriveClient cl...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/RecentRequestBuilder.java
class RecentRequestBuilder (line 40) | public class RecentRequestBuilder extends BaseRecentRequestBuilder imple...
method RecentRequestBuilder (line 49) | public RecentRequestBuilder(final String requestUrl, final IOneDriveCl...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SearchCollectionPage.java
class SearchCollectionPage (line 40) | public class SearchCollectionPage extends BaseSearchCollectionPage imple...
method SearchCollectionPage (line 48) | public SearchCollectionPage(final BaseSearchCollectionResponse respons...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SearchRequest.java
class SearchRequest (line 40) | public class SearchRequest extends BaseSearchRequest implements ISearchR...
method SearchRequest (line 49) | public SearchRequest(final String requestUrl, final IOneDriveClient cl...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SearchRequestBuilder.java
class SearchRequestBuilder (line 40) | public class SearchRequestBuilder extends BaseSearchRequestBuilder imple...
method SearchRequestBuilder (line 49) | public SearchRequestBuilder(final String requestUrl, final IOneDriveCl...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SearchResult.java
class SearchResult (line 40) | public class SearchResult extends BaseSearchResult {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Share.java
class Share (line 40) | public class Share extends BaseShare {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ShareCollectionPage.java
class ShareCollectionPage (line 40) | public class ShareCollectionPage extends BaseShareCollectionPage impleme...
method ShareCollectionPage (line 48) | public ShareCollectionPage(final BaseShareCollectionResponse response,...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ShareCollectionRequest.java
class ShareCollectionRequest (line 40) | public class ShareCollectionRequest extends BaseShareCollectionRequest i...
method ShareCollectionRequest (line 49) | public ShareCollectionRequest(final String requestUrl, final IOneDrive...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ShareCollectionRequestBuilder.java
class ShareCollectionRequestBuilder (line 40) | public class ShareCollectionRequestBuilder extends BaseShareCollectionRe...
method ShareCollectionRequestBuilder (line 49) | public ShareCollectionRequestBuilder(final String requestUrl, final IO...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ShareRequest.java
class ShareRequest (line 40) | public class ShareRequest extends BaseShareRequest implements IShareRequ...
method ShareRequest (line 49) | public ShareRequest(final String requestUrl, final IOneDriveClient cli...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ShareRequestBuilder.java
class ShareRequestBuilder (line 40) | public class ShareRequestBuilder extends BaseShareRequestBuilder impleme...
method ShareRequestBuilder (line 49) | public ShareRequestBuilder(final String requestUrl, final IOneDriveCli...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Shared.java
class Shared (line 40) | public class Shared extends BaseShared {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SharingInvitation.java
class SharingInvitation (line 40) | public class SharingInvitation extends BaseSharingInvitation {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SharingLink.java
class SharingLink (line 40) | public class SharingLink extends BaseSharingLink {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SpecialFolder.java
class SpecialFolder (line 40) | public class SpecialFolder extends BaseSpecialFolder {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/StringCollectionPage.java
class StringCollectionPage (line 40) | public class StringCollectionPage extends BaseStringCollectionPage imple...
method StringCollectionPage (line 48) | public StringCollectionPage(final BaseStringCollectionResponse respons...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/StringCollectionRequest.java
class StringCollectionRequest (line 40) | public class StringCollectionRequest extends BaseStringCollectionRequest...
method StringCollectionRequest (line 49) | public StringCollectionRequest(final String requestUrl, final IOneDriv...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/StringCollectionRequestBuilder.java
class StringCollectionRequestBuilder (line 40) | public class StringCollectionRequestBuilder extends BaseStringCollection...
method StringCollectionRequestBuilder (line 49) | public StringCollectionRequestBuilder(final String requestUrl, final I...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Thumbnail.java
class Thumbnail (line 40) | public class Thumbnail extends BaseThumbnail {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailRequest.java
class ThumbnailRequest (line 40) | public class ThumbnailRequest extends BaseThumbnailRequest implements IT...
method ThumbnailRequest (line 49) | public ThumbnailRequest(final String requestUrl, final IOneDriveClient...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailRequestBuilder.java
class ThumbnailRequestBuilder (line 40) | public class ThumbnailRequestBuilder extends BaseThumbnailRequestBuilder...
method ThumbnailRequestBuilder (line 49) | public ThumbnailRequestBuilder(final String requestUrl, final IOneDriv...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailSet.java
class ThumbnailSet (line 40) | public class ThumbnailSet extends BaseThumbnailSet {
method getCustomThumbnail (line 47) | public Thumbnail getCustomThumbnail(final String name) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailSetCollectionPage.java
class ThumbnailSetCollectionPage (line 40) | public class ThumbnailSetCollectionPage extends BaseThumbnailSetCollecti...
method ThumbnailSetCollectionPage (line 48) | public ThumbnailSetCollectionPage(final BaseThumbnailSetCollectionResp...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailSetCollectionRequest.java
class ThumbnailSetCollectionRequest (line 40) | public class ThumbnailSetCollectionRequest extends BaseThumbnailSetColle...
method ThumbnailSetCollectionRequest (line 49) | public ThumbnailSetCollectionRequest(final String requestUrl, final IO...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailSetCollectionRequestBuilder.java
class ThumbnailSetCollectionRequestBuilder (line 40) | public class ThumbnailSetCollectionRequestBuilder extends BaseThumbnailS...
method ThumbnailSetCollectionRequestBuilder (line 49) | public ThumbnailSetCollectionRequestBuilder(final String requestUrl, f...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailSetRequest.java
class ThumbnailSetRequest (line 40) | public class ThumbnailSetRequest extends BaseThumbnailSetRequest impleme...
method ThumbnailSetRequest (line 49) | public ThumbnailSetRequest(final String requestUrl, final IOneDriveCli...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailSetRequestBuilder.java
class ThumbnailSetRequestBuilder (line 40) | public class ThumbnailSetRequestBuilder extends BaseThumbnailSetRequestB...
method ThumbnailSetRequestBuilder (line 49) | public ThumbnailSetRequestBuilder(final String requestUrl, final IOneD...
method getThumbnailSize (line 53) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailStreamRequest.java
class ThumbnailStreamRequest (line 40) | public class ThumbnailStreamRequest extends BaseThumbnailStreamRequest i...
method ThumbnailStreamRequest (line 49) | public ThumbnailStreamRequest(final String requestUrl, final IOneDrive...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailStreamRequestBuilder.java
class ThumbnailStreamRequestBuilder (line 40) | public class ThumbnailStreamRequestBuilder extends BaseThumbnailStreamRe...
method ThumbnailStreamRequestBuilder (line 49) | public ThumbnailStreamRequestBuilder(final String requestUrl, final IO...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/UploadSession.java
class UploadSession (line 35) | public class UploadSession<UploadType> extends BaseUploadSession {
method createUploadProvider (line 45) | public ChunkedUploadProvider createUploadProvider(IOneDriveClient clie...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Video.java
class Video (line 40) | public class Video extends BaseVideo {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseAsyncOperationStatus.java
class BaseAsyncOperationStatus (line 43) | public class BaseAsyncOperationStatus implements IJsonBackedObject {
method getRawObject (line 78) | public JsonObject getRawObject() {
method getSerializer (line 86) | protected ISerializer getSerializer() {
method setRawObject (line 96) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseAudio.java
class BaseAudio (line 43) | public class BaseAudio implements IJsonBackedObject {
method getRawObject (line 156) | public JsonObject getRawObject() {
method getSerializer (line 164) | protected ISerializer getSerializer() {
method setRawObject (line 174) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseChunkedUploadSessionDescriptor.java
class BaseChunkedUploadSessionDescriptor (line 43) | public class BaseChunkedUploadSessionDescriptor implements IJsonBackedOb...
method getRawObject (line 66) | public JsonObject getRawObject() {
method getSerializer (line 74) | protected ISerializer getSerializer() {
method setRawObject (line 84) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseCopyBody.java
class BaseCopyBody (line 43) | public class BaseCopyBody {
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseCopyRequest.java
class BaseCopyRequest (line 40) | public class BaseCopyRequest extends BaseRequest implements IBaseCopyReq...
method BaseCopyRequest (line 50) | public BaseCopyRequest(final String requestUrl, final IOneDriveClient ...
method create (line 61) | @Deprecated public void create(final ICallback<AsyncMonitor<Item>> cal...
method create (line 68) | @Deprecated public AsyncMonitor<Item> create() throws ClientException {
method post (line 72) | public void post(final ICallback<AsyncMonitor<Item>> callback) {
method post (line 85) | public AsyncMonitor<Item> post() throws ClientException {
method select (line 96) | public ICopyRequest select(final String value) {
method top (line 101) | public ICopyRequest top(final int value) {
method expand (line 106) | public ICopyRequest expand(final String value) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseCopyRequestBuilder.java
class BaseCopyRequestBuilder (line 40) | public class BaseCopyRequestBuilder extends BaseRequestBuilder {
method BaseCopyRequestBuilder (line 52) | public BaseCopyRequestBuilder(final String requestUrl, final IOneDrive...
method buildRequest (line 58) | public ICopyRequest buildRequest() {
method buildRequest (line 62) | public ICopyRequest buildRequest(final List<Option> options) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseCreateLinkBody.java
class BaseCreateLinkBody (line 43) | public class BaseCreateLinkBody {
method getRawObject (line 66) | public JsonObject getRawObject() {
method getSerializer (line 74) | protected ISerializer getSerializer() {
method setRawObject (line 84) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseCreateLinkRequest.java
class BaseCreateLinkRequest (line 40) | public class BaseCreateLinkRequest extends BaseRequest implements IBaseC...
method BaseCreateLinkRequest (line 50) | public BaseCreateLinkRequest(final String requestUrl, final IOneDriveC...
method create (line 59) | @Deprecated public void create(final ICallback<Permission> callback) {
method create (line 66) | @Deprecated public Permission create() throws ClientException {
method post (line 70) | public void post(final ICallback<Permission> callback) {
method post (line 74) | public Permission post() throws ClientException {
method select (line 78) | public ICreateLinkRequest select(final String value) {
method top (line 83) | public ICreateLinkRequest top(final int value) {
method expand (line 88) | public ICreateLinkRequest expand(final String value) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseCreateLinkRequestBuilder.java
class BaseCreateLinkRequestBuilder (line 40) | public class BaseCreateLinkRequestBuilder extends BaseRequestBuilder {
method BaseCreateLinkRequestBuilder (line 51) | public BaseCreateLinkRequestBuilder(final String requestUrl, final IOn...
method buildRequest (line 56) | public ICreateLinkRequest buildRequest() {
method buildRequest (line 60) | public ICreateLinkRequest buildRequest(final List<Option> options) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseCreateSessionBody.java
class BaseCreateSessionBody (line 43) | public class BaseCreateSessionBody {
method getRawObject (line 66) | public JsonObject getRawObject() {
method getSerializer (line 74) | protected ISerializer getSerializer() {
method setRawObject (line 84) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseCreateSessionRequest.java
class BaseCreateSessionRequest (line 40) | public class BaseCreateSessionRequest extends BaseRequest implements IBa...
method BaseCreateSessionRequest (line 50) | public BaseCreateSessionRequest(final String requestUrl, final IOneDri...
method create (line 59) | @Deprecated public void create(final ICallback<UploadSession> callback) {
method create (line 66) | @Deprecated public UploadSession create() throws ClientException {
method post (line 70) | public void post(final ICallback<UploadSession> callback) {
method post (line 74) | public UploadSession post() throws ClientException {
method select (line 78) | public ICreateSessionRequest select(final String value) {
method top (line 83) | public ICreateSessionRequest top(final int value) {
method expand (line 88) | public ICreateSessionRequest expand(final String value) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseCreateSessionRequestBuilder.java
class BaseCreateSessionRequestBuilder (line 40) | public class BaseCreateSessionRequestBuilder extends BaseRequestBuilder {
method BaseCreateSessionRequestBuilder (line 51) | public BaseCreateSessionRequestBuilder(final String requestUrl, final ...
method buildRequest (line 56) | public ICreateSessionRequest buildRequest() {
method buildRequest (line 60) | public ICreateSessionRequest buildRequest(final List<Option> options) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDeleted.java
class BaseDeleted (line 43) | public class BaseDeleted implements IJsonBackedObject {
method getRawObject (line 66) | public JsonObject getRawObject() {
method getSerializer (line 74) | protected ISerializer getSerializer() {
method setRawObject (line 84) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDeltaCollectionPage.java
class BaseDeltaCollectionPage (line 43) | public class BaseDeltaCollectionPage extends BaseCollectionPage<Item, ID...
method BaseDeltaCollectionPage (line 51) | public BaseDeltaCollectionPage(final BaseDeltaCollectionResponse respo...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDeltaCollectionResponse.java
class BaseDeltaCollectionResponse (line 44) | public class BaseDeltaCollectionResponse implements IJsonBackedObject {
method getRawObject (line 66) | public JsonObject getRawObject() {
method getSerializer (line 74) | protected ISerializer getSerializer() {
method setRawObject (line 84) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDeltaRequest.java
class BaseDeltaRequest (line 40) | public class BaseDeltaRequest extends BaseCollectionRequest<BaseDeltaCol...
method BaseDeltaRequest (line 49) | public BaseDeltaRequest(final String requestUrl, final IOneDriveClient...
method get (line 56) | public void get(final ICallback<IDeltaCollectionPage> callback) {
method get (line 70) | public IDeltaCollectionPage get() throws ClientException {
method select (line 75) | public IDeltaRequest select(final String value) {
method top (line 80) | public IDeltaRequest top(final int value) {
method expand (line 85) | public IDeltaRequest expand(final String value) {
method buildFromResponse (line 90) | public IDeltaCollectionPage buildFromResponse(final BaseDeltaCollectio...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDeltaRequestBuilder.java
class BaseDeltaRequestBuilder (line 40) | public class BaseDeltaRequestBuilder extends BaseRequestBuilder {
method BaseDeltaRequestBuilder (line 51) | public BaseDeltaRequestBuilder(final String requestUrl, final IOneDriv...
method buildRequest (line 56) | public IDeltaRequest buildRequest() {
method buildRequest (line 60) | public IDeltaRequest buildRequest(final List<Option> options) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDeltaResponse.java
class BaseDeltaResponse (line 43) | public class BaseDeltaResponse implements IJsonBackedObject {
method getRawObject (line 77) | public JsonObject getRawObject() {
method getSerializer (line 85) | protected ISerializer getSerializer() {
method setRawObject (line 95) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDrive.java
class BaseDrive (line 43) | public class BaseDrive implements IJsonBackedObject {
method getRawObject (line 99) | public JsonObject getRawObject() {
method getSerializer (line 107) | protected ISerializer getSerializer() {
method setRawObject (line 117) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDriveCollectionPage.java
class BaseDriveCollectionPage (line 44) | public class BaseDriveCollectionPage extends BaseCollectionPage<Drive, I...
method BaseDriveCollectionPage (line 52) | public BaseDriveCollectionPage(final BaseDriveCollectionResponse respo...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDriveCollectionRequest.java
class BaseDriveCollectionRequest (line 41) | public class BaseDriveCollectionRequest extends BaseCollectionRequest<Ba...
method BaseDriveCollectionRequest (line 50) | public BaseDriveCollectionRequest(final String requestUrl, IOneDriveCl...
method get (line 54) | public void get(final ICallback<IDriveCollectionPage> callback) {
method get (line 68) | public IDriveCollectionPage get() throws ClientException {
method expand (line 73) | public IDriveCollectionRequest expand(final String value) {
method select (line 78) | public IDriveCollectionRequest select(final String value) {
method top (line 83) | public IDriveCollectionRequest top(final int value) {
method buildFromResponse (line 88) | public IDriveCollectionPage buildFromResponse(final BaseDriveCollectio...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDriveCollectionRequestBuilder.java
class BaseDriveCollectionRequestBuilder (line 40) | public class BaseDriveCollectionRequestBuilder extends BaseRequestBuilde...
method BaseDriveCollectionRequestBuilder (line 49) | public BaseDriveCollectionRequestBuilder(final String requestUrl, fina...
method buildRequest (line 53) | public IDriveCollectionRequest buildRequest() {
method buildRequest (line 57) | public IDriveCollectionRequest buildRequest(final List<Option> options) {
method byId (line 61) | public IDriveRequestBuilder byId(final String id) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDriveCollectionResponse.java
class BaseDriveCollectionResponse (line 44) | public class BaseDriveCollectionResponse implements IJsonBackedObject {
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDriveRequest.java
class BaseDriveRequest (line 40) | public class BaseDriveRequest extends BaseRequest implements IBaseDriveR...
method BaseDriveRequest (line 49) | public BaseDriveRequest(String requestUrl, IOneDriveClient client, Lis...
method get (line 53) | public void get(final ICallback<Drive> callback) {
method get (line 57) | public Drive get() throws ClientException {
method update (line 64) | @Deprecated public void update(final Drive sourceDrive, final ICallbac...
method update (line 71) | @Deprecated public Drive update(final Drive sourceDrive) throws Client...
method patch (line 75) | public void patch(final Drive sourceDrive, final ICallback<Drive> call...
method patch (line 79) | public Drive patch(final Drive sourceDrive) throws ClientException {
method delete (line 83) | public void delete(final ICallback<Void> callback) {
method delete (line 87) | public void delete() throws ClientException {
method create (line 94) | @Deprecated public void create(final Drive newDrive, final ICallback<D...
method create (line 101) | @Deprecated public Drive create(final Drive newDrive) throws ClientExc...
method post (line 105) | public void post(final Drive newDrive, final ICallback<Drive> callback) {
method post (line 109) | public Drive post(final Drive newDrive) throws ClientException {
method select (line 113) | public IDriveRequest select(final String value) {
method top (line 118) | public IDriveRequest top(final int value) {
method expand (line 123) | public IDriveRequest expand(final String value) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseDriveRequestBuilder.java
class BaseDriveRequestBuilder (line 40) | public class BaseDriveRequestBuilder extends BaseRequestBuilder implemen...
method BaseDriveRequestBuilder (line 49) | public BaseDriveRequestBuilder(final String requestUrl, final IOneDriv...
method buildRequest (line 56) | public IDriveRequest buildRequest() {
method buildRequest (line 63) | public IDriveRequest buildRequest(final List<Option> options) {
method getItems (line 67) | public IItemRequestBuilder getItems(final String id) {
method getShared (line 71) | public IItemRequestBuilder getShared(final String id) {
method getSpecial (line 75) | public IItemRequestBuilder getSpecial(final String id) {
method getRecent (line 79) | public IRecentRequestBuilder getRecent() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseFile.java
class BaseFile (line 43) | public class BaseFile implements IJsonBackedObject {
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseFileSystemInfo.java
class BaseFileSystemInfo (line 43) | public class BaseFileSystemInfo implements IJsonBackedObject {
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseFolder.java
class BaseFolder (line 43) | public class BaseFolder implements IJsonBackedObject {
method getRawObject (line 66) | public JsonObject getRawObject() {
method getSerializer (line 74) | protected ISerializer getSerializer() {
method setRawObject (line 84) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseHashes.java
class BaseHashes (line 43) | public class BaseHashes implements IJsonBackedObject {
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseIdentity.java
class BaseIdentity (line 43) | public class BaseIdentity implements IJsonBackedObject {
method getRawObject (line 78) | public JsonObject getRawObject() {
method getSerializer (line 86) | protected ISerializer getSerializer() {
method setRawObject (line 96) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseIdentitySet.java
class BaseIdentitySet (line 43) | public class BaseIdentitySet implements IJsonBackedObject {
method getRawObject (line 78) | public JsonObject getRawObject() {
method getSerializer (line 86) | protected ISerializer getSerializer() {
method setRawObject (line 96) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseImage.java
class BaseImage (line 43) | public class BaseImage implements IJsonBackedObject {
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseItem.java
class BaseItem (line 43) | public class BaseItem implements IJsonBackedObject {
method getRawObject (line 236) | public JsonObject getRawObject() {
method getSerializer (line 244) | protected ISerializer getSerializer() {
method setRawObject (line 254) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseItemCollectionPage.java
class BaseItemCollectionPage (line 44) | public class BaseItemCollectionPage extends BaseCollectionPage<Item, IIt...
method BaseItemCollectionPage (line 52) | public BaseItemCollectionPage(final BaseItemCollectionResponse respons...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseItemCollectionRequest.java
class BaseItemCollectionRequest (line 41) | public class BaseItemCollectionRequest extends BaseCollectionRequest<Bas...
method BaseItemCollectionRequest (line 50) | public BaseItemCollectionRequest(final String requestUrl, IOneDriveCli...
method get (line 54) | public void get(final ICallback<IItemCollectionPage> callback) {
method get (line 68) | public IItemCollectionPage get() throws ClientException {
method create (line 76) | @Deprecated public void create(final Item newItem, final ICallback<Ite...
method create (line 83) | @Deprecated public Item create(final Item newItem) throws ClientExcept...
method post (line 87) | public void post(final Item newItem, final ICallback<Item> callback) {
method post (line 94) | public Item post(final Item newItem) throws ClientException {
method expand (line 100) | public IItemCollectionRequest expand(final String value) {
method select (line 105) | public IItemCollectionRequest select(final String value) {
method top (line 110) | public IItemCollectionRequest top(final int value) {
method buildFromResponse (line 115) | public IItemCollectionPage buildFromResponse(final BaseItemCollectionR...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseItemCollectionRequestBuilder.java
class BaseItemCollectionRequestBuilder (line 40) | public class BaseItemCollectionRequestBuilder extends BaseRequestBuilder...
method BaseItemCollectionRequestBuilder (line 49) | public BaseItemCollectionRequestBuilder(final String requestUrl, final...
method buildRequest (line 53) | public IItemCollectionRequest buildRequest() {
method buildRequest (line 57) | public IItemCollectionRequest buildRequest(final List<Option> options) {
method byId (line 61) | public IItemRequestBuilder byId(final String id) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseItemCollectionResponse.java
class BaseItemCollectionResponse (line 44) | public class BaseItemCollectionResponse implements IJsonBackedObject {
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseItemReference.java
class BaseItemReference (line 43) | public class BaseItemReference implements IJsonBackedObject {
method getRawObject (line 78) | public JsonObject getRawObject() {
method getSerializer (line 86) | protected ISerializer getSerializer() {
method setRawObject (line 96) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseItemRequest.java
class BaseItemRequest (line 40) | public class BaseItemRequest extends BaseRequest implements IBaseItemReq...
method BaseItemRequest (line 49) | public BaseItemRequest(String requestUrl, IOneDriveClient client, List...
method get (line 53) | public void get(final ICallback<Item> callback) {
method get (line 57) | public Item get() throws ClientException {
method update (line 64) | @Deprecated public void update(final Item sourceItem, final ICallback<...
method update (line 71) | @Deprecated public Item update(final Item sourceItem) throws ClientExc...
method patch (line 75) | public void patch(final Item sourceItem, final ICallback<Item> callbac...
method patch (line 79) | public Item patch(final Item sourceItem) throws ClientException {
method delete (line 83) | public void delete(final ICallback<Void> callback) {
method delete (line 87) | public void delete() throws ClientException {
method create (line 94) | @Deprecated public void create(final Item newItem, final ICallback<Ite...
method create (line 101) | @Deprecated public Item create(final Item newItem) throws ClientExcept...
method post (line 105) | public void post(final Item newItem, final ICallback<Item> callback) {
method post (line 109) | public Item post(final Item newItem) throws ClientException {
method select (line 113) | public IItemRequest select(final String value) {
method top (line 118) | public IItemRequest top(final int value) {
method expand (line 123) | public IItemRequest expand(final String value) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseItemRequestBuilder.java
class BaseItemRequestBuilder (line 40) | public class BaseItemRequestBuilder extends BaseRequestBuilder implement...
method BaseItemRequestBuilder (line 49) | public BaseItemRequestBuilder(final String requestUrl, final IOneDrive...
method buildRequest (line 56) | public IItemRequest buildRequest() {
method buildRequest (line 63) | public IItemRequest buildRequest(final List<Option> options) {
method getPermissions (line 67) | public IPermissionCollectionRequestBuilder getPermissions() {
method getPermissions (line 71) | public IPermissionRequestBuilder getPermissions(final String id) {
method getChildren (line 75) | public IItemCollectionRequestBuilder getChildren() {
method getChildren (line 79) | public IItemRequestBuilder getChildren(final String id) {
method getThumbnails (line 83) | public IThumbnailSetCollectionRequestBuilder getThumbnails() {
method getThumbnails (line 87) | public IThumbnailSetRequestBuilder getThumbnails(final String id) {
method getContent (line 91) | public IItemStreamRequestBuilder getContent() {
method getCreateSession (line 95) | public ICreateSessionRequestBuilder getCreateSession(final ChunkedUplo...
method getCopy (line 99) | public ICopyRequestBuilder getCopy(final String name, final ItemRefere...
method getCreateLink (line 103) | public ICreateLinkRequestBuilder getCreateLink(final String type) {
method getDelta (line 107) | public IDeltaRequestBuilder getDelta(final String token) {
method getSearch (line 111) | public ISearchRequestBuilder getSearch(final String q) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseItemStreamRequest.java
class BaseItemStreamRequest (line 42) | public class BaseItemStreamRequest extends BaseStreamRequest<Item> imple...
method BaseItemStreamRequest (line 51) | public BaseItemStreamRequest(String requestUrl, IOneDriveClient client...
method get (line 55) | public void get(final ICallback<InputStream> callback) {
method get (line 59) | public InputStream get() throws ClientException {
method put (line 63) | public void put(final byte[] fileContents, final ICallback<Item> callb...
method put (line 67) | public Item put(final byte[] fileContents) throws ClientException {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseItemStreamRequestBuilder.java
class BaseItemStreamRequestBuilder (line 40) | public class BaseItemStreamRequestBuilder extends BaseRequestBuilder imp...
method BaseItemStreamRequestBuilder (line 49) | public BaseItemStreamRequestBuilder(final String requestUrl, final IOn...
method buildRequest (line 56) | public IItemStreamRequest buildRequest() {
method buildRequest (line 63) | public IItemStreamRequest buildRequest(final List<Option> options) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseLocation.java
class BaseLocation (line 43) | public class BaseLocation implements IJsonBackedObject {
method getRawObject (line 78) | public JsonObject getRawObject() {
method getSerializer (line 86) | protected ISerializer getSerializer() {
method setRawObject (line 96) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseOneDriveClient.java
class BaseOneDriveClient (line 40) | public class BaseOneDriveClient extends BaseClient implements IBaseOneDr...
method getDrives (line 47) | public IDriveCollectionRequestBuilder getDrives() {
method getDrive (line 57) | public IDriveRequestBuilder getDrive(final String id) {
method getShares (line 66) | public IShareCollectionRequestBuilder getShares() {
method getShare (line 76) | public IShareRequestBuilder getShare(final String id) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseOpenWithApp.java
class BaseOpenWithApp (line 43) | public class BaseOpenWithApp implements IJsonBackedObject {
method getRawObject (line 90) | public JsonObject getRawObject() {
method getSerializer (line 98) | protected ISerializer getSerializer() {
method setRawObject (line 108) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseOpenWithSet.java
class BaseOpenWithSet (line 43) | public class BaseOpenWithSet implements IJsonBackedObject {
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BasePermission.java
class BasePermission (line 43) | public class BasePermission implements IJsonBackedObject {
method getRawObject (line 102) | public JsonObject getRawObject() {
method getSerializer (line 110) | protected ISerializer getSerializer() {
method setRawObject (line 120) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BasePermissionCollectionPage.java
class BasePermissionCollectionPage (line 44) | public class BasePermissionCollectionPage extends BaseCollectionPage<Per...
method BasePermissionCollectionPage (line 52) | public BasePermissionCollectionPage(final BasePermissionCollectionResp...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BasePermissionCollectionRequest.java
class BasePermissionCollectionRequest (line 41) | public class BasePermissionCollectionRequest extends BaseCollectionReque...
method BasePermissionCollectionRequest (line 50) | public BasePermissionCollectionRequest(final String requestUrl, IOneDr...
method get (line 54) | public void get(final ICallback<IPermissionCollectionPage> callback) {
method get (line 68) | public IPermissionCollectionPage get() throws ClientException {
method expand (line 73) | public IPermissionCollectionRequest expand(final String value) {
method select (line 78) | public IPermissionCollectionRequest select(final String value) {
method top (line 83) | public IPermissionCollectionRequest top(final int value) {
method buildFromResponse (line 88) | public IPermissionCollectionPage buildFromResponse(final BasePermissio...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BasePermissionCollectionRequestBuilder.java
class BasePermissionCollectionRequestBuilder (line 40) | public class BasePermissionCollectionRequestBuilder extends BaseRequestB...
method BasePermissionCollectionRequestBuilder (line 49) | public BasePermissionCollectionRequestBuilder(final String requestUrl,...
method buildRequest (line 53) | public IPermissionCollectionRequest buildRequest() {
method buildRequest (line 57) | public IPermissionCollectionRequest buildRequest(final List<Option> op...
method byId (line 61) | public IPermissionRequestBuilder byId(final String id) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BasePermissionCollectionResponse.java
class BasePermissionCollectionResponse (line 44) | public class BasePermissionCollectionResponse implements IJsonBackedObje...
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BasePermissionRequest.java
class BasePermissionRequest (line 40) | public class BasePermissionRequest extends BaseRequest implements IBaseP...
method BasePermissionRequest (line 49) | public BasePermissionRequest(String requestUrl, IOneDriveClient client...
method get (line 53) | public void get(final ICallback<Permission> callback) {
method get (line 57) | public Permission get() throws ClientException {
method update (line 64) | @Deprecated public void update(final Permission sourcePermission, fina...
method update (line 71) | @Deprecated public Permission update(final Permission sourcePermission...
method patch (line 75) | public void patch(final Permission sourcePermission, final ICallback<P...
method patch (line 79) | public Permission patch(final Permission sourcePermission) throws Clie...
method delete (line 83) | public void delete(final ICallback<Void> callback) {
method delete (line 87) | public void delete() throws ClientException {
method create (line 94) | @Deprecated public void create(final Permission newPermission, final I...
method create (line 101) | @Deprecated public Permission create(final Permission newPermission) t...
method post (line 105) | public void post(final Permission newPermission, final ICallback<Permi...
method post (line 109) | public Permission post(final Permission newPermission) throws ClientEx...
method select (line 113) | public IPermissionRequest select(final String value) {
method top (line 118) | public IPermissionRequest top(final int value) {
method expand (line 123) | public IPermissionRequest expand(final String value) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BasePermissionRequestBuilder.java
class BasePermissionRequestBuilder (line 40) | public class BasePermissionRequestBuilder extends BaseRequestBuilder imp...
method BasePermissionRequestBuilder (line 49) | public BasePermissionRequestBuilder(final String requestUrl, final IOn...
method buildRequest (line 56) | public IPermissionRequest buildRequest() {
method buildRequest (line 63) | public IPermissionRequest buildRequest(final List<Option> options) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BasePhoto.java
class BasePhoto (line 43) | public class BasePhoto implements IJsonBackedObject {
method getRawObject (line 108) | public JsonObject getRawObject() {
method getSerializer (line 116) | protected ISerializer getSerializer() {
method setRawObject (line 126) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseQuota.java
class BaseQuota (line 43) | public class BaseQuota implements IJsonBackedObject {
method getRawObject (line 90) | public JsonObject getRawObject() {
method getSerializer (line 98) | protected ISerializer getSerializer() {
method setRawObject (line 108) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseRecentCollectionPage.java
class BaseRecentCollectionPage (line 43) | public class BaseRecentCollectionPage extends BaseCollectionPage<Item, I...
method BaseRecentCollectionPage (line 51) | public BaseRecentCollectionPage(final BaseRecentCollectionResponse res...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseRecentCollectionResponse.java
class BaseRecentCollectionResponse (line 44) | public class BaseRecentCollectionResponse implements IJsonBackedObject {
method getRawObject (line 66) | public JsonObject getRawObject() {
method getSerializer (line 74) | protected ISerializer getSerializer() {
method setRawObject (line 84) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseRecentRequest.java
class BaseRecentRequest (line 40) | public class BaseRecentRequest extends BaseCollectionRequest<BaseRecentC...
method BaseRecentRequest (line 49) | public BaseRecentRequest(final String requestUrl, final IOneDriveClien...
method get (line 53) | public void get(final ICallback<IRecentCollectionPage> callback) {
method get (line 67) | public IRecentCollectionPage get() throws ClientException {
method select (line 72) | public IRecentRequest select(final String value) {
method top (line 77) | public IRecentRequest top(final int value) {
method expand (line 82) | public IRecentRequest expand(final String value) {
method buildFromResponse (line 87) | public IRecentCollectionPage buildFromResponse(final BaseRecentCollect...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseRecentRequestBuilder.java
class BaseRecentRequestBuilder (line 40) | public class BaseRecentRequestBuilder extends BaseRequestBuilder {
method BaseRecentRequestBuilder (line 50) | public BaseRecentRequestBuilder(final String requestUrl, final IOneDri...
method buildRequest (line 54) | public IRecentRequest buildRequest() {
method buildRequest (line 58) | public IRecentRequest buildRequest(final List<Option> options) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseSearchCollectionPage.java
class BaseSearchCollectionPage (line 43) | public class BaseSearchCollectionPage extends BaseCollectionPage<Item, I...
method BaseSearchCollectionPage (line 51) | public BaseSearchCollectionPage(final BaseSearchCollectionResponse res...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseSearchCollectionResponse.java
class BaseSearchCollectionResponse (line 44) | public class BaseSearchCollectionResponse implements IJsonBackedObject {
method getRawObject (line 66) | public JsonObject getRawObject() {
method getSerializer (line 74) | protected ISerializer getSerializer() {
method setRawObject (line 84) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseSearchRequest.java
class BaseSearchRequest (line 40) | public class BaseSearchRequest extends BaseCollectionRequest<BaseSearchC...
method BaseSearchRequest (line 49) | public BaseSearchRequest(final String requestUrl, final IOneDriveClien...
method get (line 56) | public void get(final ICallback<ISearchCollectionPage> callback) {
method get (line 70) | public ISearchCollectionPage get() throws ClientException {
method select (line 75) | public ISearchRequest select(final String value) {
method top (line 80) | public ISearchRequest top(final int value) {
method expand (line 85) | public ISearchRequest expand(final String value) {
method buildFromResponse (line 90) | public ISearchCollectionPage buildFromResponse(final BaseSearchCollect...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseSearchRequestBuilder.java
class BaseSearchRequestBuilder (line 40) | public class BaseSearchRequestBuilder extends BaseRequestBuilder {
method BaseSearchRequestBuilder (line 51) | public BaseSearchRequestBuilder(final String requestUrl, final IOneDri...
method buildRequest (line 56) | public ISearchRequest buildRequest() {
method buildRequest (line 60) | public ISearchRequest buildRequest(final List<Option> options) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseSearchResult.java
class BaseSearchResult (line 43) | public class BaseSearchResult implements IJsonBackedObject {
method getRawObject (line 66) | public JsonObject getRawObject() {
method getSerializer (line 74) | protected ISerializer getSerializer() {
method setRawObject (line 84) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseShare.java
class BaseShare (line 43) | public class BaseShare implements IJsonBackedObject {
method getRawObject (line 83) | public JsonObject getRawObject() {
method getSerializer (line 91) | protected ISerializer getSerializer() {
method setRawObject (line 101) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseShareCollectionPage.java
class BaseShareCollectionPage (line 44) | public class BaseShareCollectionPage extends BaseCollectionPage<Share, I...
method BaseShareCollectionPage (line 52) | public BaseShareCollectionPage(final BaseShareCollectionResponse respo...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseShareCollectionRequest.java
class BaseShareCollectionRequest (line 41) | public class BaseShareCollectionRequest extends BaseCollectionRequest<Ba...
method BaseShareCollectionRequest (line 50) | public BaseShareCollectionRequest(final String requestUrl, IOneDriveCl...
method expand (line 54) | public IShareCollectionRequest expand(final String value) {
method select (line 59) | public IShareCollectionRequest select(final String value) {
method top (line 64) | public IShareCollectionRequest top(final int value) {
method buildFromResponse (line 69) | public IShareCollectionPage buildFromResponse(final BaseShareCollectio...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseShareCollectionRequestBuilder.java
class BaseShareCollectionRequestBuilder (line 40) | public class BaseShareCollectionRequestBuilder extends BaseRequestBuilde...
method BaseShareCollectionRequestBuilder (line 49) | public BaseShareCollectionRequestBuilder(final String requestUrl, fina...
method buildRequest (line 53) | public IShareCollectionRequest buildRequest() {
method buildRequest (line 57) | public IShareCollectionRequest buildRequest(final List<Option> options) {
method byId (line 61) | public IShareRequestBuilder byId(final String id) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseShareCollectionResponse.java
class BaseShareCollectionResponse (line 44) | public class BaseShareCollectionResponse implements IJsonBackedObject {
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseShareRequest.java
class BaseShareRequest (line 40) | public class BaseShareRequest extends BaseRequest implements IBaseShareR...
method BaseShareRequest (line 49) | public BaseShareRequest(String requestUrl, IOneDriveClient client, Lis...
method get (line 53) | public void get(final ICallback<Share> callback) {
method get (line 57) | public Share get() throws ClientException {
method update (line 64) | @Deprecated public void update(final Share sourceShare, final ICallbac...
method update (line 71) | @Deprecated public Share update(final Share sourceShare) throws Client...
method patch (line 75) | public void patch(final Share sourceShare, final ICallback<Share> call...
method patch (line 79) | public Share patch(final Share sourceShare) throws ClientException {
method delete (line 83) | public void delete(final ICallback<Void> callback) {
method delete (line 87) | public void delete() throws ClientException {
method create (line 94) | @Deprecated public void create(final Share newShare, final ICallback<S...
method create (line 101) | @Deprecated public Share create(final Share newShare) throws ClientExc...
method post (line 105) | public void post(final Share newShare, final ICallback<Share> callback) {
method post (line 109) | public Share post(final Share newShare) throws ClientException {
method select (line 113) | public IShareRequest select(final String value) {
method top (line 118) | public IShareRequest top(final int value) {
method expand (line 123) | public IShareRequest expand(final String value) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseShareRequestBuilder.java
class BaseShareRequestBuilder (line 40) | public class BaseShareRequestBuilder extends BaseRequestBuilder implemen...
method BaseShareRequestBuilder (line 49) | public BaseShareRequestBuilder(final String requestUrl, final IOneDriv...
method buildRequest (line 56) | public IShareRequest buildRequest() {
method buildRequest (line 63) | public IShareRequest buildRequest(final List<Option> options) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseShared.java
class BaseShared (line 43) | public class BaseShared implements IJsonBackedObject {
method getRawObject (line 78) | public JsonObject getRawObject() {
method getSerializer (line 86) | protected ISerializer getSerializer() {
method setRawObject (line 96) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseSharingInvitation.java
class BaseSharingInvitation (line 43) | public class BaseSharingInvitation implements IJsonBackedObject {
method getRawObject (line 90) | public JsonObject getRawObject() {
method getSerializer (line 98) | protected ISerializer getSerializer() {
method setRawObject (line 108) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseSharingLink.java
class BaseSharingLink (line 43) | public class BaseSharingLink implements IJsonBackedObject {
method getRawObject (line 90) | public JsonObject getRawObject() {
method getSerializer (line 98) | protected ISerializer getSerializer() {
method setRawObject (line 108) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseSpecialFolder.java
class BaseSpecialFolder (line 43) | public class BaseSpecialFolder implements IJsonBackedObject {
method getRawObject (line 66) | public JsonObject getRawObject() {
method getSerializer (line 74) | protected ISerializer getSerializer() {
method setRawObject (line 84) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseStringCollectionPage.java
class BaseStringCollectionPage (line 44) | public class BaseStringCollectionPage extends BaseCollectionPage<String,...
method BaseStringCollectionPage (line 52) | public BaseStringCollectionPage(final BaseStringCollectionResponse res...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseStringCollectionRequest.java
class BaseStringCollectionRequest (line 41) | public class BaseStringCollectionRequest extends BaseCollectionRequest<B...
method BaseStringCollectionRequest (line 50) | public BaseStringCollectionRequest(final String requestUrl, IOneDriveC...
method expand (line 54) | public IStringCollectionRequest expand(final String value) {
method select (line 59) | public IStringCollectionRequest select(final String value) {
method top (line 64) | public IStringCollectionRequest top(final int value) {
method buildFromResponse (line 69) | public IStringCollectionPage buildFromResponse(final BaseStringCollect...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseStringCollectionRequestBuilder.java
class BaseStringCollectionRequestBuilder (line 40) | public class BaseStringCollectionRequestBuilder extends BaseRequestBuild...
method BaseStringCollectionRequestBuilder (line 49) | public BaseStringCollectionRequestBuilder(final String requestUrl, fin...
method buildRequest (line 53) | public IStringCollectionRequest buildRequest() {
method buildRequest (line 57) | public IStringCollectionRequest buildRequest(final List<Option> option...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseStringCollectionResponse.java
class BaseStringCollectionResponse (line 44) | public class BaseStringCollectionResponse implements IJsonBackedObject {
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnail.java
class BaseThumbnail (line 43) | public class BaseThumbnail implements IJsonBackedObject {
method getRawObject (line 78) | public JsonObject getRawObject() {
method getSerializer (line 86) | protected ISerializer getSerializer() {
method setRawObject (line 96) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnailRequest.java
class BaseThumbnailRequest (line 40) | public class BaseThumbnailRequest extends BaseRequest implements IBaseTh...
method BaseThumbnailRequest (line 49) | public BaseThumbnailRequest(String requestUrl, IOneDriveClient client,...
method get (line 53) | public void get(final ICallback<Thumbnail> callback) {
method get (line 57) | public Thumbnail get() throws ClientException {
method update (line 64) | @Deprecated public void update(final Thumbnail sourceThumbnail, final ...
method update (line 71) | @Deprecated public Thumbnail update(final Thumbnail sourceThumbnail) t...
method patch (line 75) | public void patch(final Thumbnail sourceThumbnail, final ICallback<Thu...
method patch (line 79) | public Thumbnail patch(final Thumbnail sourceThumbnail) throws ClientE...
method delete (line 83) | public void delete(final ICallback<Void> callback) {
method delete (line 87) | public void delete() throws ClientException {
method create (line 94) | @Deprecated public void create(final Thumbnail newThumbnail, final ICa...
method create (line 101) | @Deprecated public Thumbnail create(final Thumbnail newThumbnail) thro...
method post (line 105) | public void post(final Thumbnail newThumbnail, final ICallback<Thumbna...
method post (line 109) | public Thumbnail post(final Thumbnail newThumbnail) throws ClientExcep...
method select (line 113) | public IThumbnailRequest select(final String value) {
method top (line 118) | public IThumbnailRequest top(final int value) {
method expand (line 123) | public IThumbnailRequest expand(final String value) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnailRequestBuilder.java
class BaseThumbnailRequestBuilder (line 40) | public class BaseThumbnailRequestBuilder extends BaseRequestBuilder impl...
method BaseThumbnailRequestBuilder (line 49) | public BaseThumbnailRequestBuilder(final String requestUrl, final IOne...
method buildRequest (line 56) | public IThumbnailRequest buildRequest() {
method buildRequest (line 63) | public IThumbnailRequest buildRequest(final List<Option> options) {
method getContent (line 67) | public IThumbnailStreamRequestBuilder getContent() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnailSet.java
class BaseThumbnailSet (line 43) | public class BaseThumbnailSet implements IJsonBackedObject {
method getRawObject (line 90) | public JsonObject getRawObject() {
method getSerializer (line 98) | protected ISerializer getSerializer() {
method setRawObject (line 108) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnailSetCollectionPage.java
class BaseThumbnailSetCollectionPage (line 44) | public class BaseThumbnailSetCollectionPage extends BaseCollectionPage<T...
method BaseThumbnailSetCollectionPage (line 52) | public BaseThumbnailSetCollectionPage(final BaseThumbnailSetCollection...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnailSetCollectionRequest.java
class BaseThumbnailSetCollectionRequest (line 41) | public class BaseThumbnailSetCollectionRequest extends BaseCollectionReq...
method BaseThumbnailSetCollectionRequest (line 50) | public BaseThumbnailSetCollectionRequest(final String requestUrl, IOne...
method get (line 54) | public void get(final ICallback<IThumbnailSetCollectionPage> callback) {
method get (line 68) | public IThumbnailSetCollectionPage get() throws ClientException {
method expand (line 73) | public IThumbnailSetCollectionRequest expand(final String value) {
method select (line 78) | public IThumbnailSetCollectionRequest select(final String value) {
method top (line 83) | public IThumbnailSetCollectionRequest top(final int value) {
method buildFromResponse (line 88) | public IThumbnailSetCollectionPage buildFromResponse(final BaseThumbna...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnailSetCollectionRequestBuilder.java
class BaseThumbnailSetCollectionRequestBuilder (line 40) | public class BaseThumbnailSetCollectionRequestBuilder extends BaseReques...
method BaseThumbnailSetCollectionRequestBuilder (line 49) | public BaseThumbnailSetCollectionRequestBuilder(final String requestUr...
method buildRequest (line 53) | public IThumbnailSetCollectionRequest buildRequest() {
method buildRequest (line 57) | public IThumbnailSetCollectionRequest buildRequest(final List<Option> ...
method byId (line 61) | public IThumbnailSetRequestBuilder byId(final String id) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnailSetCollectionResponse.java
class BaseThumbnailSetCollectionResponse (line 44) | public class BaseThumbnailSetCollectionResponse implements IJsonBackedOb...
method getRawObject (line 72) | public JsonObject getRawObject() {
method getSerializer (line 80) | protected ISerializer getSerializer() {
method setRawObject (line 90) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnailSetRequest.java
class BaseThumbnailSetRequest (line 40) | public class BaseThumbnailSetRequest extends BaseRequest implements IBas...
method BaseThumbnailSetRequest (line 49) | public BaseThumbnailSetRequest(String requestUrl, IOneDriveClient clie...
method get (line 53) | public void get(final ICallback<ThumbnailSet> callback) {
method get (line 57) | public ThumbnailSet get() throws ClientException {
method update (line 64) | @Deprecated public void update(final ThumbnailSet sourceThumbnailSet, ...
method update (line 71) | @Deprecated public ThumbnailSet update(final ThumbnailSet sourceThumbn...
method patch (line 75) | public void patch(final ThumbnailSet sourceThumbnailSet, final ICallba...
method patch (line 79) | public ThumbnailSet patch(final ThumbnailSet sourceThumbnailSet) throw...
method delete (line 83) | public void delete(final ICallback<Void> callback) {
method delete (line 87) | public void delete() throws ClientException {
method create (line 94) | @Deprecated public void create(final ThumbnailSet newThumbnailSet, fin...
method create (line 101) | @Deprecated public ThumbnailSet create(final ThumbnailSet newThumbnail...
method post (line 105) | public void post(final ThumbnailSet newThumbnailSet, final ICallback<T...
method post (line 109) | public ThumbnailSet post(final ThumbnailSet newThumbnailSet) throws Cl...
method select (line 113) | public IThumbnailSetRequest select(final String value) {
method top (line 118) | public IThumbnailSetRequest top(final int value) {
method expand (line 123) | public IThumbnailSetRequest expand(final String value) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnailSetRequestBuilder.java
class BaseThumbnailSetRequestBuilder (line 40) | public class BaseThumbnailSetRequestBuilder extends BaseRequestBuilder i...
method BaseThumbnailSetRequestBuilder (line 49) | public BaseThumbnailSetRequestBuilder(final String requestUrl, final I...
method buildRequest (line 56) | public IThumbnailSetRequest buildRequest() {
method buildRequest (line 63) | public IThumbnailSetRequest buildRequest(final List<Option> options) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnailStreamRequest.java
class BaseThumbnailStreamRequest (line 42) | public class BaseThumbnailStreamRequest extends BaseStreamRequest<Thumbn...
method BaseThumbnailStreamRequest (line 51) | public BaseThumbnailStreamRequest(String requestUrl, IOneDriveClient c...
method get (line 55) | public void get(final ICallback<InputStream> callback) {
method get (line 59) | public InputStream get() throws ClientException {
method put (line 63) | public void put(final byte[] fileContents, final ICallback<Thumbnail> ...
method put (line 67) | public Thumbnail put(final byte[] fileContents) throws ClientException {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseThumbnailStreamRequestBuilder.java
class BaseThumbnailStreamRequestBuilder (line 40) | public class BaseThumbnailStreamRequestBuilder extends BaseRequestBuilde...
method BaseThumbnailStreamRequestBuilder (line 49) | public BaseThumbnailStreamRequestBuilder(final String requestUrl, fina...
method buildRequest (line 56) | public IThumbnailStreamRequest buildRequest() {
method buildRequest (line 63) | public IThumbnailStreamRequest buildRequest(final List<Option> options) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseUploadSession.java
class BaseUploadSession (line 43) | public class BaseUploadSession implements IJsonBackedObject {
method getRawObject (line 78) | public JsonObject getRawObject() {
method getSerializer (line 86) | protected ISerializer getSerializer() {
method setRawObject (line 96) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/BaseVideo.java
class BaseVideo (line 43) | public class BaseVideo implements IJsonBackedObject {
method getRawObject (line 84) | public JsonObject getRawObject() {
method getSerializer (line 92) | protected ISerializer getSerializer() {
method setRawObject (line 102) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseCopyRequest.java
type IBaseCopyRequest (line 43) | public interface IBaseCopyRequest {
method create (line 48) | @Deprecated void create(final ICallback<AsyncMonitor<Item>> callback);
method create (line 53) | @Deprecated AsyncMonitor<Item> create() throws ClientException;
method post (line 55) | void post(final ICallback<AsyncMonitor<Item>> callback);
method post (line 57) | AsyncMonitor<Item> post() throws ClientException;
method select (line 59) | ICopyRequest select(final String value) ;
method top (line 61) | ICopyRequest top(final int value);
method expand (line 63) | ICopyRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseCopyRequestBuilder.java
type IBaseCopyRequestBuilder (line 40) | public interface IBaseCopyRequestBuilder extends IRequestBuilder {
method buildRequest (line 42) | ICopyRequest buildRequest();
method buildRequest (line 44) | ICopyRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseCreateLinkRequest.java
type IBaseCreateLinkRequest (line 43) | public interface IBaseCreateLinkRequest {
method create (line 48) | @Deprecated void create(final ICallback<Permission> callback);
method create (line 53) | @Deprecated Permission create() throws ClientException;
method post (line 55) | void post(final ICallback<Permission> callback);
method post (line 57) | Permission post() throws ClientException;
method select (line 59) | ICreateLinkRequest select(final String value) ;
method top (line 61) | ICreateLinkRequest top(final int value);
method expand (line 63) | ICreateLinkRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseCreateLinkRequestBuilder.java
type IBaseCreateLinkRequestBuilder (line 40) | public interface IBaseCreateLinkRequestBuilder extends IRequestBuilder {
method buildRequest (line 42) | ICreateLinkRequest buildRequest();
method buildRequest (line 44) | ICreateLinkRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseCreateSessionRequest.java
type IBaseCreateSessionRequest (line 43) | public interface IBaseCreateSessionRequest {
method create (line 48) | @Deprecated void create(final ICallback<UploadSession> callback);
method create (line 53) | @Deprecated UploadSession create() throws ClientException;
method post (line 55) | void post(final ICallback<UploadSession> callback);
method post (line 57) | UploadSession post() throws ClientException;
method select (line 59) | ICreateSessionRequest select(final String value) ;
method top (line 61) | ICreateSessionRequest top(final int value);
method expand (line 63) | ICreateSessionRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseCreateSessionRequestBuilder.java
type IBaseCreateSessionRequestBuilder (line 40) | public interface IBaseCreateSessionRequestBuilder extends IRequestBuilder {
method buildRequest (line 42) | ICreateSessionRequest buildRequest();
method buildRequest (line 44) | ICreateSessionRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseDeltaCollectionPage.java
type IBaseDeltaCollectionPage (line 42) | public interface IBaseDeltaCollectionPage extends IBaseCollectionPage<It...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseDeltaRequest.java
type IBaseDeltaRequest (line 43) | public interface IBaseDeltaRequest {
method get (line 44) | void get(final ICallback<IDeltaCollectionPage> callback);
method get (line 46) | IDeltaCollectionPage get() throws ClientException;
method select (line 48) | IDeltaRequest select(final String value) ;
method top (line 50) | IDeltaRequest top(final int value);
method expand (line 52) | IDeltaRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseDeltaRequestBuilder.java
type IBaseDeltaRequestBuilder (line 40) | public interface IBaseDeltaRequestBuilder extends IRequestBuilder {
method buildRequest (line 42) | IDeltaRequest buildRequest();
method buildRequest (line 44) | IDeltaRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseDriveCollectionPage.java
type IBaseDriveCollectionPage (line 42) | public interface IBaseDriveCollectionPage extends IBaseCollectionPage<Dr...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseDriveCollectionRequest.java
type IBaseDriveCollectionRequest (line 40) | public interface IBaseDriveCollectionRequest {
method get (line 42) | void get(final ICallback<IDriveCollectionPage> callback);
method get (line 44) | IDriveCollectionPage get() throws ClientException;
method expand (line 46) | IDriveCollectionRequest expand(final String value);
method select (line 48) | IDriveCollectionRequest select(final String value);
method top (line 50) | IDriveCollectionRequest top(final int value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseDriveCollectionRequestBuilder.java
type IBaseDriveCollectionRequestBuilder (line 40) | public interface IBaseDriveCollectionRequestBuilder extends IRequestBuil...
method buildRequest (line 42) | IDriveCollectionRequest buildRequest();
method buildRequest (line 44) | IDriveCollectionRequest buildRequest(final List<Option> options);
method byId (line 46) | IDriveRequestBuilder byId(final String id);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseDriveRequest.java
type IBaseDriveRequest (line 40) | public interface IBaseDriveRequest extends IHttpRequest {
method get (line 42) | void get(final ICallback<Drive> callback);
method get (line 44) | Drive get() throws ClientException;
method update (line 49) | @Deprecated void update(final Drive sourceDrive, final ICallback<Drive...
method update (line 54) | @Deprecated Drive update(final Drive sourceDrive) throws ClientException;
method patch (line 56) | void patch(final Drive sourceDrive, final ICallback<Drive> callback);
method patch (line 58) | Drive patch(final Drive sourceDrive) throws ClientException;
method delete (line 60) | void delete(final ICallback<Void> callback);
method delete (line 62) | void delete() throws ClientException;
method create (line 67) | @Deprecated void create(final Drive newDrive, final ICallback<Drive> c...
method create (line 72) | @Deprecated Drive create(final Drive newDrive) throws ClientException;
method post (line 74) | void post(final Drive newDrive, final ICallback<Drive> callback);
method post (line 76) | Drive post(final Drive newDrive) throws ClientException;
method select (line 78) | IBaseDriveRequest select(final String value);
method top (line 80) | IBaseDriveRequest top(final int value);
method expand (line 82) | IBaseDriveRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseDriveRequestBuilder.java
type IBaseDriveRequestBuilder (line 40) | public interface IBaseDriveRequestBuilder extends IRequestBuilder {
method buildRequest (line 45) | IDriveRequest buildRequest();
method buildRequest (line 50) | IDriveRequest buildRequest(final List<Option> options);
method getItems (line 52) | IItemRequestBuilder getItems(final String id);
method getShared (line 54) | IItemRequestBuilder getShared(final String id);
method getSpecial (line 56) | IItemRequestBuilder getSpecial(final String id);
method getRecent (line 58) | IRecentRequestBuilder getRecent();
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseItemCollectionPage.java
type IBaseItemCollectionPage (line 42) | public interface IBaseItemCollectionPage extends IBaseCollectionPage<Ite...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseItemCollectionRequest.java
type IBaseItemCollectionRequest (line 40) | public interface IBaseItemCollectionRequest {
method get (line 42) | void get(final ICallback<IItemCollectionPage> callback);
method get (line 44) | IItemCollectionPage get() throws ClientException;
method create (line 49) | @Deprecated void create(final Item newItem, final ICallback<Item> call...
method create (line 54) | @Deprecated Item create(final Item newItem) throws ClientException;
method post (line 56) | void post(final Item newItem, final ICallback<Item> callback);
method post (line 58) | Item post(final Item newItem) throws ClientException;
method expand (line 60) | IItemCollectionRequest expand(final String value);
method select (line 62) | IItemCollectionRequest select(final String value);
method top (line 64) | IItemCollectionRequest top(final int value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseItemCollectionRequestBuilder.java
type IBaseItemCollectionRequestBuilder (line 40) | public interface IBaseItemCollectionRequestBuilder extends IRequestBuild...
method buildRequest (line 42) | IItemCollectionRequest buildRequest();
method buildRequest (line 44) | IItemCollectionRequest buildRequest(final List<Option> options);
method byId (line 46) | IItemRequestBuilder byId(final String id);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseItemRequest.java
type IBaseItemRequest (line 40) | public interface IBaseItemRequest extends IHttpRequest {
method get (line 42) | void get(final ICallback<Item> callback);
method get (line 44) | Item get() throws ClientException;
method update (line 49) | @Deprecated void update(final Item sourceItem, final ICallback<Item> c...
method update (line 54) | @Deprecated Item update(final Item sourceItem) throws ClientException;
method patch (line 56) | void patch(final Item sourceItem, final ICallback<Item> callback);
method patch (line 58) | Item patch(final Item sourceItem) throws ClientException;
method delete (line 60) | void delete(final ICallback<Void> callback);
method delete (line 62) | void delete() throws ClientException;
method create (line 67) | @Deprecated void create(final Item newItem, final ICallback<Item> call...
method create (line 72) | @Deprecated Item create(final Item newItem) throws ClientException;
method post (line 74) | void post(final Item newItem, final ICallback<Item> callback);
method post (line 76) | Item post(final Item newItem) throws ClientException;
method select (line 78) | IBaseItemRequest select(final String value);
method top (line 80) | IBaseItemRequest top(final int value);
method expand (line 82) | IBaseItemRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseItemRequestBuilder.java
type IBaseItemRequestBuilder (line 40) | public interface IBaseItemRequestBuilder extends IRequestBuilder {
method buildRequest (line 45) | IItemRequest buildRequest();
method buildRequest (line 50) | IItemRequest buildRequest(final List<Option> options);
method getPermissions (line 52) | IPermissionCollectionRequestBuilder getPermissions();
method getPermissions (line 54) | IPermissionRequestBuilder getPermissions(final String id);
method getChildren (line 56) | IItemCollectionRequestBuilder getChildren();
method getChildren (line 58) | IItemRequestBuilder getChildren(final String id);
method getThumbnails (line 60) | IThumbnailSetCollectionRequestBuilder getThumbnails();
method getThumbnails (line 62) | IThumbnailSetRequestBuilder getThumbnails(final String id);
method getContent (line 64) | IItemStreamRequestBuilder getContent();
method getCreateSession (line 66) | ICreateSessionRequestBuilder getCreateSession(final ChunkedUploadSessi...
method getCopy (line 68) | ICopyRequestBuilder getCopy(final String name, final ItemReference par...
method getCreateLink (line 70) | ICreateLinkRequestBuilder getCreateLink(final String type);
method getDelta (line 72) | IDeltaRequestBuilder getDelta(final String token);
method getSearch (line 74) | ISearchRequestBuilder getSearch(final String q);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseItemStreamRequest.java
type IBaseItemStreamRequest (line 42) | public interface IBaseItemStreamRequest extends IHttpStreamRequest {
method get (line 44) | void get(final ICallback<InputStream> callback);
method get (line 46) | InputStream get() throws ClientException;
method put (line 48) | void put(final byte[] fileContents, final ICallback<Item> callback);
method put (line 50) | Item put(final byte[] fileContents) throws ClientException;
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseItemStreamRequestBuilder.java
type IBaseItemStreamRequestBuilder (line 40) | public interface IBaseItemStreamRequestBuilder extends IRequestBuilder {
method buildRequest (line 45) | IItemStreamRequest buildRequest();
method buildRequest (line 50) | IItemStreamRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseOneDriveClient.java
type IBaseOneDriveClient (line 40) | public interface IBaseOneDriveClient extends IBaseClient {
method getDrives (line 47) | IDriveCollectionRequestBuilder getDrives();
method getDrive (line 55) | IDriveRequestBuilder getDrive(final String id);
method getShares (line 62) | IShareCollectionRequestBuilder getShares();
method getShare (line 70) | IShareRequestBuilder getShare(final String id);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBasePermissionCollectionPage.java
type IBasePermissionCollectionPage (line 42) | public interface IBasePermissionCollectionPage extends IBaseCollectionPa...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBasePermissionCollectionRequest.java
type IBasePermissionCollectionRequest (line 40) | public interface IBasePermissionCollectionRequest {
method get (line 42) | void get(final ICallback<IPermissionCollectionPage> callback);
method get (line 44) | IPermissionCollectionPage get() throws ClientException;
method expand (line 46) | IPermissionCollectionRequest expand(final String value);
method select (line 48) | IPermissionCollectionRequest select(final String value);
method top (line 50) | IPermissionCollectionRequest top(final int value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBasePermissionCollectionRequestBuilder.java
type IBasePermissionCollectionRequestBuilder (line 40) | public interface IBasePermissionCollectionRequestBuilder extends IReques...
method buildRequest (line 42) | IPermissionCollectionRequest buildRequest();
method buildRequest (line 44) | IPermissionCollectionRequest buildRequest(final List<Option> options);
method byId (line 46) | IPermissionRequestBuilder byId(final String id);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBasePermissionRequest.java
type IBasePermissionRequest (line 40) | public interface IBasePermissionRequest extends IHttpRequest {
method get (line 42) | void get(final ICallback<Permission> callback);
method get (line 44) | Permission get() throws ClientException;
method update (line 49) | @Deprecated void update(final Permission sourcePermission, final ICall...
method update (line 54) | @Deprecated Permission update(final Permission sourcePermission) throw...
method patch (line 56) | void patch(final Permission sourcePermission, final ICallback<Permissi...
method patch (line 58) | Permission patch(final Permission sourcePermission) throws ClientExcep...
method delete (line 60) | void delete(final ICallback<Void> callback);
method delete (line 62) | void delete() throws ClientException;
method create (line 67) | @Deprecated void create(final Permission newPermission, final ICallbac...
method create (line 72) | @Deprecated Permission create(final Permission newPermission) throws C...
method post (line 74) | void post(final Permission newPermission, final ICallback<Permission> ...
method post (line 76) | Permission post(final Permission newPermission) throws ClientException;
method select (line 78) | IBasePermissionRequest select(final String value);
method top (line 80) | IBasePermissionRequest top(final int value);
method expand (line 82) | IBasePermissionRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBasePermissionRequestBuilder.java
type IBasePermissionRequestBuilder (line 40) | public interface IBasePermissionRequestBuilder extends IRequestBuilder {
method buildRequest (line 45) | IPermissionRequest buildRequest();
method buildRequest (line 50) | IPermissionRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseRecentCollectionPage.java
type IBaseRecentCollectionPage (line 42) | public interface IBaseRecentCollectionPage extends IBaseCollectionPage<I...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseRecentRequest.java
type IBaseRecentRequest (line 43) | public interface IBaseRecentRequest {
method get (line 44) | void get(final ICallback<IRecentCollectionPage> callback);
method get (line 46) | IRecentCollectionPage get() throws ClientException;
method select (line 48) | IRecentRequest select(final String value) ;
method top (line 50) | IRecentRequest top(final int value);
method expand (line 52) | IRecentRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseRecentRequestBuilder.java
type IBaseRecentRequestBuilder (line 40) | public interface IBaseRecentRequestBuilder extends IRequestBuilder {
method buildRequest (line 42) | IRecentRequest buildRequest();
method buildRequest (line 44) | IRecentRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseSearchCollectionPage.java
type IBaseSearchCollectionPage (line 42) | public interface IBaseSearchCollectionPage extends IBaseCollectionPage<I...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseSearchRequest.java
type IBaseSearchRequest (line 43) | public interface IBaseSearchRequest {
method get (line 44) | void get(final ICallback<ISearchCollectionPage> callback);
method get (line 46) | ISearchCollectionPage get() throws ClientException;
method select (line 48) | ISearchRequest select(final String value) ;
method top (line 50) | ISearchRequest top(final int value);
method expand (line 52) | ISearchRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseSearchRequestBuilder.java
type IBaseSearchRequestBuilder (line 40) | public interface IBaseSearchRequestBuilder extends IRequestBuilder {
method buildRequest (line 42) | ISearchRequest buildRequest();
method buildRequest (line 44) | ISearchRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseShareCollectionPage.java
type IBaseShareCollectionPage (line 42) | public interface IBaseShareCollectionPage extends IBaseCollectionPage<Sh...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseShareCollectionRequest.java
type IBaseShareCollectionRequest (line 40) | public interface IBaseShareCollectionRequest {
method expand (line 42) | IShareCollectionRequest expand(final String value);
method select (line 44) | IShareCollectionRequest select(final String value);
method top (line 46) | IShareCollectionRequest top(final int value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseShareCollectionRequestBuilder.java
type IBaseShareCollectionRequestBuilder (line 40) | public interface IBaseShareCollectionRequestBuilder extends IRequestBuil...
method buildRequest (line 42) | IShareCollectionRequest buildRequest();
method buildRequest (line 44) | IShareCollectionRequest buildRequest(final List<Option> options);
method byId (line 46) | IShareRequestBuilder byId(final String id);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseShareRequest.java
type IBaseShareRequest (line 40) | public interface IBaseShareRequest extends IHttpRequest {
method get (line 42) | void get(final ICallback<Share> callback);
method get (line 44) | Share get() throws ClientException;
method update (line 49) | @Deprecated void update(final Share sourceShare, final ICallback<Share...
method update (line 54) | @Deprecated Share update(final Share sourceShare) throws ClientException;
method patch (line 56) | void patch(final Share sourceShare, final ICallback<Share> callback);
method patch (line 58) | Share patch(final Share sourceShare) throws ClientException;
method delete (line 60) | void delete(final ICallback<Void> callback);
method delete (line 62) | void delete() throws ClientException;
method create (line 67) | @Deprecated void create(final Share newShare, final ICallback<Share> c...
method create (line 72) | @Deprecated Share create(final Share newShare) throws ClientException;
method post (line 74) | void post(final Share newShare, final ICallback<Share> callback);
method post (line 76) | Share post(final Share newShare) throws ClientException;
method select (line 78) | IBaseShareRequest select(final String value);
method top (line 80) | IBaseShareRequest top(final int value);
method expand (line 82) | IBaseShareRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseShareRequestBuilder.java
type IBaseShareRequestBuilder (line 40) | public interface IBaseShareRequestBuilder extends IRequestBuilder {
method buildRequest (line 45) | IShareRequest buildRequest();
method buildRequest (line 50) | IShareRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseStringCollectionPage.java
type IBaseStringCollectionPage (line 42) | public interface IBaseStringCollectionPage extends IBaseCollectionPage<S...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseStringCollectionRequest.java
type IBaseStringCollectionRequest (line 40) | public interface IBaseStringCollectionRequest {
method expand (line 42) | IStringCollectionRequest expand(final String value);
method select (line 44) | IStringCollectionRequest select(final String value);
method top (line 46) | IStringCollectionRequest top(final int value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseStringCollectionRequestBuilder.java
type IBaseStringCollectionRequestBuilder (line 40) | public interface IBaseStringCollectionRequestBuilder extends IRequestBui...
method buildRequest (line 42) | IStringCollectionRequest buildRequest();
method buildRequest (line 44) | IStringCollectionRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseThumbnailRequest.java
type IBaseThumbnailRequest (line 40) | public interface IBaseThumbnailRequest extends IHttpRequest {
method get (line 42) | void get(final ICallback<Thumbnail> callback);
method get (line 44) | Thumbnail get() throws ClientException;
method update (line 49) | @Deprecated void update(final Thumbnail sourceThumbnail, final ICallba...
method update (line 54) | @Deprecated Thumbnail update(final Thumbnail sourceThumbnail) throws C...
method patch (line 56) | void patch(final Thumbnail sourceThumbnail, final ICallback<Thumbnail>...
method patch (line 58) | Thumbnail patch(final Thumbnail sourceThumbnail) throws ClientException;
method delete (line 60) | void delete(final ICallback<Void> callback);
method delete (line 62) | void delete() throws ClientException;
method create (line 67) | @Deprecated void create(final Thumbnail newThumbnail, final ICallback<...
method create (line 72) | @Deprecated Thumbnail create(final Thumbnail newThumbnail) throws Clie...
method post (line 74) | void post(final Thumbnail newThumbnail, final ICallback<Thumbnail> cal...
method post (line 76) | Thumbnail post(final Thumbnail newThumbnail) throws ClientException;
method select (line 78) | IBaseThumbnailRequest select(final String value);
method top (line 80) | IBaseThumbnailRequest top(final int value);
method expand (line 82) | IBaseThumbnailRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseThumbnailRequestBuilder.java
type IBaseThumbnailRequestBuilder (line 40) | public interface IBaseThumbnailRequestBuilder extends IRequestBuilder {
method buildRequest (line 45) | IThumbnailRequest buildRequest();
method buildRequest (line 50) | IThumbnailRequest buildRequest(final List<Option> options);
method getContent (line 52) | IThumbnailStreamRequestBuilder getContent();
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseThumbnailSetCollectionPage.java
type IBaseThumbnailSetCollectionPage (line 42) | public interface IBaseThumbnailSetCollectionPage extends IBaseCollection...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseThumbnailSetCollectionRequest.java
type IBaseThumbnailSetCollectionRequest (line 40) | public interface IBaseThumbnailSetCollectionRequest {
method get (line 42) | void get(final ICallback<IThumbnailSetCollectionPage> callback);
method get (line 44) | IThumbnailSetCollectionPage get() throws ClientException;
method expand (line 46) | IThumbnailSetCollectionRequest expand(final String value);
method select (line 48) | IThumbnailSetCollectionRequest select(final String value);
method top (line 50) | IThumbnailSetCollectionRequest top(final int value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseThumbnailSetCollectionRequestBuilder.java
type IBaseThumbnailSetCollectionRequestBuilder (line 40) | public interface IBaseThumbnailSetCollectionRequestBuilder extends IRequ...
method buildRequest (line 42) | IThumbnailSetCollectionRequest buildRequest();
method buildRequest (line 44) | IThumbnailSetCollectionRequest buildRequest(final List<Option> options);
method byId (line 46) | IThumbnailSetRequestBuilder byId(final String id);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseThumbnailSetRequest.java
type IBaseThumbnailSetRequest (line 40) | public interface IBaseThumbnailSetRequest extends IHttpRequest {
method get (line 42) | void get(final ICallback<ThumbnailSet> callback);
method get (line 44) | ThumbnailSet get() throws ClientException;
method update (line 49) | @Deprecated void update(final ThumbnailSet sourceThumbnailSet, final I...
method update (line 54) | @Deprecated ThumbnailSet update(final ThumbnailSet sourceThumbnailSet)...
method patch (line 56) | void patch(final ThumbnailSet sourceThumbnailSet, final ICallback<Thum...
method patch (line 58) | ThumbnailSet patch(final ThumbnailSet sourceThumbnailSet) throws Clien...
method delete (line 60) | void delete(final ICallback<Void> callback);
method delete (line 62) | void delete() throws ClientException;
method create (line 67) | @Deprecated void create(final ThumbnailSet newThumbnailSet, final ICal...
method create (line 72) | @Deprecated ThumbnailSet create(final ThumbnailSet newThumbnailSet) th...
method post (line 74) | void post(final ThumbnailSet newThumbnailSet, final ICallback<Thumbnai...
method post (line 76) | ThumbnailSet post(final ThumbnailSet newThumbnailSet) throws ClientExc...
method select (line 78) | IBaseThumbnailSetRequest select(final String value);
method top (line 80) | IBaseThumbnailSetRequest top(final int value);
method expand (line 82) | IBaseThumbnailSetRequest expand(final String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseThumbnailSetRequestBuilder.java
type IBaseThumbnailSetRequestBuilder (line 40) | public interface IBaseThumbnailSetRequestBuilder extends IRequestBuilder {
method buildRequest (line 45) | IThumbnailSetRequest buildRequest();
method buildRequest (line 50) | IThumbnailSetRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseThumbnailStreamRequest.java
type IBaseThumbnailStreamRequest (line 42) | public interface IBaseThumbnailStreamRequest extends IHttpStreamRequest {
method get (line 44) | void get(final ICallback<InputStream> callback);
method get (line 46) | InputStream get() throws ClientException;
method put (line 48) | void put(final byte[] fileContents, final ICallback<Thumbnail> callback);
method put (line 50) | Thumbnail put(final byte[] fileContents) throws ClientException;
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseThumbnailStreamRequestBuilder.java
type IBaseThumbnailStreamRequestBuilder (line 40) | public interface IBaseThumbnailStreamRequestBuilder extends IRequestBuil...
method buildRequest (line 45) | IThumbnailStreamRequest buildRequest();
method buildRequest (line 50) | IThumbnailStreamRequest buildRequest(final List<Option> options);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/BaseCollectionPage.java
class BaseCollectionPage (line 37) | public abstract class BaseCollectionPage<T1, T2 extends IRequestBuilder>...
method BaseCollectionPage (line 64) | public BaseCollectionPage(final List<T1> pageContents, final T2 nextRe...
method getNextPage (line 75) | public T2 getNextPage() {
method getCurrentPage (line 83) | public List<T1> getCurrentPage() {
method getRawObject (line 91) | public JsonObject getRawObject() {
method getSerializer (line 99) | protected ISerializer getSerializer() {
method setRawObject (line 109) | public void setRawObject(final ISerializer serializer, final JsonObjec...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/BaseCollectionRequest.java
class BaseCollectionRequest (line 39) | public abstract class BaseCollectionRequest<T1, T2> implements IHttpRequ...
method BaseCollectionRequest (line 64) | public BaseCollectionRequest(final String requestUrl,
method send (line 80) | @SuppressWarnings("unchecked")
method getRequestUrl (line 89) | @Override
method getHttpMethod (line 98) | @Override
method getHeaders (line 107) | @Override
method addHeader (line 117) | @Override
method getOptions (line 126) | public List<Option> getOptions() {
method addQueryOption (line 134) | public void addQueryOption(final QueryOption option) {
method getBaseRequest (line 143) | protected BaseRequest getBaseRequest() {
method getCollectionPageClass (line 151) | public Class<T2> getCollectionPageClass() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/BaseRequest.java
class BaseRequest (line 46) | public abstract class BaseRequest implements IHttpRequest {
method BaseRequest (line 95) | public BaseRequest(final String requestUrl,
method getRequestUrl (line 126) | @Override
method getHttpMethod (line 155) | @Override
method getHeaders (line 165) | @Override
method addHeader (line 175) | @Override
method send (line 188) | @SuppressWarnings("unchecked")
method send (line 205) | @SuppressWarnings("unchecked")
method getQueryOptions (line 217) | public List<QueryOption> getQueryOptions() {
method getOptions (line 226) | public List<Option> getOptions() {
method setHttpMethod (line 238) | public void setHttpMethod(final HttpMethod httpMethod) {
method getClient (line 247) | public IOneDriveClient getClient() {
method getResponseType (line 256) | public Class getResponseType() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/BaseRequestBuilder.java
class BaseRequestBuilder (line 35) | public abstract class BaseRequestBuilder implements IRequestBuilder {
method BaseRequestBuilder (line 58) | public BaseRequestBuilder(final String requestUrl, final IOneDriveClie...
method getClient (line 71) | public IOneDriveClient getClient() {
method getRequestUrl (line 79) | public String getRequestUrl() {
method getOptions (line 87) | public List<Option> getOptions() {
method getRequestUrlWithAdditionalSegment (line 96) | public String getRequestUrlWithAdditionalSegment(final String urlSegme...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/BaseStreamRequest.java
class BaseStreamRequest (line 39) | public abstract class BaseStreamRequest<T> implements IHttpStreamRequest {
method BaseStreamRequest (line 53) | public BaseStreamRequest(final String requestUrl,
method send (line 64) | protected void send(final ICallback<InputStream> callback) {
method send (line 74) | protected InputStream send() throws ClientException {
method send (line 84) | @SuppressWarnings("unchecked")
method send (line 95) | @SuppressWarnings("unchecked")
method getRequestUrl (line 105) | @Override
method getHttpMethod (line 114) | @Override
method addHeader (line 124) | @Override
method getHeaders (line 133) | @Override
method getOptions (line 142) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/DefaultConnectionFactory.java
class DefaultConnectionFactory (line 30) | public class DefaultConnectionFactory implements IConnectionFactory {
method createFromRequest (line 38) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/DefaultHttpProvider.java
class DefaultHttpProvider (line 47) | public class DefaultHttpProvider implements IHttpProvider {
method DefaultHttpProvider (line 91) | public DefaultHttpProvider(final ISerializer serializer,
method getSerializer (line 107) | @Override
method send (line 121) | @Override
method send (line 160) | @Override
method send (line 180) | public <Result, Body, DeserializeType> Result send(final IHttpRequest ...
method sendRequestInternal (line 200) | private <Result, Body, DeserializeType> Result sendRequestInternal(fin...
method handleErrorResponse (line 339) | private <Body> void handleErrorResponse(final IHttpRequest request,
method handleBinaryStream (line 353) | private InputStream handleBinaryStream(final InputStream in) {
method handleJsonResponse (line 364) | private <Result> Result handleJsonResponse(final InputStream in, final...
method setConnectionFactory (line 378) | void setConnectionFactory(final IConnectionFactory factory) {
method streamToString (line 388) | public static String streamToString(final InputStream input) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/HttpMethod.java
type HttpMethod (line 28) | public enum HttpMethod {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/HttpResponseCode.java
class HttpResponseCode (line 28) | public final class HttpResponseCode {
method HttpResponseCode (line 33) | private HttpResponseCode() { }
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/IBaseCollectionPage.java
type IBaseCollectionPage (line 37) | public interface IBaseCollectionPage<T1, T2 extends IRequestBuilder> ext...
method getRawObject (line 43) | JsonObject getRawObject();
method getNextPage (line 49) | T2 getNextPage();
method getCurrentPage (line 55) | List<T1> getCurrentPage();
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/IConnection.java
type IConnection (line 33) | public interface IConnection {
method setFollowRedirects (line 39) | void setFollowRedirects(final boolean followRedirects);
method addRequestHeader (line 46) | void addRequestHeader(String headerName, String headerValue);
method getOutputStream (line 53) | OutputStream getOutputStream() throws IOException;
method getInputStream (line 60) | InputStream getInputStream() throws IOException;
method getResponseCode (line 67) | int getResponseCode() throws IOException;
method getResponseMessage (line 74) | String getResponseMessage() throws IOException;
method close (line 79) | void close();
method getHeaders (line 85) | Map<String, String> getHeaders();
method getRequestMethod (line 91) | String getRequestMethod();
method setContentLength (line 97) | void setContentLength(final int length);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/IConnectionFactory.java
type IConnectionFactory (line 30) | public interface IConnectionFactory {
method createFromRequest (line 38) | IConnection createFromRequest(IHttpRequest request) throws IOException;
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/IHttpProvider.java
type IHttpProvider (line 32) | public interface IHttpProvider {
method getSerializer (line 38) | ISerializer getSerializer();
method send (line 49) | <Result, BodyType> void send(final IHttpRequest request,
method send (line 65) | <Result, BodyType> Result send(final IHttpRequest request,
method send (line 82) | <Result, BodyType, DeserializeType> Result send(final IHttpRequest req...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/IHttpRequest.java
type IHttpRequest (line 34) | public interface IHttpRequest {
method getRequestUrl (line 40) | URL getRequestUrl();
method getHttpMethod (line 46) | HttpMethod getHttpMethod();
method getHeaders (line 52) | List<HeaderOption> getHeaders();
method getOptions (line 58) | List<Option> getOptions();
method addHeader (line 65) | void addHeader(String header, String value);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/IHttpStreamRequest.java
type IHttpStreamRequest (line 28) | public interface IHttpStreamRequest extends IHttpRequest {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/IRequestBuilder.java
type IRequestBuilder (line 30) | public interface IRequestBuilder {
method getClient (line 36) | IOneDriveClient getClient();
method getRequestUrl (line 42) | String getRequestUrl();
method getRequestUrlWithAdditionalSegment (line 49) | String getRequestUrlWithAdditionalSegment(final String urlSegment);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/IRequestInterceptor.java
type IRequestInterceptor (line 28) | public interface IRequestInterceptor {
method intercept (line 34) | void intercept(final IHttpRequest request);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/IStatefulResponseHandler.java
type IStatefulResponseHandler (line 36) | public interface IStatefulResponseHandler<ResultType, DeserializedType> {
method configConnection (line 41) | void configConnection(final IConnection connection);
method generateResult (line 52) | ResultType generateResult(final IHttpRequest request,
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/OneDriveError.java
class OneDriveError (line 29) | public class OneDriveError {
method isError (line 45) | public boolean isError(final OneDriveErrorCodes expectedCode) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/OneDriveErrorResponse.java
class OneDriveErrorResponse (line 31) | public class OneDriveErrorResponse implements IJsonBackedObject {
method setRawObject (line 45) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/OneDriveFatalServiceException.java
class OneDriveFatalServiceException (line 31) | public class OneDriveFatalServiceException extends OneDriveServiceExcept...
method OneDriveFatalServiceException (line 49) | protected OneDriveFatalServiceException(final String method,
method getMessage (line 60) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/OneDriveInnerError.java
class OneDriveInnerError (line 27) | public class OneDriveInnerError {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/OneDriveServiceException.java
class OneDriveServiceException (line 42) | public class OneDriveServiceException extends ClientException {
method OneDriveServiceException (line 130) | protected OneDriveServiceException(final String method,
method getMessage (line 149) | @Override
method getResponseHeaders (line 158) | public List<String> getResponseHeaders() {
method getMessage (line 167) | public String getMessage(final boolean verbose) {
method getServiceError (line 232) | public OneDriveError getServiceError() {
method isError (line 236) | @Override
method createFromConnection (line 254) | public static <T> OneDriveServiceException createFromConnection(final ...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/http/UrlConnection.java
class UrlConnection (line 38) | public class UrlConnection implements IConnection {
method UrlConnection (line 55) | public UrlConnection(final IHttpRequest request) throws IOException {
method setFollowRedirects (line 72) | @Override
method addRequestHeader (line 77) | @Override
method getOutputStream (line 82) | @Override
method getInputStream (line 88) | @Override
method getResponseCode (line 98) | @Override
method getResponseMessage (line 103) | @Override
method close (line 108) | @Override
method getHeaders (line 113) | @Override
method getRequestMethod (line 121) | @Override
method setContentLength (line 126) | @Override
method getResponseHeaders (line 136) | private static HashMap<String, String> getResponseHeaders(final HttpUR...
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/logger/DefaultLogger.java
class DefaultLogger (line 30) | public class DefaultLogger implements ILogger {
method setLoggingLevel (line 41) | public void setLoggingLevel(final LoggerLevel level) {
method getLoggingLevel (line 50) | public LoggerLevel getLoggingLevel() {
method getTag (line 59) | private String getTag() {
method logDebug (line 80) | @Override
method logError (line 95) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/logger/ILogger.java
type ILogger (line 28) | public interface ILogger {
method setLoggingLevel (line 34) | void setLoggingLevel(final LoggerLevel level);
method getLoggingLevel (line 40) | LoggerLevel getLoggingLevel();
method logDebug (line 46) | void logDebug(final String message);
method logError (line 53) | void logError(final String message, final Throwable throwable);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/logger/LoggerLevel.java
type LoggerLevel (line 28) | public enum LoggerLevel {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/options/HeaderOption.java
class HeaderOption (line 28) | public class HeaderOption extends Option {
method HeaderOption (line 35) | public HeaderOption(final String name, final String value) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/options/Option.java
class Option (line 28) | public class Option {
method Option (line 45) | protected Option(final String name, final String value) {
method getName (line 54) | public String getName() {
method getValue (line 62) | public String getValue() {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/options/QueryOption.java
class QueryOption (line 28) | public class QueryOption extends Option {
method QueryOption (line 35) | public QueryOption(final String name, final String value) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/serializer/CalendarSerializer.java
class CalendarSerializer (line 38) | public final class CalendarSerializer {
method CalendarSerializer (line 43) | private CalendarSerializer() {
method deserialize (line 52) | public static Calendar deserialize(final String strVal) throws ParseEx...
method serialize (line 103) | public static String serialize(final Calendar src) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/serializer/DefaultSerializer.java
class DefaultSerializer (line 33) | public class DefaultSerializer implements ISerializer {
method DefaultSerializer (line 49) | public DefaultSerializer(final ILogger logger) {
method deserializeObject (line 61) | @Override
method serializeObject (line 84) | @Override
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/serializer/GsonFactory.java
class GsonFactory (line 44) | final class GsonFactory {
method GsonFactory (line 49) | private GsonFactory() {
method getGsonInstance (line 57) | public static Gson getGsonInstance(final ILogger logger) {
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/serializer/IJsonBackedObject.java
type IJsonBackedObject (line 30) | public interface IJsonBackedObject {
method setRawObject (line 38) | void setRawObject(final ISerializer serializer, final JsonObject json);
FILE: onedrivesdk/src/main/java/com/onedrive/sdk/serializer/ISerializer.java
type ISerializer (line 28) | public interface ISerializer {
method deserializeObject (line 37) | <T> T deserializeObject(final String inputString, Class<T> clazz);
method serializeObject (line 45) | <T> String serializeObject(final T serializableObject);
Condensed preview — 386 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,170K chars).
[
{
"path": ".gitignore",
"chars": 792,
"preview": "# Built application files\n*.apk\n*.ap_\n\n# Files for the Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbi"
},
{
"path": ".travis.yml",
"chars": 617,
"preview": "language: android\n\nenv:\n global:\n - ADB_INSTALL_TIMEOUT=8\n\n matrix:\n - ANDROID_TARGET=15 ANDROID_ABI=default/arm"
},
{
"path": "LICENSE",
"chars": 1122,
"preview": "OneDrive SDK Android\n\nCopyright (c) 2015 Microsoft Corporation\n\nAll rights reserved.\n\nMIT License\n\nPermission is hereby "
},
{
"path": "README.md",
"chars": 6348,
"preview": "# OneDrive SDK for Android\n\n[ . The original copyright n"
},
{
"path": "build.gradle",
"chars": 365,
"preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n r"
},
{
"path": "checkstyle.xml",
"chars": 4713,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE module PUBLIC \"-//Puppy Crawl//DTD Check Configuration 1.3//EN\" \"http:/"
},
{
"path": "docs/authentication.md",
"chars": 2911,
"preview": "# Authenticating with the OneDrive SDK for Android\nThe OneDrive SDK requires that all requests are authenticated with On"
},
{
"path": "docs/collections.md",
"chars": 4375,
"preview": "# Collections in the OneDrive SDK for Android\nThe OneDrive SDK for Android allows you to work with item collections in O"
},
{
"path": "docs/contributions.md",
"chars": 1407,
"preview": "# Contributing to the OneDrive SDK for Android\n\nThe OneDrive SDK is avaliable for all manner of contribution. There are "
},
{
"path": "docs/errors.md",
"chars": 1917,
"preview": "# Handling errors in the OneDrive SDK for Android\n\nErrors in the OneDrive SDK for Android behave just like errors return"
},
{
"path": "docs/extensibility.md",
"chars": 3352,
"preview": "# Extensibility with the OneDrive SDK for Android\n\nThe OneDrive SDKs are built to allow for customization and enhancemen"
},
{
"path": "docs/items.md",
"chars": 11210,
"preview": "# Items in the OneDrive SDK for Android\nItems in the OneDrive SDK behave just like items through the OneDrive API. All a"
},
{
"path": "docs/overview.md",
"chars": 8327,
"preview": "# Overview for the OneDrive SDK for Android\nThe OneDrive SDK for Android is designed to look just like the OneDrive API."
},
{
"path": "gradle/wrapper/gradle-wrapper.properties",
"chars": 230,
"preview": "#Wed Apr 10 15:27:10 PDT 2013\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
},
{
"path": "gradle.properties",
"chars": 1203,
"preview": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Settings specified in this file will override any "
},
{
"path": "gradlew",
"chars": 5080,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "gradlew.bat",
"chars": 2314,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
},
{
"path": "onedrivesdk/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "onedrivesdk/build.gradle",
"chars": 3387,
"preview": "apply plugin: 'com.android.library'\napply plugin: 'maven'\n\nif (JavaVersion.current().isJava8Compatible()) {\n allproje"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/concurrency/MockExecutors.java",
"chars": 2319,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/core/CoreTests.java",
"chars": 1722,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/core/MockClient.java",
"chars": 1674,
"preview": "package com.onedrive.sdk.core;\n\nimport com.onedrive.sdk.authentication.IAuthenticator;\nimport com.onedrive.sdk.concurren"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/BaseRequestTests.java",
"chars": 2551,
"preview": "package com.onedrive.sdk.http;\n\nimport android.graphics.Path;\nimport android.net.Uri;\nimport android.test.AndroidTestCas"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/DefaultHttpProviderTests.java",
"chars": 20561,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/MockInterceptor.java",
"chars": 1915,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/MockRequest.java",
"chars": 2191,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/http/MockSingleConnectionFactory.java",
"chars": 1950,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/logger/MockLogger.java",
"chars": 1748,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/serializer/DefaultSerializerTests.java",
"chars": 2546,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/serializer/ISO8601Test.java",
"chars": 3349,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/androidTest/java/com/onedrive/sdk/serializer/MockSerializer.java",
"chars": 2240,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/AndroidManifest.xml",
"chars": 336,
"preview": "<manifest package=\"com.microsoft.onedrivesdk\" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <uses-per"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ADALAccountInfo.java",
"chars": 4078,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ADALAuthenticator.java",
"chars": 28163,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/AccountType.java",
"chars": 2753,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/AuthorizationInterceptor.java",
"chars": 3582,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ClientAuthenticatorException.java",
"chars": 2229,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationAuthenticator.java",
"chars": 14423,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationDialog.java",
"chars": 4453,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationRequest.java",
"chars": 2946,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationResponse.java",
"chars": 2219,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationWebView.java",
"chars": 4030,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DiscoveryServiceResponse.java",
"chars": 1492,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/IAccountInfo.java",
"chars": 2265,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/IAuthenticator.java",
"chars": 3835,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/MSAAccountInfo.java",
"chars": 3863,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/MSAAuthenticator.java",
"chars": 16035,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/MicrosoftOAuthConfig.java",
"chars": 2724,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/ServiceInfo.java",
"chars": 1715,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/adal/BrokerPermissionsChecker.java",
"chars": 3895,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2016 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/AsyncMonitor.java",
"chars": 8345,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/AsyncMonitorLocation.java",
"chars": 1845,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/AsyncMonitorResponseHandler.java",
"chars": 3690,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/AsyncOperationException.java",
"chars": 2270,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/ChunkedUploadProvider.java",
"chars": 6693,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/ChunkedUploadRequest.java",
"chars": 5545,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/ChunkedUploadResponseHandler.java",
"chars": 5137,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/DefaultExecutors.java",
"chars": 5314,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/ICallback.java",
"chars": 1805,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/IExecutors.java",
"chars": 2939,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/IProgressCallback.java",
"chars": 1777,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/ResultGetter.java",
"chars": 1765,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/SimpleWaiter.java",
"chars": 2347,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/concurrency/SynchronousExecutor.java",
"chars": 2621,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/core/BaseClient.java",
"chars": 4583,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/core/ClientException.java",
"chars": 2216,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/core/DefaultClientConfig.java",
"chars": 5939,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/core/IBaseClient.java",
"chars": 2375,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/core/IClientConfig.java",
"chars": 2196,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/core/OneDriveErrorCodes.java",
"chars": 3040,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/AsyncOperationStatus.java",
"chars": 2526,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Audio.java",
"chars": 1759,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ChunkedUploadResult.java",
"chars": 4049,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ChunkedUploadSessionDescriptor.java",
"chars": 1837,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CopyBody.java",
"chars": 1843,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CopyRequest.java",
"chars": 2227,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CopyRequestBuilder.java",
"chars": 2271,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateLinkBody.java",
"chars": 1862,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateLinkRequest.java",
"chars": 2210,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateLinkRequestBuilder.java",
"chars": 2254,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateSessionBody.java",
"chars": 1871,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateSessionRequest.java",
"chars": 2252,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/CreateSessionRequestBuilder.java",
"chars": 2296,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Deleted.java",
"chars": 1765,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DeltaCollectionPage.java",
"chars": 2210,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DeltaRequest.java",
"chars": 2181,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DeltaRequestBuilder.java",
"chars": 2225,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DeltaResponse.java",
"chars": 1784,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Drive.java",
"chars": 1759,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DriveCollectionPage.java",
"chars": 2221,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DriveCollectionRequest.java",
"chars": 2219,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DriveCollectionRequestBuilder.java",
"chars": 2263,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DriveRequest.java",
"chars": 2153,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/DriveRequestBuilder.java",
"chars": 2443,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/File.java",
"chars": 1756,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/FileSystemInfo.java",
"chars": 1788,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Folder.java",
"chars": 1762,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Hashes.java",
"chars": 1762,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICopyRequest.java",
"chars": 1788,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICopyRequestBuilder.java",
"chars": 1810,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICreateLinkRequest.java",
"chars": 1807,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICreateLinkRequestBuilder.java",
"chars": 1829,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICreateSessionRequest.java",
"chars": 1816,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ICreateSessionRequestBuilder.java",
"chars": 1838,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDeltaCollectionPage.java",
"chars": 1813,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDeltaRequest.java",
"chars": 1791,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDeltaRequestBuilder.java",
"chars": 1813,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDriveCollectionPage.java",
"chars": 1813,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDriveCollectionRequest.java",
"chars": 1822,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDriveCollectionRequestBuilder.java",
"chars": 1844,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDriveRequest.java",
"chars": 1791,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IDriveRequestBuilder.java",
"chars": 1929,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemCollectionPage.java",
"chars": 1810,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemCollectionRequest.java",
"chars": 1819,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemCollectionRequestBuilder.java",
"chars": 1841,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemRequest.java",
"chars": 1788,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemRequestBuilder.java",
"chars": 2049,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemStreamRequest.java",
"chars": 1807,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IItemStreamRequestBuilder.java",
"chars": 1829,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IOneDriveClient.java",
"chars": 1940,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IPermissionCollectionPage.java",
"chars": 1828,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IPermissionCollectionRequest.java",
"chars": 1837,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IPermissionCollectionRequestBuilder.java",
"chars": 1859,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IPermissionRequest.java",
"chars": 1806,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IPermissionRequestBuilder.java",
"chars": 1828,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IRecentCollectionPage.java",
"chars": 1816,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IRecentRequest.java",
"chars": 1794,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IRecentRequestBuilder.java",
"chars": 1816,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ISearchCollectionPage.java",
"chars": 1816,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ISearchRequest.java",
"chars": 1794,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ISearchRequestBuilder.java",
"chars": 1816,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IShareCollectionPage.java",
"chars": 1813,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IShareCollectionRequest.java",
"chars": 1822,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IShareCollectionRequestBuilder.java",
"chars": 1844,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IShareRequest.java",
"chars": 1791,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IShareRequestBuilder.java",
"chars": 1813,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IStringCollectionPage.java",
"chars": 1816,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IStringCollectionRequest.java",
"chars": 1825,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IStringCollectionRequestBuilder.java",
"chars": 1847,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailRequest.java",
"chars": 1803,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailRequestBuilder.java",
"chars": 1825,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailSetCollectionPage.java",
"chars": 1835,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailSetCollectionRequest.java",
"chars": 1844,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailSetCollectionRequestBuilder.java",
"chars": 1866,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailSetRequest.java",
"chars": 1813,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailSetRequestBuilder.java",
"chars": 2072,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailStreamRequest.java",
"chars": 1822,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IThumbnailStreamRequestBuilder.java",
"chars": 1844,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Identity.java",
"chars": 1768,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/IdentitySet.java",
"chars": 1778,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Image.java",
"chars": 1759,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Item.java",
"chars": 1756,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemCollectionPage.java",
"chars": 2212,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemCollectionRequest.java",
"chars": 2213,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemCollectionRequestBuilder.java",
"chars": 2257,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemReference.java",
"chars": 1784,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemRequest.java",
"chars": 2147,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemRequestBuilder.java",
"chars": 2544,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemStreamRequest.java",
"chars": 2184,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ItemStreamRequestBuilder.java",
"chars": 2229,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Location.java",
"chars": 1768,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/OneDriveClient.java",
"chars": 6552,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/OpenWithApp.java",
"chars": 1779,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/OpenWithSet.java",
"chars": 1779,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Permission.java",
"chars": 1774,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/PermissionCollectionPage.java",
"chars": 2260,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/PermissionCollectionRequest.java",
"chars": 2243,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/PermissionCollectionRequestBuilder.java",
"chars": 2287,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/PermissionRequest.java",
"chars": 2183,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/PermissionRequestBuilder.java",
"chars": 2228,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Photo.java",
"chars": 1759,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Quota.java",
"chars": 1759,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/RecentCollectionPage.java",
"chars": 2219,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/RecentRequest.java",
"chars": 2160,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/RecentRequestBuilder.java",
"chars": 2204,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SearchCollectionPage.java",
"chars": 2218,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SearchRequest.java",
"chars": 2179,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SearchRequestBuilder.java",
"chars": 2223,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SearchResult.java",
"chars": 1781,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Share.java",
"chars": 1759,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ShareCollectionPage.java",
"chars": 2221,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ShareCollectionRequest.java",
"chars": 2219,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ShareCollectionRequestBuilder.java",
"chars": 2263,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ShareRequest.java",
"chars": 2153,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ShareRequestBuilder.java",
"chars": 2198,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Shared.java",
"chars": 1762,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SharingInvitation.java",
"chars": 1796,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SharingLink.java",
"chars": 1778,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/SpecialFolder.java",
"chars": 1784,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/StringCollectionPage.java",
"chars": 2230,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/StringCollectionRequest.java",
"chars": 2225,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/StringCollectionRequestBuilder.java",
"chars": 2269,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/Thumbnail.java",
"chars": 1771,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailRequest.java",
"chars": 2177,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailRequestBuilder.java",
"chars": 2222,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailSet.java",
"chars": 2194,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailSetCollectionPage.java",
"chars": 2277,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailSetCollectionRequest.java",
"chars": 2254,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
},
{
"path": "onedrivesdk/src/main/java/com/onedrive/sdk/extensions/ThumbnailSetCollectionRequestBuilder.java",
"chars": 2298,
"preview": "// ------------------------------------------------------------------------------\n// Copyright (c) 2015 Microsoft Corpor"
}
]
// ... and 186 more files (download for full content)
About this extraction
This page contains the full source code of the OneDrive/onedrive-sdk-android GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 386 files (1.0 MB), approximately 230.2k tokens, and a symbol index with 1454 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.