removed unnecessary redundancy between removeLeaderboardGroups and removeLeaderboardGroup

This commit is contained in:
Axel Uhl committed 2013-07-05 11:15:45 +02:00
1 parent ae614a3402
commit 6f73e766dc
4 files changed
+8 -10

No files matched your search

@@ -556,6 +556,12 @@ public class LeaderboardGroupConfigPanel extends AbstractRegattaPanel implements
});
}
/**
* If no leaderboard group is selected or more than one is selected, this method is a no-op because the
* leaderboard list displayed is defined to the be list of all leaderboards available, excluding those
* leaderboards that are already assigned to <em>the</em> selected leaderboard group. In other words,
* the leaderboard list is only well-defined in case a single leaderboard group is selected.
*/
private void refreshLeaderboardsList() {
final LeaderboardGroupDTO selectedGroup = getSelectedGroup();
final Set<StrippedLeaderboardDTO> selectedLeaderboards = leaderboardsSelectionModel.getSelectedSet();
@@ -699,7 +705,7 @@ public class LeaderboardGroupConfigPanel extends AbstractRegattaPanel implements
}
private void removeLeaderboardGroup(final LeaderboardGroupDTO group) {
sailingService.removeLeaderboardGroup(group.getName(), new AsyncCallback<Void>() {
sailingService.removeLeaderboardGroups(Collections.singleton(group.getName()), new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable t) {
errorReporter.reportError("Error trying to remove leaderboard group " + group.getName() + ": "
@@ -215,8 +215,6 @@ public interface SailingService extends RemoteService {
void renameLeaderboardGroup(String oldName, String newName);
void removeLeaderboardGroup(String groupName);
void removeLeaderboardGroups(Set<String> groupNames);
LeaderboardGroupDTO createLeaderboardGroup(String groupName, String description,
@@ -265,11 +265,6 @@ public interface SailingServiceAsync {
*/
void renameLeaderboardGroup(String oldName, String newName, AsyncCallback<Void> callback);
/**
* Removes the leaderboard group with the name <code>groupName</code> from the service and the persistant store.
*/
void removeLeaderboardGroup(String groupName, AsyncCallback<Void> callback);
/**
* Removes the leaderboard groups with the given names from the service and the persistant store.
*/
@@ -2462,8 +2462,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
}
}
@Override
public void removeLeaderboardGroup(String groupName) {
private void removeLeaderboardGroup(String groupName) {
getService().apply(new RemoveLeaderboardGroup(groupName));
}