@Override
public GroupDetail call() throws OrmException, NoSuchGroupException {
control = groupControl.validateFor(groupId);
final AccountGroup group = groupCache.get(groupId);
final GroupDetail detail = new GroupDetail();
detail.setGroup(group);
GroupDescription.Basic ownerGroup = groupBackend.get(group.getOwnerGroupUUID());
if (ownerGroup != null) {
detail.setOwnerGroup(GroupReference.forGroup(ownerGroup));
}
switch (group.getType()) {
case INTERNAL:
detail.setMembers(loadMembers());
detail.setIncludes(loadIncludes());
break;
}
detail.setAccounts(aic.create());
detail.setCanModify(control.isOwner());
detail.setGroups(gic.create());
return detail;
}