Interface SearchOp<T>
-
- Type Parameters:
T
- The result type of the translator.
- All Superinterfaces:
SPIOperation
- All Known Implementing Classes:
TstAbstractConnector
,TstConnector
,TstStatefulConnector
,TstStatefulPoolableConnector
public interface SearchOp<T> extends SPIOperation
Implement this interface to allow the Connector to search for resource objects.- See Also:
For more information
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FilterTranslator<T>
createFilterTranslator(ObjectClass objectClass, OperationOptions options)
Creates a filter translator that will translate a specifiedFilter
into one or more native queries.void
executeQuery(ObjectClass objectClass, T query, ResultsHandler handler, OperationOptions options)
ConnectorFacade calls this method once for each native query that thecreateFilterTranslator(ObjectClass, OperationOptions)
produces in response to theFilter
passed intoSearchApiOp.search(org.identityconnectors.framework.common.objects.ObjectClass, org.identityconnectors.framework.common.objects.filter.Filter, org.identityconnectors.framework.common.objects.ResultsHandler, org.identityconnectors.framework.common.objects.OperationOptions)
.
-
-
-
Method Detail
-
createFilterTranslator
FilterTranslator<T> createFilterTranslator(ObjectClass objectClass, OperationOptions options)
Creates a filter translator that will translate a specifiedFilter
into one or more native queries. Each of these native queries will be passed subsequently intoexecuteQuery()
.- 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
. Anull
return value will cause the API (SearchApiOp
) to throwNullPointerException
.
-
executeQuery
void executeQuery(ObjectClass objectClass, T query, ResultsHandler handler, OperationOptions options)
ConnectorFacade calls this method once for each native query that thecreateFilterTranslator(ObjectClass, OperationOptions)
produces in response to theFilter
passed intoSearchApiOp.search(org.identityconnectors.framework.common.objects.ObjectClass, org.identityconnectors.framework.common.objects.filter.Filter, org.identityconnectors.framework.common.objects.ResultsHandler, org.identityconnectors.framework.common.objects.OperationOptions)
. If theFilterTranslator
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 handleroptions
- 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.
-
-