Collection<Group> groupList = parseGroups(groupNames); for (Group groupInList : groupList) { users.addAll(groupInList.getMembers());
Collection<Group> groupList = parseGroups(group.getProperties().get("sharedRoster.groupList")); for (Group groupInList : groupList) { if (groupInList.isUser(username)) {
/** * Returns true if a given group is visible to a given user. That means, if the user can * see the group in his roster. * * @param group the group to check if the user can see. * @param user the JID of the user to check if he may see the group. * @return true if a given group is visible to a given user. */ public boolean isGroupVisible(Group group, JID user) { String showInRoster = group.getProperties().get("sharedRoster.showInRoster"); if ("everybody".equals(showInRoster)) { return true; } else if ("onlyGroup".equals(showInRoster)) { if (group.isUser(user)) { return true; } // Check if the user belongs to a group that may see this group Collection<Group> groupList = parseGroups(group.getProperties().get( "sharedRoster.groupList")); for (Group groupInList : groupList) { if (groupInList.isUser(user)) { return true; } } } return false; }
Collection<Group> groupList = parseGroups(groupNames); for (Group groupInList : groupList) { users.addAll(groupInList.getMembers());
Collection<Group> groupList = parseGroups(groupNames); Collection<Group> otherGroupList = parseGroups(otherGroupNames); for (Group groupName : groupList) { if (groupName.isUser(otherUser)) {
Collection<Group> groupList = parseGroups(groupNames); for (Group groupInList : groupList) { users.addAll(groupInList.getMembers());
Collection<Group> groupList = parseGroups(group.getProperties().get("sharedRoster.groupList")); for (Group groupInList : groupList) { if (groupInList.isUser(username)) {
Collection<Group> groupList = parseGroups(groupNames); for (Group groupInList : groupList) { users.addAll(groupInList.getMembers());
/** * Returns true if a given group is visible to a given user. That means, if the user can * see the group in his roster. * * @param group the group to check if the user can see. * @param user the JID of the user to check if he may see the group. * @return true if a given group is visible to a given user. */ public boolean isGroupVisible(Group group, JID user) { String showInRoster = group.getProperties().get("sharedRoster.showInRoster"); if ("everybody".equals(showInRoster)) { return true; } else if ("onlyGroup".equals(showInRoster)) { if (group.isUser(user)) { return true; } // Check if the user belongs to a group that may see this group Collection<Group> groupList = parseGroups(group.getProperties().get( "sharedRoster.groupList")); for (Group groupInList : groupList) { if (groupInList.isUser(user)) { return true; } } } return false; }
Collection<Group> groupList = parseGroups(groupNames); Collection<Group> otherGroupList = parseGroups(otherGroupNames); for (Group groupName : groupList) { if (groupName.isUser(otherUser)) {