@Override public List<String> findGroupNamesByUser(CallingContext context, String username) { List<String> result = Lists.newArrayList(); FindGroupsByUserFilter filter = new FindGroupsByUserFilter(username); List<RaptureEntitlementGroup> groups = RaptureEntitlementGroupStorage.filterAll(filter); for (RaptureEntitlementGroup group : groups) { result.add(group.getName()); } return result; }
@Override public boolean shouldInclude(RaptureEntitlementGroup obj) { return obj.getUsers().contains(username); }