Class GoogleDriveFetcherConfig

java.lang.Object
com.norconex.crawler.core.fetch.BaseFetcherConfig
com.norconex.crawler.fs.fetch.impl.googledrive.GoogleDriveFetcherConfig

public class GoogleDriveFetcherConfig extends BaseFetcherConfig
Configuration scaffold for a future GoogleDriveFetcher implementation.
  • Field Details

    • DEFAULT_TEXT_EXPORT_MIME_TYPES

      public static final Map<String,String> DEFAULT_TEXT_EXPORT_MIME_TYPES
    • DEFAULT_PDF_EXPORT_MIME_TYPES

      public static final Map<String,String> DEFAULT_PDF_EXPORT_MIME_TYPES
    • DEFAULT_OOXML_EXPORT_MIME_TYPES

      public static final Map<String,String> DEFAULT_OOXML_EXPORT_MIME_TYPES
  • Constructor Details

    • GoogleDriveFetcherConfig

      public GoogleDriveFetcherConfig()
  • Method Details

    • defaultExportMimeTypes

      public Map<String,String> defaultExportMimeTypes()
    • getTokenUrl

      public String getTokenUrl()
      The address Google's OAuth service answers token requests on. Change it only to go through a proxy or a compatible server; it is also the audience the signed request names.
    • getApiBaseUrl

      public String getApiBaseUrl()
      The address the Google Drive API is under, without a trailing slash. Change it only to go through a proxy or a compatible server.
    • getClientEmail

      public String getClientEmail()
    • getPrivateKey

      public String getPrivateKey()
      PEM private key content or secure key reference, kept as is in the configuration. To keep it secret (encrypted, or supplied as a variable), leave this empty and give it as the password of the credentials.
    • getCredentials

      public Credentials getCredentials()
      Credentials holding the service account: the client email as the username and the PEM private key as the password, used when getClientEmail() or getPrivateKey() are empty. The password can be encrypted.
    • getDelegatedUser

      public String getDelegatedUser()
      Optional delegated Google Workspace user email for domain-wide delegation.
    • getApplicationName

      public String getApplicationName()
      Optional Google API application name.
    • getNativeDocumentFormatPolicy

      public GoogleDriveFetcherConfig.NativeDocumentFormatPolicy getNativeDocumentFormatPolicy()
      Default export policy for Google-native document families when no explicit override is configured.
    • getExportMimeTypeMap

      public Map<String,String> getExportMimeTypeMap()
      Explicit export overrides for Google-native document mime types. Key: source mime type (e.g. application/vnd.google-apps.document) Value: export mime type (e.g. text/plain)
    • setTokenUrl

      public GoogleDriveFetcherConfig setTokenUrl(String tokenUrl)
      The address Google's OAuth service answers token requests on. Change it only to go through a proxy or a compatible server; it is also the audience the signed request names.
      Returns:
      this.
    • setApiBaseUrl

      public GoogleDriveFetcherConfig setApiBaseUrl(String apiBaseUrl)
      The address the Google Drive API is under, without a trailing slash. Change it only to go through a proxy or a compatible server.
      Returns:
      this.
    • setClientEmail

      public GoogleDriveFetcherConfig setClientEmail(String clientEmail)
      Returns:
      this.
    • setPrivateKey

      public GoogleDriveFetcherConfig setPrivateKey(String privateKey)
      PEM private key content or secure key reference, kept as is in the configuration. To keep it secret (encrypted, or supplied as a variable), leave this empty and give it as the password of the credentials.
      Returns:
      this.
    • setDelegatedUser

      public GoogleDriveFetcherConfig setDelegatedUser(String delegatedUser)
      Optional delegated Google Workspace user email for domain-wide delegation.
      Returns:
      this.
    • setApplicationName

      public GoogleDriveFetcherConfig setApplicationName(String applicationName)
      Optional Google API application name.
      Returns:
      this.
    • setNativeDocumentFormatPolicy

      public GoogleDriveFetcherConfig setNativeDocumentFormatPolicy(GoogleDriveFetcherConfig.NativeDocumentFormatPolicy nativeDocumentFormatPolicy)
      Default export policy for Google-native document families when no explicit override is configured.
      Returns:
      this.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class BaseFetcherConfig
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class BaseFetcherConfig
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BaseFetcherConfig
    • toString

      public String toString()
      Overrides:
      toString in class BaseFetcherConfig