Interface SearchOp<T>

Type Parameters:
T - The result type of the translator.
All Superinterfaces:
SPIOperation

public interface SearchOp<T> extends SPIOperation
Implement this interface to allow the Connector to search for resource objects.
See Also:
  • Method Details

    • createFilterTranslator

      FilterTranslator<T> createFilterTranslator(ObjectClass objectClass, OperationOptions options)
      Creates a filter translator that will translate a specified filter into one or more native queries. Each of these native queries will be passed subsequently into executeQuery().
      Parameters:
      objectClass - The object class for the search. Will never be null.
      options - additional options that impact the way this operation is run. If the caller passes null, the framework will convert this into an empty set of options, so SPI need not worry about this ever being null.
      Returns:
      A filter translator. This must not be null. A null return value will cause the API ( SearchApiOp) to throw NullPointerException.
    • executeQuery

      void executeQuery(ObjectClass objectClass, T query, ResultsHandler handler, OperationOptions options)
      ConnectorFacade calls this method once for each native query that the FilterTranslator produces in response to the Filter passed into SearchApiOp. If the FilterTranslator produces more than one native query, then ConnectorFacade will automatically merge the results from each query and eliminate any duplicates. NOTE that this implies an in-memory data structure that holds a set of Uid values, so memory usage in the event of multiple queries will be O(N) where N is the number of results. This is why it is important that the FilterTranslator for each Connector implement OR if possible.
      Parameters:
      objectClass - The object class for the search. Will never be null.
      query - The native query to run. A value of null means "return every instance of the given object class".
      handler - Results should be returned to this handler
      options - Additional options that impact the way this operation is run. If the caller passes null, the framework will convert this into an empty set of options, so SPI need not guard against options being null.