mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-04 19:33:52 +00:00
Added functions to create, edit and remove leaderboard groups to the
leaderboard group configuration
This commit is contained in:
1 parent
82712eb50e
commit
75572c2eb9
13 files changed
+376
-37
No files matched your search
@@ -228,7 +228,7 @@ public interface RacingEventService extends TrackedEventRegistry {
|
||||
|
||||
Map<String, LeaderboardGroup> getLeaderboardGroups();
|
||||
|
||||
LeaderboardGroup getLeaderboardGroubByName(String groupName);
|
||||
LeaderboardGroup getLeaderboardGroupByName(String groupName);
|
||||
|
||||
LeaderboardGroup addLeaderboardGroup(String groupName, String description, List<String> leaderboardNames);
|
||||
|
||||
|
||||
+2
-2
@@ -672,7 +672,7 @@ public class RacingEventServiceImpl implements RacingEventService, EventFetcher,
|
||||
}
|
||||
|
||||
@Override
|
||||
public LeaderboardGroup getLeaderboardGroubByName(String groupName) {
|
||||
public LeaderboardGroup getLeaderboardGroupByName(String groupName) {
|
||||
synchronized (leaderboardGroupsByName) {
|
||||
return leaderboardGroupsByName.get(groupName);
|
||||
}
|
||||
@@ -713,7 +713,7 @@ public class RacingEventServiceImpl implements RacingEventService, EventFetcher,
|
||||
if (!leaderboardGroupsByName.containsKey(oldName)) {
|
||||
throw new IllegalArgumentException("No leaderboard group with name " + oldName + " found");
|
||||
}
|
||||
if (!leaderboardGroupsByName.containsKey(newName)) {
|
||||
if (leaderboardGroupsByName.containsKey(newName)) {
|
||||
throw new IllegalArgumentException("Leaderboard group with name " + newName + " already exists");
|
||||
}
|
||||
LeaderboardGroup toRename = leaderboardGroupsByName.remove(oldName);
|
||||
|
||||
Reference in new issue
Block a user