public AMSearchResults searchUsers(AMSearchControl searchControl,String avFilter) throws AMException, SSOException {
  int level=searchControl.getSearchScope();
  if ((level != AMConstants.SCOPE_ONE) && (level != AMConstants.SCOPE_SUB))   throw new AMException(AMSDKBundle.getString("123",super.locale),"123");
  String filter="(&" + getSearchFilter(AMObject.USER) + "("+ roleDNsAN+ "="+ super.entryDN+ ")"+ avFilter+ ")";
  if (debug.messageEnabled()) {
    debug.message("AMRoleImpl.searchUsers: " + filter);
  }
  searchControl.setSearchScope(AMConstants.SCOPE_SUB);
  SearchControl sc=searchControl.getSearchControl();
  String returnAttrs[]=searchControl.getReturnAttributes();
  return dsServices.search(super.token,getOrganizationDN(),filter,sc,returnAttrs);
}

public AMSearchResults searchUsers ( AMSearchControl searchControl , String avFilter ) throws AMException , SSOException { int level = searchControl . getSearchScope ( ) ; if ( ( level != AMConstants . SCOPE_ONE ) && ( level != AMConstants . SCOPE_SUB ) ) throw new AMException ( AMSDKBundle . getString ( "123" , super . locale ) , "123" ) ; String filter = "(&" + getSearchFilter ( AMObject . USER ) + "(" + roleDNsAN + "=" + super . entryDN + ")" + avFilter + ")" ; if ( debug . messageEnabled ( ) ) { debug . message ( "AMRoleImpl.searchUsers: " + filter ) ; } searchControl . setSearchScope ( AMConstants . SCOPE_SUB ) ; SearchControl sc = searchControl . getSearchControl ( ) ; String returnAttrs [ ] = searchControl . getReturnAttributes ( ) ; return dsServices . search ( super . token , getOrganizationDN ( ) , filter , sc , returnAttrs ) ; }
searches for users in this role using wildcards and attribute values . wildcards can be specified such as a * , * , * a . to further refine the search , attribute - value pairs can be specifed so that dns of users with matching attribute - value pairs will be returned .
