Class FileService
- java.lang.Object
-
- org.plutext.msgraph.convert.scribe.FileService
-
public class FileService extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classFileService.DeleteResponseConverter(package private) classFileService.DownloadOAuthAsyncRequestCallback(package private) classFileService.DownloadResponseConverter(package private) classFileService.UploadOAuthAsyncRequestCallback(package private) classFileService.UploadResponseConverter
-
Field Summary
Fields Modifier and Type Field Description private com.github.scribejava.apis.MicrosoftAzureActiveDirectory20Apiapiprivate com.github.scribejava.core.oauth.OAuth20ServiceauthenticationServiceprivate java.lang.StringbearerTokenprivate com.github.scribejava.core.httpclient.HttpClienthttpClientprivate static org.slf4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description FileService(com.github.scribejava.core.oauth.OAuth20Service authenticationService, com.github.scribejava.apis.MicrosoftAzureActiveDirectory20Api api)FileService(com.github.scribejava.core.oauth.OAuth20Service authenticationService, com.github.scribejava.apis.MicrosoftAzureActiveDirectory20Api api, com.github.scribejava.core.httpclient.HttpClient httpClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.Future<java.lang.Boolean>deleteFileAsync(java.lang.String requestUrl)java.util.concurrent.Future<byte[]>downloadConvertedFileAsync(java.lang.String requestUrl)private java.util.concurrent.CompletableFuture<java.lang.String>getBearerToken()private java.util.concurrent.CompletableFuture<com.github.scribejava.core.httpclient.HttpClient>getHttpClient()java.util.concurrent.Future<java.lang.Boolean>uploadStreamAsync(java.lang.String requestUrl, byte[] bodyContents, java.lang.String contentType)java.util.concurrent.Future<java.lang.Boolean>uploadStreamAsync(java.lang.String requestUrl, java.io.File bodyContents, java.lang.String contentType)
-
-
-
Field Detail
-
log
private static final org.slf4j.Logger log
-
authenticationService
private final com.github.scribejava.core.oauth.OAuth20Service authenticationService
-
api
private final com.github.scribejava.apis.MicrosoftAzureActiveDirectory20Api api
-
httpClient
private com.github.scribejava.core.httpclient.HttpClient httpClient
-
bearerToken
private java.lang.String bearerToken
-
-
Constructor Detail
-
FileService
public FileService(com.github.scribejava.core.oauth.OAuth20Service authenticationService, com.github.scribejava.apis.MicrosoftAzureActiveDirectory20Api api)
-
FileService
public FileService(com.github.scribejava.core.oauth.OAuth20Service authenticationService, com.github.scribejava.apis.MicrosoftAzureActiveDirectory20Api api, com.github.scribejava.core.httpclient.HttpClient httpClient)
-
-
Method Detail
-
getHttpClient
private java.util.concurrent.CompletableFuture<com.github.scribejava.core.httpclient.HttpClient> getHttpClient()
-
getBearerToken
private java.util.concurrent.CompletableFuture<java.lang.String> getBearerToken()
-
uploadStreamAsync
public java.util.concurrent.Future<java.lang.Boolean> uploadStreamAsync(java.lang.String requestUrl, byte[] bodyContents, java.lang.String contentType) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
uploadStreamAsync
public java.util.concurrent.Future<java.lang.Boolean> uploadStreamAsync(java.lang.String requestUrl, java.io.File bodyContents, java.lang.String contentType) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOException
-
downloadConvertedFileAsync
public java.util.concurrent.Future<byte[]> downloadConvertedFileAsync(java.lang.String requestUrl) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
deleteFileAsync
public java.util.concurrent.Future<java.lang.Boolean> deleteFileAsync(java.lang.String requestUrl) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
-