use of org.dataportabilityproject.transfer.microsoft.transformer.TransformerService in project data-transfer-project by google.
the class MicrosoftTransferExtension method getImporter.
@Override
public Importer<?, ?> getImporter(String transferDataType) {
OkHttpClient client = new OkHttpClient.Builder().build();
ObjectMapper mapper = new ObjectMapper();
TransformerService transformerService = new TransformerServiceImpl();
if (transferDataType.equals(CONTACTS)) {
return new MicrosoftContactsImporter(BASE_GRAPH_URL, client, mapper, transformerService);
}
if (transferDataType.equals(CALENDAR)) {
return new MicrosoftCalendarImporter(BASE_GRAPH_URL, client, mapper, transformerService, jobStore);
}
return null;
}
use of org.dataportabilityproject.transfer.microsoft.transformer.TransformerService in project data-transfer-project by google.
the class MicrosoftTransferExtension method getExporter.
@Override
public Exporter<?, ?> getExporter(String transferDataType) {
// TODO consider memoizing w/ Supplier but we will only use once and pass to worker.
// This could allow us to refactor these params into supplier.
OkHttpClient client = new OkHttpClient.Builder().build();
ObjectMapper mapper = new ObjectMapper();
TransformerService transformerService = new TransformerServiceImpl();
if (transferDataType.equals(CONTACTS)) {
return new MicrosoftContactsExporter(BASE_GRAPH_URL, client, mapper, transformerService);
}
if (transferDataType.equals(CALENDAR)) {
return new MicrosoftCalendarExporter(BASE_GRAPH_URL, client, mapper, transformerService);
}
return null;
}
Aggregations