|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.auth.AbstractSearchOperationFactory
org.ldaptive.auth.AbstractSearchDnResolver
public abstract class AbstractSearchDnResolver
Base implementation for search dn resolvers.
| Field Summary |
|---|
| Fields inherited from class org.ldaptive.auth.AbstractSearchOperationFactory |
|---|
logger |
| Constructor Summary | |
|---|---|
AbstractSearchDnResolver()
|
|
| Method Summary | |
|---|---|
protected SearchFilter |
createSearchFilter(String user)
Returns a search filter using userFilter and userFilterParameters. |
protected SearchRequest |
createSearchRequest(SearchFilter filter)
Returns a search request for searching for a single entry in an LDAP, returning no attributes. |
boolean |
getAllowMultipleDns()
Returns whether DN resolution should fail if multiple DNs are found. |
String |
getBaseDn()
Returns the base DN. |
protected abstract Connection |
getConnection()
Retrieve a connection that is ready for use. |
DerefAliases |
getDerefAliases()
Returns how to dereference aliases. |
boolean |
getFollowReferrals()
Returns whether to follow referrals. |
boolean |
getSubtreeSearch()
Returns whether subtree searching will be used. |
String |
getUserFilter()
Returns the filter used to search for the user. |
Object[] |
getUserFilterParameters()
Returns the filter parameters used to search for the user. |
protected SearchResult |
performLdapSearch(SearchFilter filter)
Executes the ldap search operation with the supplied filter. |
String |
resolve(String user)
Attempts to find the DN for the supplied user. |
protected String |
resolveDn(LdapEntry entry)
Returns the DN for the supplied ldap entry. |
void |
setAllowMultipleDns(boolean b)
Sets whether DN resolution should fail if multiple DNs are found. |
void |
setBaseDn(String dn)
Sets the base DN. |
void |
setDerefAliases(DerefAliases da)
Sets how to dereference aliases. |
void |
setFollowReferrals(boolean b)
Sets whether to follow referrals. |
void |
setSubtreeSearch(boolean b)
Sets whether subtree searching will be used. |
void |
setUserFilter(String filter)
Sets the filter used to search for the user. |
void |
setUserFilterParameters(Object[] filterParams)
Sets the filter parameters used to search for the user. |
| Methods inherited from class org.ldaptive.auth.AbstractSearchOperationFactory |
|---|
createSearchOperation, getSearchCache, getSearchExceptionHandler, getSearchResponseHandlers, setSearchCache, setSearchExceptionHandler, setSearchResponseHandlers |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractSearchDnResolver()
| Method Detail |
|---|
public String getBaseDn()
public void setBaseDn(String dn)
dn - base DNpublic String getUserFilter()
public void setUserFilter(String filter)
filter - for searchingpublic Object[] getUserFilterParameters()
public void setUserFilterParameters(Object[] filterParams)
filterParams - filter parameterspublic boolean getAllowMultipleDns()
public void setAllowMultipleDns(boolean b)
resolve(String) finds more than one
DN matching it's filter. Otherwise the first DN found is returned.
b - whether multiple DNs are allowedpublic boolean getSubtreeSearch()
public void setSubtreeSearch(boolean b)
getBaseDn().
Otherwise the DN will be searched for in the getBaseDn() context.
b - whether the DN will be searched for over the entire basepublic DerefAliases getDerefAliases()
public void setDerefAliases(DerefAliases da)
da - how to dereference aliasespublic boolean getFollowReferrals()
public void setFollowReferrals(boolean b)
b - whether to follow referrals
public String resolve(String user)
throws LdapException
getUserFilter() is
used to look up the DN. The user is provided as the 'user' variable filter
parameter. If more than one entry matches the search, the result is
controlled by setAllowMultipleDns(boolean).
resolve in interface DnResolveruser - to find DN for
LdapException - if the entry resolution failsprotected String resolveDn(LdapEntry entry)
entry - to retrieve the DN from
protected SearchFilter createSearchFilter(String user)
userFilter and userFilterParameters. The user parameter is injected as a named parameter
of 'user'.
user - identifier
protected SearchRequest createSearchRequest(SearchFilter filter)
filter - to execute
protected SearchResult performLdapSearch(SearchFilter filter)
throws LdapException
filter - to execute
LdapException - if an error occurs
protected abstract Connection getConnection()
throws LdapException
LdapException - if an error occurs opening the connection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||