validation.keep();
importGtfs();
}
else {
GtfsSnapshot snapshot = new GtfsSnapshot(gtfsUpload.getName(), new Date(), GtfsSnapshotSource.UPLOAD);
snapshot.save();
FileOutputStream fileOutputStream;
try {
File fileOut = new File(Play.configuration.getProperty("application.publicDataDirectory"), snapshot.getFilename());
gtfsUpload.renameTo(fileOut);
}
catch (Exception e) {
validation.addError("gtfsUpload", "Unable to process file.");
params.flash();
validation.keep();
importGtfs();
}
snapshot.save();
GtfsSnapshotMerge merge = new GtfsSnapshotMerge(snapshot);
merge.save();
ProcessGtfsSnapshotMerge mergeJob = new ProcessGtfsSnapshotMerge(merge.id);
mergeJob.doJob();