protected void doCallbackGroupsOperation(String userId, List<String> groupIds) { if (userId != null) { if (groupIds != null && groupIds.size() > 0) { List<String> userGroups = userGroupCallback.getGroupsForUser(userId, groupIds, null); for (String groupId : groupIds) { if (userGroupCallback.existsGroup(groupId) && userGroups != null && userGroups.contains(groupId)) { addGroupFromCallbackOperation(groupId); } } } else { if (!(userGroupsMap.containsKey(userId) && userGroupsMap.get(userId).booleanValue())) { List<String> userGroups = userGroupCallback.getGroupsForUser(userId, null, null); if (userGroups != null && userGroups.size() > 0) { for (String group : userGroups) { addGroupFromCallbackOperation(group); } userGroupsMap.put(userId, true); } } } } else { if (groupIds != null) { for (String groupId : groupIds) { addGroupFromCallbackOperation(groupId); } } } }
protected boolean doCallbackGroupOperation(String groupId) { if (groupId != null && userGroupCallback.existsGroup(groupId)) { addGroupFromCallbackOperation(groupId); return true; } return false; }