Search in sources :

Example 1 with DeezerPlaylistExporter

use of org.datatransferproject.transfer.deezer.playlists.DeezerPlaylistExporter in project data-transfer-project by google.

the class DeezerTransferExtension method initialize.

@Override
public void initialize(ExtensionContext context) {
    if (initialized) {
        Monitor monitor = context.getMonitor();
        monitor.severe(() -> "DeezerTransferExtension already initialized");
        return;
    }
    Monitor monitor = context.getMonitor();
    HttpTransport httpTransport = context.getService(HttpTransport.class);
    TransferServiceConfig transferServiceConfig = context.getService(TransferServiceConfig.class);
    exporter = new DeezerPlaylistExporter(monitor, httpTransport, transferServiceConfig);
    importer = new DeezerPlaylistImporter(monitor, httpTransport, transferServiceConfig);
    initialized = true;
}
Also used : HttpTransport(com.google.api.client.http.HttpTransport) DeezerPlaylistExporter(org.datatransferproject.transfer.deezer.playlists.DeezerPlaylistExporter) Monitor(org.datatransferproject.api.launcher.Monitor) TransferServiceConfig(org.datatransferproject.types.transfer.serviceconfig.TransferServiceConfig) DeezerPlaylistImporter(org.datatransferproject.transfer.deezer.playlists.DeezerPlaylistImporter)

Aggregations

HttpTransport (com.google.api.client.http.HttpTransport)1 Monitor (org.datatransferproject.api.launcher.Monitor)1 DeezerPlaylistExporter (org.datatransferproject.transfer.deezer.playlists.DeezerPlaylistExporter)1 DeezerPlaylistImporter (org.datatransferproject.transfer.deezer.playlists.DeezerPlaylistImporter)1 TransferServiceConfig (org.datatransferproject.types.transfer.serviceconfig.TransferServiceConfig)1