diff --git a/java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/trackfiles/impl/ExpeditionAllInOneImporter.java b/java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/trackfiles/impl/ExpeditionAllInOneImporter.java index 7e088e7f3c4..de444ed7870 100644 --- a/java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/trackfiles/impl/ExpeditionAllInOneImporter.java +++ b/java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/trackfiles/impl/ExpeditionAllInOneImporter.java @@ -69,12 +69,20 @@ public class ExpeditionAllInOneImporter { final String leaderboardName; final String regattaName; final String raceName; + final List importGpsFixData; + final List importSensorFixData; + final String sensorFixImporterType; - public ImporterResult(final UUID eventId, final String leaderboardName, final RegattaAndRaceIdentifier regattaAndRaceIdentifier) { + private ImporterResult(final UUID eventId, final String leaderboardName, + final RegattaAndRaceIdentifier regattaAndRaceIdentifier, final List importGpsFixData, + final List importSensorFixData, final String sensorFixImporterType) { this.eventId = eventId; this.leaderboardName = leaderboardName; this.regattaName = regattaAndRaceIdentifier.getRegattaName(); this.raceName = regattaAndRaceIdentifier.getRaceName(); + this.importGpsFixData = importGpsFixData; + this.importSensorFixData = importSensorFixData; + this.sensorFixImporterType = sensorFixImporterType; } } @@ -126,7 +134,9 @@ public class ExpeditionAllInOneImporter { } final ImportResultDTO jsonHolderForSensorFixImport = new ImportResultDTO(logger); - final Iterable> importerNamesAndFilesForSensorFixImport = Arrays.asList(new Pair<>(DoubleVectorFixImporter.EXPEDITION_EXTENDED_TYPE, fileItem)); + final String sensorFixImporterType = DoubleVectorFixImporter.EXPEDITION_EXTENDED_TYPE; + final Iterable> importerNamesAndFilesForSensorFixImport = Arrays + .asList(new Pair<>(sensorFixImporterType, fileItem)); try { new SensorDataImporter(service, context).importFiles(false, jsonHolderForSensorFixImport, importerNamesAndFilesForSensorFixImport); } catch (IOException e1) { @@ -206,7 +216,9 @@ public class ExpeditionAllInOneImporter { streamsWithFilenames.put(fileItem.getInputStream(), filename); new WindImporter().importWindToWindSourceAndTrackedRaces(service, windImportResult, windSource, Arrays.asList(trackedRace), streamsWithFilenames); - return new ImporterResult(event.getId(), regattaNameAndleaderboardName, trackedRace.getRaceIdentifier()); + return new ImporterResult(event.getId(), regattaNameAndleaderboardName, trackedRace.getRaceIdentifier(), + jsonHolderForGpsFixImport.getImportResult(), jsonHolderForSensorFixImport.getImportResult(), + sensorFixImporterType); } catch (Exception e) { throw new RuntimeException(e); }