Class SearchTemplatesOperation


  • public class SearchTemplatesOperation
    extends java.lang.Object
    Searches 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 Detail

      • logger

        protected final org.slf4j.Logger logger
        Logger for this class.
    • Constructor Detail

      • SearchTemplatesOperation

        public SearchTemplatesOperation()
        Default constructor.
      • SearchTemplatesOperation

        public SearchTemplatesOperation​(SearchOperationWorker worker,
                                        SearchTemplates... templates)
        Creates a new search templates operation.
        Parameters:
        worker - search operation worker
        templates - 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 execute
        returnAttrs - attributes to return from the search
        fromResult - index to return results from
        toResult - 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:
        toString in class java.lang.Object