summaryrefslogtreecommitdiffstats
path: root/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfo.java')
-rw-r--r--gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfo.java26
1 files changed, 18 insertions, 8 deletions
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfo.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfo.java
index 547a5f43b0..1acdd9a406 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfo.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfo.java
@@ -18,9 +18,10 @@ import com.google.gerrit.reviewdb.client.AccountGroup;
/** Summary information about an {@link AccountGroup}, for simple tabular displays. */
public class GroupInfo {
- protected AccountGroup.Id id;
+ protected AccountGroup.UUID uuid;
protected String name;
protected String description;
+ protected String url;
protected GroupInfo() {
}
@@ -32,8 +33,8 @@ public class GroupInfo {
* lookup has failed and a stale group id has been discovered in the data
* store.
*/
- public GroupInfo(final AccountGroup.Id id) {
- this.id = id;
+ public GroupInfo(final AccountGroup.UUID uuid) {
+ this.uuid = uuid;
}
/**
@@ -41,15 +42,20 @@ public class GroupInfo {
*
* @param a the data store record holding the specific group details.
*/
- public GroupInfo(final AccountGroup a) {
- id = a.getId();
+ public GroupInfo(GroupDescription.Basic a) {
+ uuid = a.getGroupUUID();
name = a.getName();
- description = a.getDescription();
+ url = a.getUrl();
+
+ if (a instanceof GroupDescription.Internal) {
+ AccountGroup group = ((GroupDescription.Internal) a).getAccountGroup();
+ description = group.getDescription();
+ }
}
/** @return the unique local id of the group */
- public AccountGroup.Id getId() {
- return id;
+ public AccountGroup.UUID getId() {
+ return uuid;
}
/** @return the name of the group; null if not supplied */
@@ -61,4 +67,8 @@ public class GroupInfo {
public String getDescription() {
return description;
}
+
+ public String getUrl() {
+ return url;
+ }
}