public List<IdentityDetails> searchIdentityDetails(CrestQuery crestQuery,Map<String,Set<String>> searchModifiers,SSOToken admin) throws ResourceException {
  try {
    String realm="/";
    String objectType="User";
    if (searchModifiers != null) {
      realm=attractValues("realm",searchModifiers,"/");
      objectType=attractValues("objecttype",searchModifiers,"User");
    }
    AMIdentityRepository repo=getRepo(admin,realm);
    IdType idType=getIdType(objectType);
    if (idType != null) {
      List<AMIdentity> identities=fetchAMIdentities(idType,crestQuery,true,repo,searchModifiers);
      List<IdentityDetails> result=new ArrayList<>();
      for (      AMIdentity identity : identities) {
        result.add(convertToIdentityDetails(identity,null));
      }
      return result;
    }
    debug.error("IdentityServicesImpl.searchIdentities unsupported IdType " + objectType);
    throw new BadRequestException("searchIdentities: unsupported IdType " + objectType);
  }
 catch (  IdRepoException e) {
    debug.error("IdentityServicesImpl.searchIdentities",e);
    throw new InternalServerErrorException(e.getMessage());
  }
catch (  SSOException e) {
    debug.error("IdentityServicesImpl.searchIdentities",e);
    throw new InternalServerErrorException(e.getMessage());
  }
catch (  ObjectNotFound e) {
    debug.error("IdentityServicesImpl.searchIdentities",e);
    throw new NotFoundException(e.getMessage());
  }
}

public List < IdentityDetails > searchIdentityDetails ( CrestQuery crestQuery , Map < String , Set < String > > searchModifiers , SSOToken admin ) throws ResourceException { try { String realm = "/" ; String objectType = "User" ; if ( searchModifiers != null ) { realm = attractValues ( "realm" , searchModifiers , "/" ) ; objectType = attractValues ( "objecttype" , searchModifiers , "User" ) ; } AMIdentityRepository repo = getRepo ( admin , realm ) ; IdType idType = getIdType ( objectType ) ; if ( idType != null ) { List < AMIdentity > identities = fetchAMIdentities ( idType , crestQuery , true , repo , searchModifiers ) ; List < IdentityDetails > result = new ArrayList < > ( ) ; for ( AMIdentity identity : identities ) { result . add ( convertToIdentityDetails ( identity , null ) ) ; } return result ; } debug . error ( "IdentityServicesImpl.searchIdentities unsupported IdType " + objectType ) ; throw new BadRequestException ( "searchIdentities: unsupported IdType " + objectType ) ; } catch ( IdRepoException e ) { debug . error ( "IdentityServicesImpl.searchIdentities" , e ) ; throw new InternalServerErrorException ( e . getMessage ( ) ) ; } catch ( SSOException e ) { debug . error ( "IdentityServicesImpl.searchIdentities" , e ) ; throw new InternalServerErrorException ( e . getMessage ( ) ) ; } catch ( ObjectNotFound e ) { debug . error ( "IdentityServicesImpl.searchIdentities" , e ) ; throw new NotFoundException ( e . getMessage ( ) ) ; } }
searches the identity repository to find all identities that match the search criteria and returns them as a list of identities .
