Interface GDriveService

  • All Superinterfaces:
    com.google.gwt.user.client.rpc.RemoteService

    @RemoteServiceRelativePath("gdrive")
    public interface GDriveService
    extends com.google.gwt.user.client.rpc.RemoteService
    The client side stub for the Google Drive Service.
    Since:
    7.3
    Author:
    Marco Meschieri - LogicalDOC
    • Method Detail

      • upload

        String upload​(long docId)
               throws ServerException
        Uploads a document to Google Drive
        Parameters:
        docId - ID of the document to upload
        Returns:
        The resourceId of the uploaded document
        Throws:
        ServerException - an error happened in the server application
      • delete

        void delete​(String resourceId)
             throws ServerException
        Deletes a document in Google Drive
        Parameters:
        resourceId - ID of the document to delete
        Throws:
        ServerException - an error happened in the server applications
      • checkin

        GUIDocument checkin​(long docId,
                            String comment,
                            boolean major)
                     throws ServerException
        Performs the check-in of a Google Drives's document into the LogicalDOC repository
        Parameters:
        docId - ID of the document to update
        comment - The comment left for the checkin
        major - If this is a major or minor release
        Returns:
        The checked-in document
        Throws:
        ServerException - an error happened in the server application
      • importDocuments

        void importDocuments​(String[] resourceIds,
                             long targetFolderId,
                             String format)
                      throws ServerException
        Imports some Google documents into LogicalDOC
        Parameters:
        resourceIds - IDs of the documents to import
        targetFolderId - ID of the import folder
        format - The type of the documents
        Throws:
        ServerException - an error happened in the server application
      • exportDocuments

        String[] exportDocuments​(long[] ids)
                          throws ServerException
        Exports a selection of documents from LogicalDOC into GoogleDocs
        Parameters:
        ids - The ids of the document to be exported
        Returns:
        The list of the imported documents into Google Drive
        Throws:
        ServerException - an error happened in the server application
      • saveSettings

        String saveSettings​(String clientId,
                            String clientSecret)
                     throws ServerException
        Save the settings used by the Google Drive module
        Parameters:
        clientId - identifier of the client
        clientSecret - the secret key specified by he user
        Returns:
        The URL of the consent page
        Throws:
        ServerException - an error happened in the server application
      • loadSettings

        String[] loadSettings()
                       throws ServerException
        Save the settings used by the Google Drive module
        Returns:
        clientId, clientSecret
        Throws:
        ServerException - an error happened in the server application
      • create

        String create​(String fileName)
               throws ServerException
        Creates a new Google Document
        Parameters:
        fileName - name of the file to create
        Returns:
        The newly created document's ID in Google Drive
        Throws:
        ServerException - an error happened in the server application
      • search

        GUIDocument[] search​(String expression)
                      throws ServerException
        Search in documents into Google Drive
        Parameters:
        expression - the expression to search
        Returns:
        the found hits
        Throws:
        ServerException - an error happened in the server application