public Collection<Group> getGroups() {
return Collections.unmodifiableCollection(getGroupObjects());
}
private Collection<Group> getGroupObjects() {
final GroupManager groupManager = GroupManager.getInstance();
Set<Group> objects = new HashSet<Group>(groups.size());
for (String group : groups) {
try {
objects.add(groupManager.getGroup(group));
} catch (GroupNotFoundException e) {
Log.error("Error retrieving group: " + group, e);
}
}
return objects;