Search in sources :

Example 1 with MicrosoftContactsImporter

use of org.dataportabilityproject.transfer.microsoft.contacts.MicrosoftContactsImporter 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;
}
Also used : OkHttpClient(okhttp3.OkHttpClient) MicrosoftCalendarImporter(org.dataportabilityproject.transfer.microsoft.calendar.MicrosoftCalendarImporter) TransformerService(org.dataportabilityproject.transfer.microsoft.transformer.TransformerService) MicrosoftContactsImporter(org.dataportabilityproject.transfer.microsoft.contacts.MicrosoftContactsImporter) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) TransformerServiceImpl(org.dataportabilityproject.transfer.microsoft.transformer.TransformerServiceImpl)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 OkHttpClient (okhttp3.OkHttpClient)1 MicrosoftCalendarImporter (org.dataportabilityproject.transfer.microsoft.calendar.MicrosoftCalendarImporter)1 MicrosoftContactsImporter (org.dataportabilityproject.transfer.microsoft.contacts.MicrosoftContactsImporter)1 TransformerService (org.dataportabilityproject.transfer.microsoft.transformer.TransformerService)1 TransformerServiceImpl (org.dataportabilityproject.transfer.microsoft.transformer.TransformerServiceImpl)1