public class SearchFilterQuery extends java.lang.Object implements ParametersCallback
When execute(String)
is called a virtual
row set based on search results
is produced.
The SearchResult.getAttributes()
produces
columns for a virtual row. The virtual row also contains dn
and rdn
columns representing a found entry DN and a relative DN respectively.
Constructor and Description |
---|
SearchFilterQuery(LdapConnection connection,
ParametersCallback parameters,
QueryCallback queryCallback)
Instantiates an LDAP query.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(java.lang.String filter)
Runs a search specified by filter on a
connection . |
java.lang.Object |
getParameter(java.lang.String name)
Returns the value of parameter specified by name.
|
protected javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> |
query(LdapConnection connection,
java.lang.String filter) |
public SearchFilterQuery(LdapConnection connection, ParametersCallback parameters, QueryCallback queryCallback)
connection
- ldap connection.parameters
- parent parameters callback to get unresolved variables from.queryCallback
- query callback to notify for search results.public java.lang.Object getParameter(java.lang.String name)
ParametersCallback
The callback internally delegates a call to parent callbacks if the parameter cannot be found.
getParameter
in interface ParametersCallback
name
- parameter name. Providers are allowed (but not required) to ignore a case of the name parameter
to comply with their internal model. For example JDBC drivers are case-insensitive to column names.public void execute(java.lang.String filter)
connection
.
For each search result QueryCallback.processRow(scriptella.spi.ParametersCallback)
is called.
filter
- search filter according to RFC 2254DirContext.search(javax.naming.Name, String, javax.naming.directory.SearchControls)
protected javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> query(LdapConnection connection, java.lang.String filter) throws javax.naming.NamingException
javax.naming.NamingException
Copyright © Copyright 2006-2019 The Scriptella Project Team.