Load all Users for a given Group.

@param group the given Group.
@return Users as a Set of Nodes for that Group.
965287
@Override
    public Set<Node> getUsersForGroup(Node group) {
		Set<Node> users = new TreeSet<>();
		try {
			String query = "(" + groupIdentifyer + "=" + group.getName() + ")";
			SearchResult searchResult;
			Attributes attributes;
			SearchControls controls = new SearchControls();
			controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
			NamingEnumeration<SearchResult> results = ctx.search("", query, controls);
			Node user;
			while (results.hasMore()) {
				searchResult = results.next();
				attributes = searchResult.getAttributes();
				NamingEnumeration<?> members = attributes.get(groupMemberAttribut).getAll();
				while (members.hasMoreElements()) {
					String memberDN = (String) members.nextElement();
					String uid = getIdentifyerValueFromDN(memberDN);
					user = getUser(uid);
					user.setDn(memberDN);
					users.add(user);
				}
			}
		} catch (NamingException ex) {
			handleNamingException(group, ex);
		}
		return users;
	}
291116
public Response createGroup(GroupEntity group) {
		return restClient.post("groups", group, new HashMap<String, String>());
	}
1183422
public void setUserGroup(String userGroup) {

        CmsGroup group = checkGroup(userGroup);
        if (group != null) {
            m_project.setGroupId(group.getId());
        }
    }
923679
public boolean associateUserWithGroup(String user, String group)
	{
		if (!isUserExist(user))
		{
			throw new SystemException(String.format("User '%s' does not exist.", user));
		}

		if (!isGroupExist(group))
		{
			throw new SystemException(String.format("Group '%s' does not exist.", group));
		}

		List<String> userGroups = allAssociations.get(user);

		if (userGroups == null)
		{
			userGroups = new ArrayList<String>();
		}
		else if (userGroups.contains(group))
		{
			return false;
		}

		userGroups.add(group);

		allAssociations.put(user, userGroups);

		return true;
	}
801197
public Map<String, String> getUsersGroups() {
        Map<String, String> usersGroups = new LinkedHashMap<String, String>();
        for (Map.Entry<String, List<String>> entry : USERS_GROUPS.entrySet()) {
            String key = entry.getKey();
            usersGroups.put(key + " (" + entry.getValue().get(0) + ")", key);
        }
        return usersGroups;
    }
548346
public void setGroups(java.util.Collection<GroupInformation> groups) {
        if (groups == null) {
            this.groups = null;
            return;
        }

        this.groups = new java.util.ArrayList<GroupInformation>(groups);
    }
188446
public MulticastConfig setGroup(String group) {
    try {
      InetAddress address = InetAddress.getByName(group);
      if (!address.isMulticastAddress()) {
        throw new ConfigurationException("Invalid multicast group " + group);
      }
      return setGroup(address);
    } catch (UnknownHostException e) {
      throw new ConfigurationException("Failed to locate multicast group", e);
    }
  }
693069
public String get(String group, String key) {
		return this.groupedMap.get(group, key);
	}
392353
public java.util.List<User> getUsers() {
        if (users == null) {
            users = new com.amazonaws.internal.SdkInternalList<User>();
        }
        return users;
    }
400587
@NotNull
    @ObjectiveCName("loadGroupPermissionsWithGid:")
    public Promise<GroupPermissions> loadGroupPermissions(int gid) {
        return modules.getGroupsModule().loadAdminSettings(gid);
    }
291168
public B group(EventLoopGroup group) {
        if (group == null) {
            throw new NullPointerException("group");
        }
        if (this.group != null) {
            throw new IllegalStateException("group set already");
        }
        this.group = group;
        return self();
    }
756772
public LinkedHashSet<String> getValues(String group) {
		if (group == null) {
			group = StrUtil.EMPTY;
		}
		return super.get(group);
	}
972419
public Set<Role> findRoles(final Set<Group> userGroups)
    {
        final Set<Role> result = new HashSet<Role>();
        
        for(final RoleMapping mapping : this.getRoleMappings())
        {
            final Object source = mapping.getSource();
            
            if((userGroups != null) && userGroups.contains(source))
            {
                result.add(mapping.getTarget());
            }
        }
        
        return result;
    }
281852
public void setGroups(java.util.Collection<Group> groups) {
        if (groups == null) {
            this.groups = null;
            return;
        }

        this.groups = new java.util.ArrayList<Group>(groups);
    }
1231990
private static List<String> loadGroups(Map<String, String[]> groups, boolean start, boolean restart) {
        final boolean bTrace = TraceComponent.isAnyTracingEnabled();
        final ChannelFramework cf = ChannelFrameworkFactory.getChannelFramework();
        List<String> createdGroups = new ArrayList<String>(groups.size());

        for (Entry<String, String[]> entry : groups.entrySet()) {
            String group = entry.getKey();
            List<String> chains = new ArrayList<String>(entry.getValue().length);
            List<String> delayed = new LinkedList<String>();
            // scan for missing chains
            for (String chain : entry.getValue()) {
                if (null != cf.getChain(chain)) {
                    chains.add(chain);
                } else {
                    delayed.add(chain);
                }
            }
            // save off any delayed chains for this group definition
            if (!delayed.isEmpty()) {
                if (bTrace && tc.isEventEnabled()) {
                    Tr.event(tc, "Delay; group missing chains; " + group);
                }
                if (start) {
                    delayedStarts.put(group, Boolean.valueOf(restart));
                }
                delayedConfig.put(GROUP_PREFIX + group, delayed.toArray(new String[delayed.size()]));
                createdGroups.add(group);
            }
            // cannot use an empty list
            if (0 == chains.size()) {
                if (bTrace && tc.isEventEnabled()) {
                    Tr.event(tc, "Group has no current chains; " + group);
                }
                continue;
            }
            try {
                ChainGroupData cgd = cf.getChainGroup(group);
                if (null == cgd) {
                    cgd = cf.addChainGroup(group, chains.toArray(new String[chains.size()]));
                } else {
                    // adding more chains to the group
                    for (String newchain : chains) {
                        cf.addChainToGroup(group, newchain);
                    }
                }
                createdGroups.add(group);
            } catch (Exception e) {
                FFDCFilter.processException(e, "ChannelUtils.loadGroups",
                                            "add", new Object[] { entry, cf });
                if (bTrace && tc.isEventEnabled()) {
                    Tr.event(tc, "Unable to configure group " + group + "; " + e);
                }
            }
        } // end-groups

        return createdGroups;
    }
385427
@Nonnull
  @ReturnsMutableCopy
  public ICommonsList <IUserGroup> getAllUserGroupsWithAssignedUser (@Nullable final String sUserID)
  {
    if (StringHelper.hasNoText (sUserID))
      return new CommonsArrayList <> ();

    return getAll (aUserGroup -> aUserGroup.containsUserID (sUserID));
  }
47758
private Collection<Membership> findMembershipsByGroup(Session session, Group group) throws Exception
   {
      Node groupNode;
      NodeIterator refUsers;
      try
      {
         groupNode = utils.getGroupNode(session, group);
         refUsers = groupNode.getNode(JCROrganizationServiceImpl.JOS_MEMBERSHIP).getNodes();
      }
      catch (PathNotFoundException e)
      {
         return new ArrayList<Membership>();
      }

      List<Membership> memberships = new ArrayList<Membership>();
      while (refUsers.hasNext())
      {
         Node refUserNode = refUsers.nextNode();
         memberships.addAll(findMembershipsByUserAndGroup(session, refUserNode, groupNode));
      }

      return memberships;
   }