use of org.dataportabilityproject.datatransfer.google.contacts.GoogleContactsImporter 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;
}
Aggregations