Package org.ldaptive.templates
Class SearchTemplatesOperation
java.lang.Object
org.ldaptive.templates.SearchTemplatesOperation
Searches an LDAP using a defined set of search templates. For each term count some number of templates are defined
and used for searching.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.slf4j.Logger
Logger for this class.private SearchOperationWorker
Search executor.private SearchTemplates[]
Search templates. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SearchTemplatesOperation
(SearchOperationWorker worker, SearchTemplates... templates) Creates a new search templates operation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes any resources associated with this object.protected SearchResponse
execute
(FilterTemplate[] templates, String[] returnAttrs, Integer fromResult, Integer toResult) Performs an LDAP search with the supplied templates and aggregates all the search results together.Applies the supplied query to a search templates and aggregates all results into a single search result.Returns the search operation worker.Returns the search templates.void
Sets the search operation worker.void
setSearchTemplates
(SearchTemplates[] templates) Sets the execute templates.toString()
-
Field Details
-
logger
protected final org.slf4j.Logger loggerLogger for this class. -
searchOperationWorker
Search executor. -
searchTemplates
Search templates.
-
-
Constructor Details
-
SearchTemplatesOperation
public SearchTemplatesOperation()Default constructor. -
SearchTemplatesOperation
Creates a new search templates operation.- Parameters:
worker
- search operation workertemplates
- search templates
-
-
Method Details
-
getSearchOperationWorker
Returns the search operation worker.- Returns:
- search operation worker
-
setSearchOperationWorker
Sets the search operation worker.- Parameters:
worker
- search operation worker
-
getSearchTemplates
Returns the search templates.- Returns:
- search templates
-
setSearchTemplates
Sets the execute templates.- Parameters:
templates
- execute templates
-
execute
Applies the supplied query to a search templates and aggregates all results into a single search result.- Parameters:
query
- to execute- Returns:
- ldap result
-
execute
protected SearchResponse execute(FilterTemplate[] templates, String[] returnAttrs, Integer fromResult, Integer toResult) Performs an LDAP search with the supplied templates and aggregates all the search results together.- Parameters:
templates
- to executereturnAttrs
- attributes to return from the searchfromResult
- index to return results fromtoResult
- index to return results to- Returns:
- ldap result containing all results
-
close
public void close()Closes any resources associated with this object. -
toString
-