private void checkSearchForUnsupportedTerms(
     String searchString, AdvancedUserQueryResults results, ServiceContext context) {
   if (searchString != null && results != null) {
     // assume non-alphanumeric covers operators, conditions, multiple terms, quotes, ...
     if (!isAlphanumeric(searchString)) {
       results.setMessage(context.getText("csum.manageusersadvanced.warning.unsupportedterm"));
     }
   }
 }
  protected String getRemoveUsersByUsernameFromGroupsErrorMessage(
      List usersNotFound,
      List groupsNotFound,
      Map userIdToGroupNameMapForMembershipRemovalProblems,
      ServiceContext context) {
    String msg = "";
    String concat = "";
    if (usersNotFound.size() > 0) {
      msg +=
          context.getText("csum.manager.error.usersnotfound")
              + ": "
              + StringUtil.convertCollectionToCommaDelimitedString(usersNotFound)
              + ".";
      concat = " ";
    }

    if (groupsNotFound.size() > 0) {
      msg += concat;
      msg +=
          context.getText("csum.manager.error.groupsdidnotexist")
              + ": "
              + StringUtil.convertCollectionToCommaDelimitedString(groupsNotFound)
              + ".";
    }

    if (userIdToGroupNameMapForMembershipRemovalProblems.size() > 0) {
      Iterator iter = userIdToGroupNameMapForMembershipRemovalProblems.keySet().iterator();
      while (iter.hasNext()) {
        String userid = (String) iter.next();
        String groupName = (String) userIdToGroupNameMapForMembershipRemovalProblems.get(userid);
        msg += concat;
        msg +=
            context.getText(
                "csum.manager.error.problemremovinguserfromgroup",
                new String[] {userid, groupName});
        concat = " ";
      }
    }

    return msg;
  }