public class SearchTemplates extends Object
Modifier and Type | Class and Description |
---|---|
class |
SearchTemplates.DefaultTermParser
Adds each term as a filter parameter using the name 'termX' where X is the index of the term.
|
class |
SearchTemplates.InitialTermParser
Adds the first letter of each term as a filter parameter using the name 'initialX' where X is the index of the
term.
|
static interface |
SearchTemplates.TermParser
Converts query terms into search filter parameters.
|
Constructor and Description |
---|
SearchTemplates(String... templates)
Creates a new search templates.
|
Modifier and Type | Method and Description |
---|---|
SearchFilter[] |
format(Query query)
Creates the search filters using configured templates and the supplied query.
|
String |
getSearchRestrictions()
Returns the filter to use for search restrictions.
|
SearchTemplates.TermParser[] |
getTermParsers()
Returns the term parsers used for creating filter parameters.
|
void |
setSearchRestrictions(String restrictions)
Sets the filter to use for search restrictions.
|
void |
setTermParsers(SearchTemplates.TermParser... parsers)
Sets the term parsers used for creating filter parameters.
|
String |
toString() |
public SearchTemplates(String... templates)
templates
- list of search filterspublic String getSearchRestrictions()
public void setSearchRestrictions(String restrictions)
restrictions
- search restrictionspublic SearchTemplates.TermParser[] getTermParsers()
public void setTermParsers(SearchTemplates.TermParser... parsers)
parsers
- term parserspublic SearchFilter[] format(Query query)
query
- to create search filter withCopyright © 2018. All rights reserved.