removed unused code (addRegatta) from TracTracAdapter

Change-Id: I1999eb21d550e762fa9ba68c071ca7ee84546fb1
This commit is contained in:
Axel Uhl committed 2016-12-30 10:33:42 +01:00
1 parent 6c4c4dc0cf
commit d965ead2e8
2 files changed
-38

No files matched your search

@@ -79,27 +79,6 @@ public interface TracTracAdapter {
String tracTracUsername, String tracTracPassword, String raceStatus, String raceVisibility)
throws MalformedURLException, FileNotFoundException, URISyntaxException, Exception;
/**
* Defines the regatta and for each race listed in the JSON document that is not already being tracked by this
* service creates a {@link TracTracRaceTracker} that starts tracking the respective race. The
* {@link RaceDefinition}s obtained this way are all grouped into the single {@link Regatta} produced for the event
* listed in the JSON response. Note that the many race trackers will have their TracTrac <code>Event</code> each,
* all with the same name, meaning the same event but being distinct.
*
* @param jsonURL
* URL of a JSON response that contains an "event" object telling the event's name and ID, as well as a
* JSON array named "races" which tells ID and replay URL for the race. From those replay URLs the
* paramURL for the Java client can be derived.
* @param timeoutInMilliseconds
* if a race definition is not received for a race of this event within this time, the race tracker for
* that race is stopped; use -1 to wait forever
*/
Regatta addRegatta(TrackerManager trackerManager, URL jsonURL, URI liveURI, URI storedURI,
URI courseDesignUpdateURI, WindStore windStore, long timeoutInMilliseconds, String tracTracUsername,
String tracTracPassword, RaceLogStore raceLogStore, RegattaLogStore regattaLogStore)
throws MalformedURLException, FileNotFoundException, URISyntaxException, IOException, ParseException,
org.json.simple.parser.ParseException, Exception;
/**
* For the JSON URL of an account / event, lists the paramURLs that can be used for
* {@link #addTracTracRace(URL, URI, URI, WindStore, long)} calls to individually start tracking races of this
@@ -8,14 +8,12 @@ import java.text.ParseException;
import java.util.List;
import java.util.logging.Logger;
import com.sap.sailing.domain.base.Regatta;
import com.sap.sailing.domain.common.RegattaIdentifier;
import com.sap.sailing.domain.racelog.RaceLogStore;
import com.sap.sailing.domain.regattalog.RegattaLogStore;
import com.sap.sailing.domain.tracking.RaceHandle;
import com.sap.sailing.domain.tracking.TrackedRace;
import com.sap.sailing.domain.tracking.TrackerManager;
import com.sap.sailing.domain.tracking.WindStore;
import com.sap.sailing.domain.tractracadapter.DomainFactory;
import com.sap.sailing.domain.tractracadapter.JSONService;
import com.sap.sailing.domain.tractracadapter.RaceRecord;
@@ -85,21 +83,6 @@ public class TracTracAdapterImpl implements TracTracAdapter {
return new Util.Pair<String, List<RaceRecord>>(jsonService.getEventName(), jsonService.getRaceRecords());
}
@Override
public Regatta addRegatta(TrackerManager trackerManager, URL jsonURL, URI liveURI, URI storedURI,
URI courseDesignUpdateURI, WindStore windStore, long timeoutInMilliseconds, String tracTracUsername,
String tracTracPassword, RaceLogStore raceLogStore, RegattaLogStore regattaLogStore) throws Exception {
JSONService jsonService = getTracTracDomainFactory().parseJSONURLWithRaceRecords(jsonURL, true);
Regatta regatta = null;
for (RaceRecord rr : jsonService.getRaceRecords()) {
URL paramURL = rr.getParamURL();
regatta = addTracTracRace(trackerManager, paramURL, liveURI, storedURI, courseDesignUpdateURI,
raceLogStore, regattaLogStore, timeoutInMilliseconds, tracTracUsername, "", "",
tracTracPassword).getRegatta();
}
return regatta;
}
@Override
public RaceRecord getSingleTracTracRaceRecord(URL jsonURL, String raceId, boolean loadClientParams)
throws Exception {