Merge VisibleGroups into ListGroups

ListGroups was the only user of VisibleGroups. Instead of forwarding
calls from ListGroups to VisibleGroups move the code into ListGroups
and get rid of VisibleGroups.

Change-Id: Ie5dd6035487448486036a94f11f1e9237cc19012
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-01-22 16:10:02 +01:00
parent 0026dfe142
commit 0f55837a28
4 changed files with 71 additions and 142 deletions

View File

@@ -21,7 +21,7 @@ import com.google.gerrit.reviewdb.client.AccountGroup;
import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.account.GetGroups;
import com.google.gerrit.server.account.GroupCache;
import com.google.gerrit.server.account.VisibleGroups;
import com.google.gerrit.server.account.GroupControl;
import com.google.gerrit.server.group.GroupInfo;
import com.google.gerrit.server.group.ListGroups;
import com.google.gerrit.server.ioutil.ColumnFormatter;
@@ -65,15 +65,14 @@ public class ListGroupsCommand extends BaseCommand {
"owner group UUID, and whether the group is visible to all")
private boolean verboseOutput;
private final GroupCache groupCache;
@Inject
MyListGroups(final VisibleGroups.Factory visibleGroupsFactory,
MyListGroups(final GroupCache groupCache,
final GroupControl.Factory groupControlFactory,
final Provider<IdentifiedUser> identifiedUser,
final IdentifiedUser.GenericFactory userFactory,
final Provider<GetGroups> accountGetGroups,
final GroupCache groupCache) {
super(visibleGroupsFactory, userFactory, accountGetGroups);
this.groupCache = groupCache;
final Provider<GetGroups> accountGetGroups) {
super(groupCache, groupControlFactory, identifiedUser, userFactory,
accountGetGroups);
}
void display(final PrintWriter out) throws NoSuchGroupException {