Search in sources :

Example 1 with GoogleTasksImporter

use of org.dataportabilityproject.datatransfer.google.tasks.GoogleTasksImporter in project data-transfer-project by google.

the class GoogleTransferExtension method initialize.

@Override
public void initialize(ExtensionContext context) {
    // times.
    if (initialized)
        return;
    jobStore = context.getService(JobStore.class);
    ImmutableMap.Builder<String, Importer> importerBuilder = ImmutableMap.builder();
    importerBuilder.put("contacts", new GoogleContactsImporter());
    importerBuilder.put("calendar", new GoogleCalendarImporter(jobStore));
    importerBuilder.put("tasks", new GoogleTasksImporter(jobStore));
    importerMap = importerBuilder.build();
    ImmutableMap.Builder<String, Exporter> exporterBuilder = ImmutableMap.builder();
    exporterBuilder.put("contacts", new GoogleContactsExporter());
    exporterBuilder.put("calendar", new GoogleCalendarExporter());
    exporterBuilder.put("tasks", new GoogleTasksExporter());
    exporterMap = exporterBuilder.build();
    initialized = true;
}
Also used : GoogleCalendarImporter(org.dataportabilityproject.datatransfer.google.calendar.GoogleCalendarImporter) GoogleTasksExporter(org.dataportabilityproject.datatransfer.google.tasks.GoogleTasksExporter) JobStore(org.dataportabilityproject.spi.cloud.storage.JobStore) GoogleTasksExporter(org.dataportabilityproject.datatransfer.google.tasks.GoogleTasksExporter) Exporter(org.dataportabilityproject.spi.transfer.provider.Exporter) GoogleCalendarExporter(org.dataportabilityproject.datatransfer.google.calendar.GoogleCalendarExporter) GoogleContactsExporter(org.dataportabilityproject.datatransfer.google.contacts.GoogleContactsExporter) GoogleContactsExporter(org.dataportabilityproject.datatransfer.google.contacts.GoogleContactsExporter) ImmutableMap(com.google.common.collect.ImmutableMap) GoogleCalendarExporter(org.dataportabilityproject.datatransfer.google.calendar.GoogleCalendarExporter) GoogleTasksImporter(org.dataportabilityproject.datatransfer.google.tasks.GoogleTasksImporter) GoogleContactsImporter(org.dataportabilityproject.datatransfer.google.contacts.GoogleContactsImporter) GoogleTasksImporter(org.dataportabilityproject.datatransfer.google.tasks.GoogleTasksImporter) Importer(org.dataportabilityproject.spi.transfer.provider.Importer) GoogleCalendarImporter(org.dataportabilityproject.datatransfer.google.calendar.GoogleCalendarImporter) GoogleContactsImporter(org.dataportabilityproject.datatransfer.google.contacts.GoogleContactsImporter)

Aggregations

ImmutableMap (com.google.common.collect.ImmutableMap)1 GoogleCalendarExporter (org.dataportabilityproject.datatransfer.google.calendar.GoogleCalendarExporter)1 GoogleCalendarImporter (org.dataportabilityproject.datatransfer.google.calendar.GoogleCalendarImporter)1 GoogleContactsExporter (org.dataportabilityproject.datatransfer.google.contacts.GoogleContactsExporter)1 GoogleContactsImporter (org.dataportabilityproject.datatransfer.google.contacts.GoogleContactsImporter)1 GoogleTasksExporter (org.dataportabilityproject.datatransfer.google.tasks.GoogleTasksExporter)1 GoogleTasksImporter (org.dataportabilityproject.datatransfer.google.tasks.GoogleTasksImporter)1 JobStore (org.dataportabilityproject.spi.cloud.storage.JobStore)1 Exporter (org.dataportabilityproject.spi.transfer.provider.Exporter)1 Importer (org.dataportabilityproject.spi.transfer.provider.Importer)1