public Set searchUsers(String wildcard) throws AMException, SSOException {
  if ((wildcard == null) || (wildcard.length() == 0)) {
    throw new AMException(AMSDKBundle.getString("122",super.locale),"122");
  }
  Set<String> resultSet;
  Set<String> usersSet=getUserDNs();
  if (wildcard.length() == 1) {
    if (wildcard.equals("*")) {
      resultSet=usersSet;
    }
 else {
      throw new AMException(AMSDKBundle.getString("122",super.locale),"122");
    }
  }
 else {
    resultSet=new HashSet<>();
    if (wildcard.startsWith("*")) {
      String pattern=wildcard.substring(1);
      extractUserDNs(pattern,usersSet,resultSet);
    }
 else     if (wildcard.endsWith("*")) {
      String pattern=wildcard.substring(0,wildcard.length() - 1);
      extractUserDNs(pattern,usersSet,resultSet);
    }
 else {
      throw new AMException(AMSDKBundle.getString("122",super.locale),"122");
    }
  }
  return resultSet;
}

public Set searchUsers ( String wildcard ) throws AMException , SSOException { if ( ( wildcard == null ) || ( wildcard . length ( ) == 0 ) ) { throw new AMException ( AMSDKBundle . getString ( "122" , super . locale ) , "122" ) ; } Set < String > resultSet ; Set < String > usersSet = getUserDNs ( ) ; if ( wildcard . length ( ) == 1 ) { if ( wildcard . equals ( "*" ) ) { resultSet = usersSet ; } else { throw new AMException ( AMSDKBundle . getString ( "122" , super . locale ) , "122" ) ; } } else { resultSet = new HashSet < > ( ) ; if ( wildcard . startsWith ( "*" ) ) { String pattern = wildcard . substring ( 1 ) ; extractUserDNs ( pattern , usersSet , resultSet ) ; } else if ( wildcard . endsWith ( "*" ) ) { String pattern = wildcard . substring ( 0 , wildcard . length ( ) - 1 ) ; extractUserDNs ( pattern , usersSet , resultSet ) ; } else { throw new AMException ( AMSDKBundle . getString ( "122" , super . locale ) , "122" ) ; } } return resultSet ; }
searches for users in this group using wildcards and attribute values . wildcards can be specified such as a * , * , * a .
