Class IdSearchResults

java.lang.Object
com.sun.identity.idm.IdSearchResults

@SupportedAll public class IdSearchResults extends Object
This class IdSearchResults provides to obtain the search results.
  • Field Details

    • SUCCESS

      public static final int SUCCESS
      Code used to indicate a successful search
      See Also:
    • SIZE_LIMIT_EXCEEDED

      public static final int SIZE_LIMIT_EXCEEDED
      Code used to indicate that the search was unsuccessful as the size limit exceeded during the search process.
      See Also:
    • TIME_LIMIT_EXCEEDED

      public static final int TIME_LIMIT_EXCEEDED
      Code used to indicate that the search was unsuccessful as the time limit exceeded during the search process.
      See Also:
    • searchResults

      protected Set<AMIdentity> searchResults
    • resultsMap

      protected Map<AMIdentity,Map<String,?>> resultsMap
    • errorCode

      protected int errorCode
  • Constructor Details

    • IdSearchResults

      public IdSearchResults(IdType type, String orgName)
  • Method Details

    • getResultAttributes

      public Map<AMIdentity,Map<String,?>> getResultAttributes()
      Method which returns the search results as a map containing AMIdentity objects as key and the attribute value String. The attribute value is a Set.
      Returns:
      Map containing AMIdentity objects as the key and Maps of attribute-valuesof the attributes specified as part of the search. The Maps contains attribute names as keys and Set containing values of those attributes. Returns an empty Map if no attributes were specified as part of search request.
    • getSearchResults

      public Set<AMIdentity> getSearchResults()
      Method which returns the search results as an ordered set.
      Returns:
      Set of AMIdentity objects matching the search criteria
    • getErrorCode

      public int getErrorCode()
      Method which returns the error code of search.
      Returns:
      Error code of search. The possible values are SUCCESS, SIZE_LIMIT_EXCEEDED and TIME_LIMIT_EXCEEDED
      See Also:
    • addResult

      public void addResult(AMIdentity id, Map attrs)
      Adds an AMIdentity object to this search result.
      Parameters:
      id - AMIdentity representing the entity.
      attrs - Map of attrbibutes obtained while performing the search
    • setErrorCode

      public void setErrorCode(int error)
      Set the error code for this Search Result
      Parameters:
      error - Error code of Search Result.
      See Also:
    • getType

      protected IdType getType()
    • getOrgName

      protected String getOrgName()
    • setPagingCookieControl

      @Evolving public void setPagingCookieControl(org.forgerock.openam.utils.PagingCookieControl pagingCookieControl)
      Set the paging cookie control that contains the cookie to accompany the search results.
      Parameters:
      pagingCookieControl - The paging cookie control.
    • getPagingCookieControl

      @Evolving public Optional<org.forgerock.openam.utils.PagingCookieControl> getPagingCookieControl()
      Get the paging cookie control that contains the cookie to accompany the search results.
      Returns:
      The optional paging cookie control.
    • toString

      public String toString()
      Returns String representation of the IdSearchResults object. It returns identity names and attributes
      Overrides:
      toString in class Object
      Returns:
      String representation of the ServiceConfig object.