// PluginLoader.getPlugin(PluginType.Import,
// this.currentPlugin);
List<String> ids = this.plugin.splitIds(this.idList);
List<Record> recordList = new ArrayList<Record>();
for (String id : ids) {
Record r = new Record();
r.setData(id);
r.setId(id);
r.setCollections(this.digitalCollections);
recordList.add(r);
}
answer = this.plugin.generateFiles(recordList);
} else if (this.importFile != null) {
// uploaded file
// IImportPlugin plugin = (IImportPlugin)
// PluginLoader.getPlugin(PluginType.Import,
// this.currentPlugin);
this.plugin.setFile(this.importFile);
List<Record> recordList = this.plugin.generateRecordsFromFile();
for (Record r : recordList) {
r.setCollections(this.digitalCollections);
}
answer = this.plugin.generateFiles(recordList);
} else if (StringUtils.isNotEmpty(this.records)) {
// found list with records
// IImportPlugin plugin = (IImportPlugin)
// PluginLoader.getPlugin(PluginType.Import,
// this.currentPlugin);
List<Record> recordList = this.plugin.splitRecords(this.records);
for (Record r : recordList) {
r.setCollections(this.digitalCollections);
}
answer = this.plugin.generateFiles(recordList);
} else if (this.selectedFilenames.size() > 0) {
List<Record> recordList = this.plugin.generateRecordsFromFilenames(this.selectedFilenames);
for (Record r : recordList) {
r.setCollections(this.digitalCollections);
}
answer = this.plugin.generateFiles(recordList);
}