@Override
    public ImportResult importItem(
            UUID jobId,
            IdempotentImportExecutor idempotentImportExecutor,
            TokensAndUrlAuthData authData,
            MusicContainerResource data)
            throws Exception {

        if (data == null) {
            // Nothing to do
            return new ImportResult(new AppleContentException("Null MusicContainerResource received on AppleMusicImporter::importItem"));
        }

        int playlistsCount = 0;
        int playlistItemsCount = 0;

        AppleMusicInterface musicInterface = factory
                .getOrCreateMusicInterface(jobId, authData, appCredentials, exportingService, monitor);

        if (!data.getPlaylists().isEmpty()) {
            playlistsCount = musicInterface.importPlaylists(jobId, idempotentImportExecutor, data.getPlaylists());
        }

        if (!data.getPlaylistItems().isEmpty()) {
            playlistItemsCount = musicInterface.importMusicPlaylistItems(jobId, idempotentImportExecutor, data.getPlaylistItems());
        }

        final Map<String, Integer> counts =
                new ImmutableMap.Builder<String, Integer>()
                        .put(MusicContainerResource.PLAYLIST_COUNT_DATA_NAME, playlistsCount)
                        .put(MusicContainerResource.PLAYLIST_ITEM_COUNT_DATA_NAME, playlistItemsCount)
                        .build();
        return ImportResult.OK
                .copyWithCounts(counts);
    }
Apple Music implementation for the Importer interface.
This is the main entry point for importing playlists and playlist-tracks from the source services into Apple Music.
extensions/data-transfer/portability-data-transfer-apple/src/main/java/org/datatransferproject/datatransfer/apple/music/AppleMusicImporter.java