Package org.ldaptive.templates
Class SearchTemplates.InitialTermParser
- java.lang.Object
-
- org.ldaptive.templates.SearchTemplates.InitialTermParser
-
- All Implemented Interfaces:
SearchTemplates.TermParser
- Enclosing class:
- SearchTemplates
public static class SearchTemplates.InitialTermParser extends Object implements SearchTemplates.TermParser
Adds the first letter of each term as a filter parameter using the name 'initialX' where X is the index of the term. For the argument: {'fname', 'lname' }, produces:{ 'initial1' => 'f', 'initial2' => 'l', }
-
-
Constructor Summary
Constructors Constructor Description InitialTermParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String[]
getInitials(String[] names)
This converts an array of names into an array of initials.Map<String,String>
parse(String[] terms)
Returns search filter parameters for the supplied query terms.
-
-
-
Method Detail
-
parse
public Map<String,String> parse(String[] terms)
Description copied from interface:SearchTemplates.TermParser
Returns search filter parameters for the supplied query terms.- Specified by:
parse
in interfaceSearchTemplates.TermParser
- Parameters:
terms
- to parse- Returns:
- search filter parameters
-
-