io.camunda.google.supplier.GoogleDriveServiceSupplier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connector-google-base Show documentation
Show all versions of connector-google-base Show documentation
Camunda Connector Google base functionality
/*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. Licensed under a proprietary license.
* See the License.txt file for more information. You may not use this file
* except in compliance with the proprietary license.
*/
package io.camunda.google.supplier;
import static io.camunda.google.supplier.util.GoogleServiceSupplierUtil.getHttpHttpCredentialsAdapter;
import static io.camunda.google.supplier.util.GoogleServiceSupplierUtil.getNetHttpTransport;
import com.google.api.client.json.gson.GsonFactory;
import com.google.api.services.drive.Drive;
import io.camunda.google.model.Authentication;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class GoogleDriveServiceSupplier {
private static final Logger LOGGER = LoggerFactory.getLogger(GoogleDriveServiceSupplier.class);
private GoogleDriveServiceSupplier() {}
public static Drive createDriveClientInstance(final Authentication authentication) {
Drive drive =
new Drive.Builder(
getNetHttpTransport(),
GsonFactory.getDefaultInstance(),
getHttpHttpCredentialsAdapter(authentication))
.build();
LOGGER.debug("Google drive service was successfully initialized");
return drive;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy