@SuppressWarnings("unchecked")
  @Override
  public ImportResult importItem(
      UUID jobId,
      IdempotentImportExecutor idempotentImportExecutor,
      TokenAuthData authData,
      CalendarContainerResource data) throws Exception {

    for (CalendarModel calendar : data.getCalendars()) {
      idempotentImportExecutor.executeAndSwallowIOExceptions(calendar.getId(),
          calendar.getName(),
          () -> importCalendar(authData, calendar));
    }

    List<Map<String, Object>> eventRequests = new ArrayList<>();
    int requestId = 1;

    for (CalendarEventModel event : data.getEvents()) {
      // get the imported calendar id for the event from the mappings
      String importedId = idempotentImportExecutor.getCachedValue(event.getCalendarId());
      Map<String, Object> request =
          createRequestItem(event, requestId, String.format(EVENT_SUBPATH, importedId));
      requestId++;
      eventRequests.add(request);
    }


    RequestHelper.BatchResponse eventResponse =
        RequestHelper.batchRequest(authData, eventRequests, baseUrl, client, objectMapper);
    if (ImportResult.ResultType.OK != eventResponse.getResult().getType()) {
      // TODO log problems
      return eventResponse.getResult();
    }

    return eventResponse.getResult();
  }
Imports Outlook calendar information using the Microsoft Graph API.
extensions/data-transfer/portability-data-transfer-microsoft/src/main/java/org/datatransferproject/transfer/microsoft/calendar/MicrosoftCalendarImporter.java