org.ldaptive.provider.netscape
Class NetscapeConnection.AbstractNetscapeSearch

java.lang.Object
  extended by org.ldaptive.provider.netscape.NetscapeConnection.AbstractNetscapeSearch
Direct Known Subclasses:
NetscapeConnection.NetscapeAsyncSearchListener, NetscapeConnection.NetscapeSearchIterator
Enclosing class:
NetscapeConnection

protected abstract class NetscapeConnection.AbstractNetscapeSearch
extends Object

Common search functionality for netscape iterators and listeners.


Field Summary
protected  org.ldaptive.SearchRequest request
          Search request.
protected  NetscapeUtils util
          Utility class.
 
Constructor Summary
NetscapeConnection.AbstractNetscapeSearch(org.ldaptive.SearchRequest sr)
          Creates a new abstract netscape search.
 
Method Summary
protected  int getDereference(org.ldaptive.DerefAliases da)
          Returns the netscape deference policy for the supplied deref aliases.
protected  netscape.ldap.LDAPSearchConstraints getLDAPSearchConstraints(org.ldaptive.SearchRequest sr)
          Returns a netscape search request object configured with the supplied search request.
protected  int getSearchScope(org.ldaptive.SearchScope ss)
          Returns the netscape search scope for the supplied search scope.
protected  org.ldaptive.ResultCode ignoreSearchException(org.ldaptive.ResultCode[] ignoreResultCodes, netscape.ldap.LDAPException e)
          Determines whether the supplied ldap exception should be ignored.
protected  org.ldaptive.provider.SearchItem processLDAPSearchResult(netscape.ldap.LDAPSearchResult res)
          Processes the response controls on the supplied result and returns a corresponding search item.
protected  org.ldaptive.provider.SearchItem processLDAPSearchResultReference(netscape.ldap.LDAPSearchResultReference ref)
          Processes the response controls on the supplied reference and returns a corresponding search item.
protected  netscape.ldap.LDAPSearchListener search(netscape.ldap.LDAPConnection conn, org.ldaptive.SearchRequest sr)
          Executes an ldap search.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

protected final org.ldaptive.SearchRequest request
Search request.


util

protected final NetscapeUtils util
Utility class.

Constructor Detail

NetscapeConnection.AbstractNetscapeSearch

public NetscapeConnection.AbstractNetscapeSearch(org.ldaptive.SearchRequest sr)
Creates a new abstract netscape search.

Parameters:
sr - search request
Method Detail

search

protected netscape.ldap.LDAPSearchListener search(netscape.ldap.LDAPConnection conn,
                                                  org.ldaptive.SearchRequest sr)
                                           throws netscape.ldap.LDAPException
Executes an ldap search.

Parameters:
conn - to search with
sr - to read properties from
Returns:
ldap search results
Throws:
netscape.ldap.LDAPException - if an error occurs

getLDAPSearchConstraints

protected netscape.ldap.LDAPSearchConstraints getLDAPSearchConstraints(org.ldaptive.SearchRequest sr)
                                                                throws netscape.ldap.LDAPException
Returns a netscape search request object configured with the supplied search request.

Parameters:
sr - search request containing configuration to create netscape search request
Returns:
search request
Throws:
netscape.ldap.LDAPException - if the search request cannot be initialized

getSearchScope

protected int getSearchScope(org.ldaptive.SearchScope ss)
Returns the netscape search scope for the supplied search scope.

Parameters:
ss - search scope
Returns:
netscape search scope

getDereference

protected int getDereference(org.ldaptive.DerefAliases da)
Returns the netscape deference policy for the supplied deref aliases.

Parameters:
da - deref aliases
Returns:
netscape deref constant

ignoreSearchException

protected org.ldaptive.ResultCode ignoreSearchException(org.ldaptive.ResultCode[] ignoreResultCodes,
                                                        netscape.ldap.LDAPException e)
Determines whether the supplied ldap exception should be ignored.

Parameters:
ignoreResultCodes - to match against the exception
e - ldap exception to match
Returns:
result code that should be ignored or null

processLDAPSearchResult

protected org.ldaptive.provider.SearchItem processLDAPSearchResult(netscape.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 org.ldaptive.provider.SearchItem processLDAPSearchResultReference(netscape.ldap.LDAPSearchResultReference ref)
Processes the response controls on the supplied reference and returns a corresponding search item.

Parameters:
ref - to process
Returns:
search item


Copyright © 2003-2016 Virginia Tech. All Rights Reserved.