Class GoogleDriveSession


  • public class GoogleDriveSession
    extends java.lang.Object
    Author:
    andrew
    • Constructor Summary

      Constructors 
      Constructor Description
      GoogleDriveSession​(java.lang.String clientId, java.lang.String clientSecret, java.lang.String refreshToken)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close session.
      void getChildren​(org.apache.manifoldcf.connectorcommon.common.XThreadStringBuffer idBuffer, java.lang.String nodeId)
      Get the list of child documents for a document.
      void getGoogleDriveOutputStream​(org.apache.manifoldcf.connectorcommon.common.XThreadInputStream inputStream, java.lang.String documentURI)
      Get a stream representing the specified document.
      com.google.api.services.drive.model.File getObject​(java.lang.String id)
      Get an individual document.
      java.util.Map<java.lang.String,​java.lang.String> getRepositoryInfo()
      Obtain repository information.
      void getSeeds​(org.apache.manifoldcf.connectorcommon.common.XThreadStringBuffer idBuffer, java.lang.String googleDriveQuery)
      Get the list of matching root documents, e.g.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GoogleDriveSession

        public GoogleDriveSession​(java.lang.String clientId,
                                  java.lang.String clientSecret,
                                  java.lang.String refreshToken)
                           throws java.io.IOException,
                                  java.security.GeneralSecurityException
        Constructor. Create a session.
        Throws:
        java.io.IOException
        java.security.GeneralSecurityException
    • Method Detail

      • close

        public void close()
        Close session.
      • getRepositoryInfo

        public java.util.Map<java.lang.String,​java.lang.String> getRepositoryInfo()
                                                                                 throws java.io.IOException
        Obtain repository information.
        Throws:
        java.io.IOException
      • getSeeds

        public void getSeeds​(org.apache.manifoldcf.connectorcommon.common.XThreadStringBuffer idBuffer,
                             java.lang.String googleDriveQuery)
                      throws java.io.IOException,
                             java.lang.InterruptedException
        Get the list of matching root documents, e.g. seeds.
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • getObject

        public com.google.api.services.drive.model.File getObject​(java.lang.String id)
                                                           throws java.io.IOException
        Get an individual document.
        Throws:
        java.io.IOException
      • getChildren

        public void getChildren​(org.apache.manifoldcf.connectorcommon.common.XThreadStringBuffer idBuffer,
                                java.lang.String nodeId)
                         throws java.io.IOException,
                                java.lang.InterruptedException
        Get the list of child documents for a document.
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • getGoogleDriveOutputStream

        public void getGoogleDriveOutputStream​(org.apache.manifoldcf.connectorcommon.common.XThreadInputStream inputStream,
                                               java.lang.String documentURI)
                                        throws java.io.IOException
        Get a stream representing the specified document.
        Throws:
        java.io.IOException