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 LoggerLogger for this class.private SearchOperationWorkerSearch executor.private SearchTemplates[]Search templates. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SearchTemplatesOperation(SearchOperationWorker worker, SearchTemplates... templates) Creates a new search templates operation. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes any resources associated with this object.protected SearchResponseexecute(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.voidSets the search operation worker.voidsetSearchTemplates(SearchTemplates[] templates) Sets the search templates.toString()
-
Field Details
-
logger
Logger 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 search templates.- Parameters:
templates- search 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
-