Class DropboxServiceImpl

  • All Implemented Interfaces:
    com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, DropboxService, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class DropboxServiceImpl
    extends com.google.gwt.user.server.rpc.RemoteServiceServlet
    implements DropboxService
    Implementation of the DropboxService
    Since:
    7.0
    Author:
    Marco Meschieri - LogicalDOC
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean exportDocuments​(String targetPath, long[] folderIds, long[] docIds)
      Exports documents and folders into Dropbox
      String finishAuthorization​(String authorizationCode)
      Ends the authorization code and saves the access token in the database
      int importDocuments​(long targetFolder, String[] paths)  
      boolean isConnected()
      Checks if the user has connected the LogicalDOC application to his Dropbox account
      String startAuthorization()
      Starts the authorization process and returns the Dropbox authorization page URL to be shown to the user
      • Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet

        getSerializationPolicy, init, processCall, processCall, processPost
      • Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet

        doPost
      • Methods inherited from class javax.servlet.http.HttpServlet

        service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
    • Constructor Detail

      • DropboxServiceImpl

        public DropboxServiceImpl()
    • Method Detail

      • isConnected

        public boolean isConnected()
                            throws ServerException
        Description copied from interface: DropboxService
        Checks if the user has connected the LogicalDOC application to his Dropbox account
        Specified by:
        isConnected in interface DropboxService
        Returns:
        if the account has been connected
        Throws:
        ServerException - an error happened in the server application
      • finishAuthorization

        public String finishAuthorization​(String authorizationCode)
                                   throws ServerException
        Description copied from interface: DropboxService
        Ends the authorization code and saves the access token in the database
        Specified by:
        finishAuthorization in interface DropboxService
        Parameters:
        authorizationCode - the authorization code
        Returns:
        returned value
        Throws:
        ServerException - an error happened in the server application
      • exportDocuments

        public boolean exportDocuments​(String targetPath,
                                       long[] folderIds,
                                       long[] docIds)
                                throws ServerException
        Description copied from interface: DropboxService
        Exports documents and folders into Dropbox
        Specified by:
        exportDocuments in interface DropboxService
        Parameters:
        targetPath - the target path in Dropbox (must be a folder)
        folderIds - Ids of the folders to be imported (all subfolders and docs will be imported as well
        docIds - Ids of the documents to be imported
        Returns:
        true, if the export has been successful
        Throws:
        ServerException - an error happened in the server application