Package org.ldaptive.auth
Class SearchDnResolver.Builder
- java.lang.Object
-
- org.ldaptive.auth.SearchDnResolver.Builder
-
- Enclosing class:
- SearchDnResolver
public static class SearchDnResolver.Builder extends Object
Search DN resolver builder.
-
-
Field Summary
Fields Modifier and Type Field Description private SearchDnResolver
object
DN resolver to build.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchDnResolver.Builder
aliases(DerefAliases aliases)
Sets the deref aliases flag.SearchDnResolver.Builder
allowMultipleDns(boolean multipleDns)
Sets whether to allow multiple DNs.SearchDnResolver
build()
Returns the search DN resolver.SearchDnResolver.Builder
dn(String dn)
Sets the base DN.SearchDnResolver.Builder
factory(ConnectionFactory factory)
Sets the connection factory.SearchDnResolver.Builder
filter(String filter)
Sets the user filter.SearchDnResolver.Builder
filterParameters(Object... params)
Sets the user filter parameters.SearchDnResolver.Builder
freeze()
Makes this instance immutable.SearchDnResolver.Builder
resolveFromAttribute(String attributeName)
Sets the attribute to use to resolve the DN.SearchDnResolver.Builder
subtreeSearch(boolean b)
Sets whether to perform a subtree search or a onelevel search.
-
-
-
Field Detail
-
object
private final SearchDnResolver object
DN resolver to build.
-
-
Method Detail
-
freeze
public SearchDnResolver.Builder freeze()
Makes this instance immutable.- Returns:
- this builder
-
factory
public SearchDnResolver.Builder factory(ConnectionFactory factory)
Sets the connection factory.- Parameters:
factory
- connection factory- Returns:
- this builder
-
dn
public SearchDnResolver.Builder dn(String dn)
Sets the base DN.- Parameters:
dn
- base DN- Returns:
- this builder
-
filter
public SearchDnResolver.Builder filter(String filter)
Sets the user filter.- Parameters:
filter
- suer filter- Returns:
- this builder
-
filterParameters
public SearchDnResolver.Builder filterParameters(Object... params)
Sets the user filter parameters.- Parameters:
params
- filter parameters- Returns:
- this builder
-
allowMultipleDns
public SearchDnResolver.Builder allowMultipleDns(boolean multipleDns)
Sets whether to allow multiple DNs.- Parameters:
multipleDns
- whether to allow multiple DNs- Returns:
- this builder
-
subtreeSearch
public SearchDnResolver.Builder subtreeSearch(boolean b)
Sets whether to perform a subtree search or a onelevel search.- Parameters:
b
- whether to perform a subtree search or a onelevel search- Returns:
- this builder
-
aliases
public SearchDnResolver.Builder aliases(DerefAliases aliases)
Sets the deref aliases flag.- Parameters:
aliases
- deref aliases- Returns:
- this builder
-
resolveFromAttribute
public SearchDnResolver.Builder resolveFromAttribute(String attributeName)
Sets the attribute to use to resolve the DN.- Parameters:
attributeName
- attribute name- Returns:
- this builder
-
build
public SearchDnResolver build()
Returns the search DN resolver.- Returns:
- search DN resolver
-
-