Package org.ldaptive.provider.jldap
Class JLdapConnection.AbstractJLdapSearch
- java.lang.Object
-
- org.ldaptive.provider.jldap.JLdapConnection.AbstractJLdapSearch
-
- Direct Known Subclasses:
JLdapConnection.JLdapAsyncSearchListener,JLdapConnection.JLdapSearchIterator
- Enclosing class:
- JLdapConnection
protected abstract class JLdapConnection.AbstractJLdapSearch extends Object
Common search functionality for jldap iterators and listeners.
-
-
Field Summary
Fields Modifier and Type Field Description protected SearchRequestrequestSearch request.protected JLdapUtilsutilUtility class.
-
Constructor Summary
Constructors Constructor Description AbstractJLdapSearch(SearchRequest sr)Creates a new abstract jldap search.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.novell.ldap.LDAPSearchConstraintsgetLDAPSearchConstraints(SearchRequest sr)Returns an ldap search constraints object configured with the supplied search request.protected intgetSearchScope(SearchScope ss)Returns the jldap integer constant for the supplied search scope.protected ResultCodeignoreSearchException(ResultCode[] ignoreResultCodes, com.novell.ldap.LDAPException e)Determines whether the supplied ldap exception should be ignored.protected SearchItemprocessLDAPIntermediateResponse(com.novell.ldap.LDAPIntermediateResponse res)Processes the response controls on the supplied response and returns a corresponding search item.protected SearchItemprocessLDAPSearchResult(com.novell.ldap.LDAPSearchResult res)Processes the response controls on the supplied result and returns a corresponding search item.protected SearchItemprocessLDAPSearchResultReference(com.novell.ldap.LDAPSearchResultReference ref)Processes the response controls on the supplied reference and returns a corresponding search item.protected com.novell.ldap.LDAPSearchQueuesearch(com.novell.ldap.LDAPConnection conn, SearchRequest sr)Executes an ldap search.
-
-
-
Field Detail
-
request
protected final SearchRequest request
Search request.
-
util
protected final JLdapUtils util
Utility class.
-
-
Constructor Detail
-
AbstractJLdapSearch
public AbstractJLdapSearch(SearchRequest sr)
Creates a new abstract jldap search.- Parameters:
sr- search request
-
-
Method Detail
-
search
protected com.novell.ldap.LDAPSearchQueue search(com.novell.ldap.LDAPConnection conn, SearchRequest sr) throws com.novell.ldap.LDAPExceptionExecutes an ldap search.- Parameters:
conn- to search withsr- to read properties from- Returns:
- ldap search queue
- Throws:
com.novell.ldap.LDAPException- if an error occurs
-
getSearchScope
protected int getSearchScope(SearchScope ss)
Returns the jldap integer constant for the supplied search scope.- Parameters:
ss- search scope- Returns:
- integer constant
-
getLDAPSearchConstraints
protected com.novell.ldap.LDAPSearchConstraints getLDAPSearchConstraints(SearchRequest sr)
Returns an ldap search constraints object configured with the supplied search request.- Parameters:
sr- search request containing configuration to create search constraints- Returns:
- ldap search constraints
-
ignoreSearchException
protected ResultCode ignoreSearchException(ResultCode[] ignoreResultCodes, com.novell.ldap.LDAPException e)
Determines whether the supplied ldap exception should be ignored.- Parameters:
ignoreResultCodes- to match against the exceptione- ldap exception to match- Returns:
- result code that should be ignored or null
-
processLDAPSearchResult
protected SearchItem processLDAPSearchResult(com.novell.ldap.LDAPSearchResult res)
Processes the response controls on the supplied result and returns a corresponding search item.- Parameters:
res- to process- Returns:
- search item
-
processLDAPSearchResultReference
protected SearchItem processLDAPSearchResultReference(com.novell.ldap.LDAPSearchResultReference ref)
Processes the response controls on the supplied reference and returns a corresponding search item.- Parameters:
ref- to process- Returns:
- search item
-
processLDAPIntermediateResponse
protected SearchItem processLDAPIntermediateResponse(com.novell.ldap.LDAPIntermediateResponse res)
Processes the response controls on the supplied response and returns a corresponding search item.- Parameters:
res- to process- Returns:
- search item
-
-