Allow group descriptions to supply email and URL

Some backends have external management interfaces that are not
embedded into Gerrit Code Review. Allow those backends to supply
a URL to the web management interface for a group, so a user can
manage their membership, view current members, or do whatever other
features the group system might support.

Some backends also have an email address associated with every
group. Sending email to that address will distribute the message to
the group's members. Permit backends to supply an optional email
address, and use this in the project level notification system if
a group is selected as the target for a message.

Change-Id: Ifaebc01571c2db84872b2c08ff99c05389372f61
This commit is contained in:
Shawn Pearce
2013-01-18 14:29:59 -08:00
parent c65c508a88
commit f2145b401f
13 changed files with 121 additions and 39 deletions

View File

@@ -21,8 +21,9 @@ import com.google.gerrit.server.util.Url;
public class GroupInfo {
final String kind = "gerritcodereview#group";
public String id;
public String name;
String id;
String name;
String url;
Boolean visibleToAll;
// These fields are only supplied for internal groups.
@@ -33,6 +34,7 @@ public class GroupInfo {
public GroupInfo(GroupDescription.Basic group) {
id = Url.encode(group.getGroupUUID().get());
name = Strings.emptyToNull(group.getName());
url = Strings.emptyToNull(group.getUrl());
visibleToAll = group.isVisibleToAll() ? true : null;
if (group instanceof GroupDescription.Internal) {