use of org.datatransferproject.datatransfer.imgur.photos.ImgurPhotosExporter in project data-transfer-project by google.
the class ImgurTransferExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
Monitor monitor = context.getMonitor();
if (initialized) {
monitor.severe(() -> "ImgurTransferExtension is already initialized");
return;
}
ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
OkHttpClient client = context.getService(OkHttpClient.class);
TemporaryPerJobDataStore jobStore = context.getService(TemporaryPerJobDataStore.class);
exporter = new ImgurPhotosExporter(monitor, client, mapper, jobStore, BASE_URL);
importer = new ImgurPhotosImporter(monitor, client, mapper, jobStore, BASE_URL);
initialized = true;
}
use of org.datatransferproject.datatransfer.imgur.photos.ImgurPhotosExporter in project data-transfer-project by google.
the class ImgurPhotoExporterTest method setUp.
@Before
public void setUp() throws IOException {
server = new MockWebServer();
server.start();
exporter = new ImgurPhotosExporter(monitor, client, mapper, jobStore, server.url("").toString());
}
Aggregations