Search in sources :

Example 1 with FlickrPhotosExporter

use of org.dataportabilityproject.datatransfer.flickr.photos.FlickrPhotosExporter in project data-transfer-project by google.

the class FlickrTransferExtension method initialize.

@Override
public void initialize(ExtensionContext context) {
    if (initialized)
        return;
    jobStore = context.getService(JobStore.class);
    try {
        appCredentials = context.getService(AppCredentialStore.class).getAppCredentials(FLICKR_KEY, FLICKER_SECRET);
    } catch (Exception e) {
        logger.warn("Problem getting AppCredentials: {}", e);
        initialized = false;
        return;
    }
    importer = new FlickrPhotosImporter(appCredentials, jobStore);
    exporter = new FlickrPhotosExporter(appCredentials);
    initialized = true;
}
Also used : FlickrPhotosImporter(org.dataportabilityproject.datatransfer.flickr.photos.FlickrPhotosImporter) FlickrPhotosExporter(org.dataportabilityproject.datatransfer.flickr.photos.FlickrPhotosExporter) JobStore(org.dataportabilityproject.spi.cloud.storage.JobStore)

Aggregations

FlickrPhotosExporter (org.dataportabilityproject.datatransfer.flickr.photos.FlickrPhotosExporter)1 FlickrPhotosImporter (org.dataportabilityproject.datatransfer.flickr.photos.FlickrPhotosImporter)1 JobStore (org.dataportabilityproject.spi.cloud.storage.JobStore)1