Package org.ldaptive.filter
Class FilterParser
- java.lang.Object
-
- org.ldaptive.filter.FilterParser
-
public final class FilterParser extends Object
Encapsulates aFilterFunction
and exposes a convenience static method for parsing filters. The filter function used by this class can be set using the system propertyFILTER_FUNCTION_PROPERTY
.
-
-
Field Summary
Fields Modifier and Type Field Description private static FilterFunction
FILTER_FUNCTION
Default filter function.private static Constructor<?>
FILTER_FUNCTION_CONSTRUCTOR
Custom filter parser constructor.private static String
FILTER_FUNCTION_PROPERTY
Ldap filter function system property.private static Logger
LOGGER
Logger for this class.
-
Constructor Summary
Constructors Modifier Constructor Description private
FilterParser()
Default constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FilterFunction
getFilterFunction()
TheFILTER_FUNCTION_PROPERTY
property is checked and that class is loaded if provided.static Filter
parse(String filter)
Parse the supplied filter string.
-
-
-
Field Detail
-
FILTER_FUNCTION_PROPERTY
private static final String FILTER_FUNCTION_PROPERTY
Ldap filter function system property.- See Also:
- Constant Field Values
-
LOGGER
private static final Logger LOGGER
Logger for this class.
-
FILTER_FUNCTION
private static final FilterFunction FILTER_FUNCTION
Default filter function.
-
FILTER_FUNCTION_CONSTRUCTOR
private static final Constructor<?> FILTER_FUNCTION_CONSTRUCTOR
Custom filter parser constructor.
-
-
Method Detail
-
getFilterFunction
public static FilterFunction getFilterFunction()
TheFILTER_FUNCTION_PROPERTY
property is checked and that class is loaded if provided. Otherwise theDefaultFilterFunction
is returned.- Returns:
- default filter function
-
parse
public static Filter parse(String filter) throws FilterParseException
Parse the supplied filter string.- Parameters:
filter
- to parse- Returns:
- search filter
- Throws:
FilterParseException
- if filter is invalid
-
-