}
final VisibleGroups visibleGroups = visibleGroupsFactory.create();
visibleGroups.setOnlyVisibleToAll(visibleToAll);
visibleGroups.setGroupType(groupType);
final GroupList groupList;
if (!projects.isEmpty()) {
groupList = visibleGroups.get(projects);
} else if (user != null) {
groupList = visibleGroups.get(userFactory.create(user));
} else {
groupList = visibleGroups.get();
}
final ColumnFormatter formatter = new ColumnFormatter(stdout, '\t');
for (final GroupDetail groupDetail : groupList.getGroups()) {
final AccountGroup g = groupDetail.group;
formatter.addColumn(g.getName());
if (verboseOutput) {
formatter.addColumn(KeyUtil.decode(g.getGroupUUID().toString()));
formatter.addColumn(