Package com.logicaldoc.dropbox
Class DropboxServiceImpl
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
com.google.gwt.user.server.rpc.RemoteServiceServlet
com.logicaldoc.dropbox.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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.logicaldoc.gui.frontend.client.services.DropboxService
DropboxService.Instance
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Exports documents and folders into DropboxfinishAuthorization
(String authorizationCode) Ends the authorization code and saves the access token in the databaseint
importDocuments
(long targetFolder, List<String> paths) boolean
Checks if the user has connected the LogicalDOC application to his Dropbox accountStarts the authorization process and returns the Dropbox authorization page URL to be shown to the userstatic Session
validateSession
(javax.servlet.http.HttpServletRequest request) 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 Details
-
DropboxServiceImpl
public DropboxServiceImpl()
-
-
Method Details
-
validateSession
public static Session validateSession(javax.servlet.http.HttpServletRequest request) throws InvalidSessionServerException - Throws:
InvalidSessionServerException
-
isConnected
Description copied from interface:DropboxService
Checks if the user has connected the LogicalDOC application to his Dropbox account- Specified by:
isConnected
in interfaceDropboxService
- Returns:
- if the account has been connected
- Throws:
ServerException
- an error happened in the server application
-
startAuthorization
Description copied from interface:DropboxService
Starts the authorization process and returns the Dropbox authorization page URL to be shown to the user- Specified by:
startAuthorization
in interfaceDropboxService
- Returns:
- the authorization token
- Throws:
ServerException
- an error happened in the server application
-
finishAuthorization
Description copied from interface:DropboxService
Ends the authorization code and saves the access token in the database- Specified by:
finishAuthorization
in interfaceDropboxService
- Parameters:
authorizationCode
- the authorization code- Returns:
- returned value
- Throws:
ServerException
- an error happened in the server application
-
exportDocuments
public boolean exportDocuments(String targetPath, List<Long> folderIds, List<Long> docIds) throws ServerException Description copied from interface:DropboxService
Exports documents and folders into Dropbox- Specified by:
exportDocuments
in interfaceDropboxService
- 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 welldocIds
- Ids of the documents to be imported- Returns:
- true, if the export has been successful
- Throws:
ServerException
- an error happened in the server application
-
importDocuments
- Specified by:
importDocuments
in interfaceDropboxService
- Throws:
ServerException
-