|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.provider.jndi.JndiConnection.JndiSearchIterator
protected class JndiConnection.JndiSearchIterator
Search iterator for JNDI naming enumeration.
| Constructor Summary | |
|---|---|
JndiConnection.JndiSearchIterator(SearchRequest sr)
Creates a new jndi search iterator. |
|
| Method Summary | |
|---|---|
void |
close()
Close any resources associated with this iterator. |
protected String |
formatDn(SearchResult sr,
String baseDn)
Returns a fully-qualified DN for the supplied search result. |
Response<Void> |
getResponse()
Returns the response data associated with this search or null if this iterator has more ldap entries to return. |
protected SearchControls |
getSearchControls(SearchRequest sr)
Returns a search controls object configured with the supplied search request. |
protected String |
getSearchDn(LdapContext ctx,
SearchRequest sr)
Determines the DN of the supplied search request. |
protected int |
getSearchScope(SearchScope ss)
Returns the jndi integer constant for the supplied search scope. |
boolean |
hasNext()
Returns true if the iteration has more elements. |
protected ResultCode |
ignoreSearchException(ResultCode[] ignoreResultCodes,
NamingException e)
Determines whether the supplied naming exception should be ignored. |
void |
initialize()
Initializes this jndi search iterator. |
protected void |
initializeSearchContext(LdapContext ctx,
SearchRequest sr)
Adds any additional environment properties found in the supplied request to the supplied context. |
SearchItem |
next()
Returns the next element in the iteration. |
protected String |
readCompositeName(String s)
Uses a composite name to parse the supplied string. |
protected String[] |
readReferralUrls(LdapReferralException refEx)
Reads all referral URLs associated with this exception by invoking the search operation on the referral context until all referrals have been read. |
protected NamingEnumeration<SearchResult> |
search(LdapContext ctx,
SearchRequest sr)
Executes DirContext.search( javax.naming.Name, String, Object[],
SearchControls). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JndiConnection.JndiSearchIterator(SearchRequest sr)
sr - search request| Method Detail |
|---|
public void initialize()
throws LdapException
LdapException - if an error occurs
protected void initializeSearchContext(LdapContext ctx,
SearchRequest sr)
throws NamingException
ctx - to initialize for searchingsr - to read properties from
NamingException - if a property cannot be added to the context
protected NamingEnumeration<SearchResult> search(LdapContext ctx,
SearchRequest sr)
throws NamingException
DirContext.search( javax.naming.Name, String, Object[],
SearchControls).
ctx - to searchsr - to read properties from
NamingException - if an error occursprotected SearchControls getSearchControls(SearchRequest sr)
sr - search request containing configuration to create search
controls
protected int getSearchScope(SearchScope ss)
ss - search scope
public boolean hasNext()
throws LdapException
hasNext in interface SearchIteratorLdapException - if an error occurs
public SearchItem next()
throws LdapException
next in interface SearchIteratorLdapException - if an error occurs
protected ResultCode ignoreSearchException(ResultCode[] ignoreResultCodes,
NamingException e)
ignoreResultCodes - to match against the exceptione - naming exception to match
protected String[] readReferralUrls(LdapReferralException refEx)
refEx - to read URLs from
public Response<Void> getResponse()
getResponse in interface SearchIterator
protected String getSearchDn(LdapContext ctx,
SearchRequest sr)
throws NamingException
Context.getNameInNamespace() if it is available, otherwise returns
SearchRequest.getBaseDn().
ctx - ldap context the search was performed onsr - search request
NamingException - if an error occurs
protected String formatDn(SearchResult sr,
String baseDn)
throws NamingException
NameClassPair.getNameInNamespace(). Otherwise the behavior is controlled
by JndiProviderConfig.getRemoveDnUrls().
sr - to determine DN forbaseDn - that search was performed on
NamingException - if search result name cannot be formatted as a
DN
protected String readCompositeName(String s)
throws InvalidNameException
s - composite name to read
InvalidNameException - if the supplied string is not a valid
composite name
public void close()
throws LdapException
close in interface SearchIteratorLdapException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||