code: public static Map<CmsUUID, CmsUser> addExportUsersFromRoles(
          CmsObject cms,
          String ou,
          List<String> roles,
          Map<CmsUUID, CmsUser> exportUsers)
      throws CmsException {
  
          if ((roles != null) && (roles.size() > 0)) {
              Iterator<String> itRoles = roles.iterator();
              while (itRoles.hasNext()) {
                  List<CmsUser> roleUsers = OpenCms.getRoleManager().getUsersOfRole(
                      cms,
                      CmsRole.valueOfGroupName(itRoles.next()).forOrgUnit(ou),
                      true,
                      false);
                  Iterator<CmsUser> itRoleUsers = roleUsers.iterator();
                  while (itRoleUsers.hasNext()) {
                      CmsUser roleUser = itRoleUsers.next();
                      // contains
                      if (exportUsers.get(roleUser.getId()) == null) {
                          exportUsers.put(roleUser.getId(), roleUser);
                      }
                  }
              }
          }
          return exportUsers;
      }
docs: Returns a map with the users to export added.<p>
  @param cms CmsObject
  @param ou ou name
  
  @param roles the selected roles
  @param exportUsers the map to add the users
  
  @return a map with the users to export added
  
  @throws CmsException if getting roles or users of role failed