我自己找到了解决方案:我需要创建一个 Spigot Importer。
工厂
@ServiceProvider(service = ImporterBuilder.class)
public final class TalendCollectionImporterBuilder implements ImporterBuilder {
public String getName() {
return "Talend Flow Connection Importer";
}
public SpigotImporter buildImporter() {
return new TalendCollectionImporter();
}
}
进口商(存根)
public class TalendCollectionImporter implements SpigotImporter {
private ContainerLoader container;
private Report report;
private ProgressTicket progressTicket;
private boolean cancel = false;
public boolean execute(ContainerLoader loader) {
this.container = loader;
this.report = new Report();
// import stuff
return !cancel;
}
public ContainerLoader getContainer() {
return container;
}
public Report getReport() {
return report;
}
public boolean cancel() {
cancel = true;
return true;
}
}