Class SearchTemplates


  • public class SearchTemplates
    extends java.lang.Object
    Contains a list of common search filter templates that can be formatted for any given query.
    Author:
    Middleware Services
    • Constructor Detail

      • SearchTemplates

        public SearchTemplates​(java.lang.String... templates)
        Creates a new search templates.
        Parameters:
        templates - list of search filters
    • Method Detail

      • getSearchRestrictions

        public java.lang.String getSearchRestrictions()
        Returns the filter to use for search restrictions.
        Returns:
        search restrictions
      • setSearchRestrictions

        public void setSearchRestrictions​(java.lang.String restrictions)
        Sets the filter to use for search restrictions.
        Parameters:
        restrictions - search restrictions
      • getTermParsers

        public SearchTemplates.TermParser[] getTermParsers()
        Returns the term parsers used for creating filter parameters.
        Returns:
        term parsers
      • setTermParsers

        public void setTermParsers​(SearchTemplates.TermParser... parsers)
        Sets the term parsers used for creating filter parameters.
        Parameters:
        parsers - term parsers
      • format

        public FilterTemplate[] format​(Query query)
        Creates the filter templates using configured templates and the supplied query.
        Parameters:
        query - to create search filter with
        Returns:
        filter templates
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object