Package org.ldaptive.templates
Class SearchTemplatesOperation
- java.lang.Object
-
- org.ldaptive.templates.SearchTemplatesOperation
-
public class SearchTemplatesOperation extends java.lang.ObjectSearches an LDAP using a defined set of search templates. For each term count some number of templates are defined and used for searching.- Author:
- Middleware Services
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.LoggerloggerLogger for this class.
-
Constructor Summary
Constructors Constructor Description SearchTemplatesOperation()Default constructor.SearchTemplatesOperation(SearchOperationWorker worker, SearchTemplates... templates)Creates a new search templates operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes any resources associated with this object.protected SearchResponseexecute(FilterTemplate[] templates, java.lang.String[] returnAttrs, java.lang.Integer fromResult, java.lang.Integer toResult)Performs an LDAP search with the supplied templates and aggregates all the search results together.SearchResponseexecute(Query query)Applies the supplied query to a search templates and aggregates all results into a single search result.SearchOperationWorkergetSearchOperationWorker()Returns the search operation worker.SearchTemplates[]getSearchTemplates()Returns the search templates.voidsetSearchOperationWorker(SearchOperationWorker worker)Sets the search operation worker.voidsetSearchTemplates(SearchTemplates[] templates)Sets the execute templates.java.lang.StringtoString()
-
-
-
Constructor Detail
-
SearchTemplatesOperation
public SearchTemplatesOperation()
Default constructor.
-
SearchTemplatesOperation
public SearchTemplatesOperation(SearchOperationWorker worker, SearchTemplates... templates)
Creates a new search templates operation.- Parameters:
worker- search operation workertemplates- search templates
-
-
Method Detail
-
getSearchOperationWorker
public SearchOperationWorker getSearchOperationWorker()
Returns the search operation worker.- Returns:
- search operation worker
-
setSearchOperationWorker
public void setSearchOperationWorker(SearchOperationWorker worker)
Sets the search operation worker.- Parameters:
worker- search operation worker
-
getSearchTemplates
public SearchTemplates[] getSearchTemplates()
Returns the search templates.- Returns:
- search templates
-
setSearchTemplates
public void setSearchTemplates(SearchTemplates[] templates)
Sets the execute templates.- Parameters:
templates- execute templates
-
execute
public SearchResponse execute(Query query)
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, java.lang.String[] returnAttrs, java.lang.Integer fromResult, java.lang.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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-