Class FileService


  • public class FileService
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.github.scribejava.apis.MicrosoftAzureActiveDirectory20Api api  
      private com.github.scribejava.core.oauth.OAuth20Service authenticationService  
      private java.lang.String bearerToken  
      private com.github.scribejava.core.httpclient.HttpClient httpClient  
      private static org.slf4j.Logger log  
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.InterruptedException
        java.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.InterruptedException
        java.util.concurrent.ExecutionException
        java.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.InterruptedException
        java.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.InterruptedException
        java.util.concurrent.ExecutionException