Class Dropbox

java.lang.Object
com.logicaldoc.dropbox.Dropbox

public class Dropbox extends Object
Our Dropbox facade
Since:
7.0
Author:
Marco Meschieri - LogicalDOC
  • Constructor Details

    • Dropbox

      public Dropbox()
  • Method Details

    • login

      public boolean login(String accessToken)
    • startAuthorization

      public String startAuthorization(Locale locale)
      Generates the authorization URL where the user has to allow LogicalDOC and gets an authorization code to be used then with finishAuthorization.
      Parameters:
      locale - the user's locale
      Returns:
      The page to be shown to the user to allow the app to access
    • finishAuthorization

      public String finishAuthorization(String authorizationCode)
      Finishes the authorization process. The returned access token can be saved for future use.
      Parameters:
      authorizationCode - The authorization code that the user see in the authorization page
      Returns:
      The access token
    • list

      public List<com.dropbox.core.v2.files.Metadata> list(String path) throws com.dropbox.core.v2.files.ListFolderErrorException, com.dropbox.core.DbxException
      Throws:
      com.dropbox.core.v2.files.ListFolderErrorException
      com.dropbox.core.DbxException
    • listFilesInTree

      public List<com.dropbox.core.v2.files.FileMetadata> listFilesInTree(String basePath) throws com.dropbox.core.DbxException
      Throws:
      com.dropbox.core.DbxException
    • find

      public List<com.dropbox.core.v2.files.FileMetadata> find(String basePath, String query) throws com.dropbox.core.DbxException
      Throws:
      com.dropbox.core.DbxException
    • get

      public com.dropbox.core.v2.files.Metadata get(String path) throws com.dropbox.core.DbxException
      Throws:
      com.dropbox.core.DbxException
    • downloadFile

      public boolean downloadFile(String path, File out) throws IOException
      Throws:
      IOException
    • uploadFile

      public boolean uploadFile(File inputFile, String path) throws IOException
      Throws:
      IOException
    • getAccountName

      public String getAccountName()
    • getAccessToken

      public String getAccessToken()