public class LdapConnectionTemplate extends Object implements LdapConnectionOperations, ModelFactory
| Constructor and Description |
|---|
LdapConnectionTemplate(LdapConnectionPool connectionPool)
Creates a new instance of LdapConnectionTemplate.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.directory.api.ldap.model.message.AddResponse |
add(org.apache.directory.api.ldap.model.message.AddRequest addRequest)
Adds an entry specified by an AddRequest to the LDAP server.
|
org.apache.directory.api.ldap.model.message.AddResponse |
add(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.entry.Attribute... attributes)
Adds an entry specified by a Dn and an array of Attribute's to the LDAP
server.
|
org.apache.directory.api.ldap.model.message.AddResponse |
add(org.apache.directory.api.ldap.model.name.Dn dn,
RequestBuilder<org.apache.directory.api.ldap.model.message.AddRequest> requestBuilder)
Adds an entry specified by a Dn, to be filled out by a RequestBuilder,
to the LDAP server.
|
PasswordWarning |
authenticate(org.apache.directory.api.ldap.model.name.Dn userDn,
char[] password)
Attempts to authenticate the supplied credentials.
|
PasswordWarning |
authenticate(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
char[] password)
Attempts to authenticate the supplied credentials against the first
entry found matching the search criteria.
|
PasswordWarning |
authenticate(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest,
char[] password)
Attempts to authenticate the supplied credentials against the first
entry found matching the search criteria.
|
PasswordWarning |
authenticate(String baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
char[] password)
Attempts to authenticate the supplied credentials against the first
entry found matching the search criteria.
|
org.apache.directory.api.ldap.model.message.DeleteResponse |
delete(org.apache.directory.api.ldap.model.message.DeleteRequest deleteRequest)
Deletes an entry specified by a DeleteRequest from the LDAP server.
|
org.apache.directory.api.ldap.model.message.DeleteResponse |
delete(org.apache.directory.api.ldap.model.name.Dn dn)
Deletes an entry specified by Dn from the LDAP server.
|
org.apache.directory.api.ldap.model.message.DeleteResponse |
delete(org.apache.directory.api.ldap.model.name.Dn dn,
RequestBuilder<org.apache.directory.api.ldap.model.message.DeleteRequest> requestBuilder)
Deletes an entry specified by Dn, and whose request is configured
by a RequestBuilder, from the LDAP server.
|
<T> T |
execute(ConnectionCallback<T> connectionCallback)
Executes the
connectionCallback, supplying it a managed
connection. |
<T> T |
lookup(org.apache.directory.api.ldap.model.name.Dn dn,
EntryMapper<T> entryMapper)
Performs a lookup, and supplies the matching entry to the
entryMapper. |
<T> T |
lookup(org.apache.directory.api.ldap.model.name.Dn dn,
String[] attributes,
EntryMapper<T> entryMapper)
Performs a lookup, requesting
attributes, and supplies
the matching entry to the entryMapper. |
org.apache.directory.api.ldap.model.message.ModifyResponse |
modify(org.apache.directory.api.ldap.model.name.Dn dn,
RequestBuilder<org.apache.directory.api.ldap.model.message.ModifyRequest> requestBuilder)
Modifies an entry specified by Dn, and whose request is configured
by a RequestBuilder, on the LDAP server.
|
org.apache.directory.api.ldap.model.message.ModifyResponse |
modify(org.apache.directory.api.ldap.model.message.ModifyRequest modifyRequest)
Modifies an entry specified by a ModifyRequest on the LDAP server.
|
void |
modifyPassword(org.apache.directory.api.ldap.model.name.Dn userDn,
char[] newPassword)
Modifies the password for
userDn to
newPassword using the admin account. |
void |
modifyPassword(org.apache.directory.api.ldap.model.name.Dn userDn,
char[] oldPassword,
char[] newPassword)
Modifies the password for
userDn from
oldPassword to newPassword. |
void |
modifyPassword(org.apache.directory.api.ldap.model.name.Dn userDn,
char[] oldPassword,
char[] newPassword,
boolean asAdmin)
Modifies the password for
userDn from
oldPassword to newPassword, optionally using
an admin account. |
org.apache.directory.api.ldap.model.message.AddRequest |
newAddRequest(org.apache.directory.api.ldap.model.entry.Entry entry)
Returns a new
AddRequest for the entry. |
org.apache.directory.api.ldap.model.entry.Attribute |
newAttribute(String name)
Returns a new Attribute for with the provided
name and
a null value. |
org.apache.directory.api.ldap.model.entry.Attribute |
newAttribute(String name,
byte[]... values)
Returns a new Attribute for with the provided
name and
value(s). |
org.apache.directory.api.ldap.model.entry.Attribute |
newAttribute(String name,
String... values)
Returns a new Attribute for with the provided
name and
value(s). |
org.apache.directory.api.ldap.model.entry.Attribute |
newAttribute(String name,
org.apache.directory.api.ldap.model.entry.Value<?>... values)
Returns a new Attribute for with the provided
name and
value(s). |
org.apache.directory.api.ldap.model.message.DeleteRequest |
newDeleteRequest(org.apache.directory.api.ldap.model.name.Dn dn)
Returns a new
DeleteRequest for the dn. |
org.apache.directory.api.ldap.model.name.Dn |
newDn(String dn)
Returns a
Dn that represents dn. |
org.apache.directory.api.ldap.model.entry.Entry |
newEntry(org.apache.directory.api.ldap.model.name.Dn dn)
Returns a
Entry with the specified dn. |
org.apache.directory.api.ldap.model.entry.Entry |
newEntry(String dn)
Returns a
Entry with the specified dn. |
org.apache.directory.api.ldap.model.message.ModifyRequest |
newModifyRequest(org.apache.directory.api.ldap.model.name.Dn dn)
Returns a new
ModifyRequest for the dn. |
org.apache.directory.api.ldap.model.message.ModifyRequest |
newModifyRequest(String dn)
Returns a new
ModifyRequest for the dn. |
org.apache.directory.api.ldap.model.message.SearchRequest |
newSearchRequest(org.apache.directory.api.ldap.model.name.Dn baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope)
Returns a new
SearchRequest over baseDn in
scope matching filter returning
all normal attributes for each matching entry. |
org.apache.directory.api.ldap.model.message.SearchRequest |
newSearchRequest(org.apache.directory.api.ldap.model.name.Dn baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String... attributes)
Returns a new
SearchRequest over baseDn in
scope matching filter returning
attributes for each matching entry. |
org.apache.directory.api.ldap.model.message.SearchRequest |
newSearchRequest(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope)
Returns a new
SearchRequest over baseDn in
scope matching filter returning
all normal attributes for each matching entry. |
org.apache.directory.api.ldap.model.message.SearchRequest |
newSearchRequest(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String... attributes)
Returns a new
SearchRequest over baseDn in
scope matching filter returning
attributes for each matching entry. |
org.apache.directory.api.ldap.model.message.SearchRequest |
newSearchRequest(String baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope)
Returns a new
SearchRequest over baseDn in
scope matching filter returning
all normal attributes for each matching entry. |
org.apache.directory.api.ldap.model.message.SearchRequest |
newSearchRequest(String baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String... attributes)
Returns a new
SearchRequest over baseDn in
scope matching filter returning
attributes for each matching entry. |
org.apache.directory.api.ldap.model.message.SearchRequest |
newSearchRequest(String baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope)
Returns a new
SearchRequest over baseDn in
scope matching filter returning
all normal attributes for each matching entry. |
org.apache.directory.api.ldap.model.message.SearchRequest |
newSearchRequest(String baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String... attributes)
Returns a new
SearchRequest over baseDn in
scope matching filter returning
attributes for each matching entry. |
<T extends org.apache.directory.api.ldap.model.message.ResultResponse> |
responseOrException(T response)
Checks the supplied response for its result code, and if not
ResultCodeEnum#SUCCESS, an exception is thrown. |
<T> List<T> |
search(org.apache.directory.api.ldap.model.name.Dn baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
EntryMapper<T> entryMapper)
Searches for the entries matching the supplied criteria, feeding the
result into the
entryMapper. |
<T> List<T> |
search(org.apache.directory.api.ldap.model.name.Dn baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String[] attributes,
EntryMapper<T> entryMapper)
Searches for the entries matching the supplied criteria, feeding the
result into the
entryMapper, querying only the requested
attributes. |
<T> List<T> |
search(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
EntryMapper<T> entryMapper)
Searches for the entries matching the supplied criteria, feeding the
result into the
entryMapper. |
<T> List<T> |
search(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String[] attributes,
EntryMapper<T> entryMapper)
Searches for the entries matching the supplied criteria, feeding the
result into the
entryMapper, querying only the requested
attributes. |
<T> List<T> |
search(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest,
EntryMapper<T> entryMapper)
Searches for the entries matching the supplied
searchRequest, feeding the result into the
entryMapper. |
<T> List<T> |
search(String baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
EntryMapper<T> entryMapper)
Searches for the entries matching the supplied criteria, feeding the
result into the
entryMapper. |
<T> List<T> |
search(String baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String[] attributes,
EntryMapper<T> entryMapper)
Searches for the entries matching the supplied criteria, feeding the
result into the
entryMapper, querying only the requested
attributes. |
<T> List<T> |
search(String baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
EntryMapper<T> entryMapper)
Searches for the entries matching the supplied criteria, feeding the
result into the
entryMapper. |
<T> List<T> |
search(String baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String[] attributes,
EntryMapper<T> entryMapper)
Searches for the entries matching the supplied criteria, feeding the
result into the
entryMapper, querying only the requested
attributes. |
<T> T |
searchFirst(org.apache.directory.api.ldap.model.name.Dn baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
EntryMapper<T> entryMapper)
Searches for the first entry matching the supplied criteria, feeding the
result into the
entryMapper. |
<T> T |
searchFirst(org.apache.directory.api.ldap.model.name.Dn baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String[] attributes,
EntryMapper<T> entryMapper)
Searches for the first entry matching the supplied criteria, feeding the
result into the
entryMapper, querying only the requested
attributes. |
<T> T |
searchFirst(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
EntryMapper<T> entryMapper)
Searches for the first entry matching the supplied criteria, feeding the
result into the
entryMapper. |
<T> T |
searchFirst(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String[] attributes,
EntryMapper<T> entryMapper)
Searches for the first entry matching the supplied criteria, feeding the
result into the
entryMapper, querying only the requested
attributes. |
<T> T |
searchFirst(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest,
EntryMapper<T> entryMapper)
Searches for the first entry matching the supplied
searchRequest, feeding the result into the
entryMapper. |
<T> T |
searchFirst(String baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
EntryMapper<T> entryMapper)
Searches for the first entry matching the supplied criteria, feeding the
result into the
entryMapper. |
<T> T |
searchFirst(String baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String[] attributes,
EntryMapper<T> entryMapper)
Searches for the first entry matching the supplied criteria, feeding the
result into the
entryMapper, querying only the requested
attributes. |
<T> T |
searchFirst(String baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
EntryMapper<T> entryMapper)
Searches for the first entry matching the supplied criteria, feeding the
result into the
entryMapper. |
<T> T |
searchFirst(String baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String[] attributes,
EntryMapper<T> entryMapper)
Searches for the first entry matching the supplied criteria, feeding the
result into the
entryMapper, querying only the requested
attributes. |
void |
setModelFactory(ModelFactory modelFactory)
Sets the
modelFactory implementation for this facade. |
void |
setPasswordPolicyResponder(PasswordPolicyResponder passwordPolicyResponder)
Sets the
passwordPolicyResponder implementation for this
facade. |
public LdapConnectionTemplate(LdapConnectionPool connectionPool)
connectionPool - The pool to obtain connections from.public org.apache.directory.api.ldap.model.message.AddResponse add(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.entry.Attribute... attributes)
LdapConnectionOperationsadd in interface LdapConnectionOperationsdn - The distinguished name of the new entryattributes - The attributes of the new entrypublic org.apache.directory.api.ldap.model.message.AddResponse add(org.apache.directory.api.ldap.model.name.Dn dn,
RequestBuilder<org.apache.directory.api.ldap.model.message.AddRequest> requestBuilder)
LdapConnectionOperationsadd in interface LdapConnectionOperationsdn - The distinguished name of the new entryrequestBuilder - The request builderpublic org.apache.directory.api.ldap.model.message.AddResponse add(org.apache.directory.api.ldap.model.message.AddRequest addRequest)
LdapConnectionOperationsadd in interface LdapConnectionOperationsaddRequest - The requestpublic PasswordWarning authenticate(String baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, char[] password) throws PasswordException
LdapConnectionOperationsauthenticate in interface LdapConnectionOperationsPasswordException#authenticate(Dn, char[])},
#searchFirst(String, String, SearchScope, EntryMapper)}public PasswordWarning authenticate(org.apache.directory.api.ldap.model.name.Dn baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, char[] password) throws PasswordException
LdapConnectionOperationsauthenticate in interface LdapConnectionOperationsPasswordException#authenticate(Dn, char[])},
#searchFirst(Dn, String, SearchScope, EntryMapper)}public PasswordWarning authenticate(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest, char[] password) throws PasswordException
LdapConnectionOperationsauthenticate in interface LdapConnectionOperationsPasswordException#authenticate(Dn, char[])},
#searchFirst(SearchRequest, EntryMapper)}public PasswordWarning authenticate(org.apache.directory.api.ldap.model.name.Dn userDn, char[] password) throws PasswordException
LdapConnectionOperationsauthenticate in interface LdapConnectionOperationsuserDn - The distinguished name of the userpassword - The passwordPasswordException - If authentication failspublic org.apache.directory.api.ldap.model.message.DeleteResponse delete(org.apache.directory.api.ldap.model.name.Dn dn)
LdapConnectionOperationsdelete in interface LdapConnectionOperationsdn - The distinguished name of the entrypublic org.apache.directory.api.ldap.model.message.DeleteResponse delete(org.apache.directory.api.ldap.model.name.Dn dn,
RequestBuilder<org.apache.directory.api.ldap.model.message.DeleteRequest> requestBuilder)
LdapConnectionOperationsdelete in interface LdapConnectionOperationsdn - The distinguished name of the entryrequestBuilder - The RequestBuilderpublic org.apache.directory.api.ldap.model.message.DeleteResponse delete(org.apache.directory.api.ldap.model.message.DeleteRequest deleteRequest)
LdapConnectionOperationsdelete in interface LdapConnectionOperationsdeleteRequest - The requestpublic <T> T execute(ConnectionCallback<T> connectionCallback)
LdapConnectionOperationsconnectionCallback, supplying it a managed
connection.execute in interface LdapConnectionOperationsconnectionCallback - The callbackpublic <T> T lookup(org.apache.directory.api.ldap.model.name.Dn dn,
EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper.lookup in interface LdapConnectionOperationsdn - The distinguished name of the entryentryMapper - The mapper from entry to model objectentryMapper returnspublic <T> T lookup(org.apache.directory.api.ldap.model.name.Dn dn,
String[] attributes,
EntryMapper<T> entryMapper)
LdapConnectionOperationsattributes, and supplies
the matching entry to the entryMapper.lookup in interface LdapConnectionOperationsdn - The distinguished name of the entryattributes - The attributes to be fetchedentryMapper - The mapper from entry to model objectentryMapper returnspublic void modifyPassword(org.apache.directory.api.ldap.model.name.Dn userDn,
char[] newPassword)
throws PasswordException
LdapConnectionOperationsuserDn to
newPassword using the admin account.modifyPassword in interface LdapConnectionOperationsPasswordException#modifyPassword(Dn, char[], char[], boolean)}public void modifyPassword(org.apache.directory.api.ldap.model.name.Dn userDn,
char[] oldPassword,
char[] newPassword)
throws PasswordException
LdapConnectionOperationsuserDn from
oldPassword to newPassword.modifyPassword in interface LdapConnectionOperationsPasswordException#modifyPassword(Dn, char[], char[], boolean)}public void modifyPassword(org.apache.directory.api.ldap.model.name.Dn userDn,
char[] oldPassword,
char[] newPassword,
boolean asAdmin)
throws PasswordException
LdapConnectionOperationsuserDn from
oldPassword to newPassword, optionally using
an admin account. If asAdmin is true, then the operation
is performed in admin context which means oldPassword is
may be null.modifyPassword in interface LdapConnectionOperationsuserDn - The distinguished name of the useroldPassword - The users old password (optional if asAdmin is true)newPassword - The users new passwordasAdmin - If true, execute in admin contextPasswordException - If the password modification failspublic org.apache.directory.api.ldap.model.message.ModifyResponse modify(org.apache.directory.api.ldap.model.name.Dn dn,
RequestBuilder<org.apache.directory.api.ldap.model.message.ModifyRequest> requestBuilder)
LdapConnectionOperationsmodify in interface LdapConnectionOperationsdn - The distinguished name of the entryrequestBuilder - The RequestBuilderpublic org.apache.directory.api.ldap.model.message.ModifyResponse modify(org.apache.directory.api.ldap.model.message.ModifyRequest modifyRequest)
LdapConnectionOperationsmodify in interface LdapConnectionOperationsmodifyRequest - The requestpublic org.apache.directory.api.ldap.model.message.AddRequest newAddRequest(org.apache.directory.api.ldap.model.entry.Entry entry)
ModelFactoryAddRequest for the entry.newAddRequest in interface ModelFactorypublic org.apache.directory.api.ldap.model.entry.Attribute newAttribute(String name)
ModelFactoryname and
a null value. This is useful for clearing out an Attribute with a
ModifyRequest, replace function.newAttribute in interface ModelFactorypublic org.apache.directory.api.ldap.model.entry.Attribute newAttribute(String name, byte[]... values)
ModelFactoryname and
value(s).newAttribute in interface ModelFactorypublic org.apache.directory.api.ldap.model.entry.Attribute newAttribute(String name, String... values)
ModelFactoryname and
value(s).newAttribute in interface ModelFactorypublic org.apache.directory.api.ldap.model.entry.Attribute newAttribute(String name, org.apache.directory.api.ldap.model.entry.Value<?>... values)
ModelFactoryname and
value(s).newAttribute in interface ModelFactorypublic org.apache.directory.api.ldap.model.message.DeleteRequest newDeleteRequest(org.apache.directory.api.ldap.model.name.Dn dn)
ModelFactoryDeleteRequest for the dn.newDeleteRequest in interface ModelFactorypublic org.apache.directory.api.ldap.model.name.Dn newDn(String dn)
ModelFactoryDn that represents dn.newDn in interface ModelFactorypublic org.apache.directory.api.ldap.model.entry.Entry newEntry(String dn)
ModelFactoryEntry with the specified dn.newEntry in interface ModelFactorypublic org.apache.directory.api.ldap.model.entry.Entry newEntry(org.apache.directory.api.ldap.model.name.Dn dn)
ModelFactoryEntry with the specified dn.newEntry in interface ModelFactorypublic org.apache.directory.api.ldap.model.message.ModifyRequest newModifyRequest(String dn)
ModelFactoryModifyRequest for the dn.newModifyRequest in interface ModelFactorypublic org.apache.directory.api.ldap.model.message.ModifyRequest newModifyRequest(org.apache.directory.api.ldap.model.name.Dn dn)
ModelFactoryModifyRequest for the dn.newModifyRequest in interface ModelFactorypublic org.apache.directory.api.ldap.model.message.SearchRequest newSearchRequest(String baseDn, FilterBuilder filter, org.apache.directory.api.ldap.model.message.SearchScope scope)
ModelFactorySearchRequest over baseDn in
scope matching filter returning
all normal attributes for each matching entry.newSearchRequest in interface ModelFactorypublic org.apache.directory.api.ldap.model.message.SearchRequest newSearchRequest(String baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope)
ModelFactorySearchRequest over baseDn in
scope matching filter returning
all normal attributes for each matching entry.newSearchRequest in interface ModelFactorypublic org.apache.directory.api.ldap.model.message.SearchRequest newSearchRequest(org.apache.directory.api.ldap.model.name.Dn baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope)
ModelFactorySearchRequest over baseDn in
scope matching filter returning
all normal attributes for each matching entry.newSearchRequest in interface ModelFactorypublic org.apache.directory.api.ldap.model.message.SearchRequest newSearchRequest(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope)
ModelFactorySearchRequest over baseDn in
scope matching filter returning
all normal attributes for each matching entry.newSearchRequest in interface ModelFactorypublic org.apache.directory.api.ldap.model.message.SearchRequest newSearchRequest(String baseDn, FilterBuilder filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String... attributes)
ModelFactorySearchRequest over baseDn in
scope matching filter returning
attributes for each matching entry.newSearchRequest in interface ModelFactorypublic org.apache.directory.api.ldap.model.message.SearchRequest newSearchRequest(String baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String... attributes)
ModelFactorySearchRequest over baseDn in
scope matching filter returning
attributes for each matching entry.newSearchRequest in interface ModelFactorypublic org.apache.directory.api.ldap.model.message.SearchRequest newSearchRequest(org.apache.directory.api.ldap.model.name.Dn baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String... attributes)
ModelFactorySearchRequest over baseDn in
scope matching filter returning
attributes for each matching entry.newSearchRequest in interface ModelFactorypublic org.apache.directory.api.ldap.model.message.SearchRequest newSearchRequest(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String... attributes)
ModelFactorySearchRequest over baseDn in
scope matching filter returning
attributes for each matching entry.newSearchRequest in interface ModelFactorypublic <T extends org.apache.directory.api.ldap.model.message.ResultResponse> T responseOrException(T response)
LdapConnectionOperationsResultCodeEnum#SUCCESS, an exception is thrown. This method is
intened to be used inline:
template.responseOrException( template.delete( dn ) );
responseOrException in interface LdapConnectionOperationsresponse - The response to check for successresponsepublic <T> List<T> search(String baseDn, FilterBuilder filter, org.apache.directory.api.ldap.model.message.SearchScope scope, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper.search in interface LdapConnectionOperations#search(SearchRequest, EntryMapper)}public <T> List<T> search(String baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper.search in interface LdapConnectionOperations#search(SearchRequest, EntryMapper)}public <T> List<T> search(org.apache.directory.api.ldap.model.name.Dn baseDn, FilterBuilder filter, org.apache.directory.api.ldap.model.message.SearchScope scope, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper.search in interface LdapConnectionOperations#search(SearchRequest, EntryMapper)}public <T> List<T> search(org.apache.directory.api.ldap.model.name.Dn baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper.search in interface LdapConnectionOperations#search(SearchRequest, EntryMapper)}public <T> List<T> search(String baseDn, FilterBuilder filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String[] attributes, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper, querying only the requested
attributes.search in interface LdapConnectionOperations#search(SearchRequest, EntryMapper)}public <T> List<T> search(String baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String[] attributes, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper, querying only the requested
attributes.search in interface LdapConnectionOperations#search(SearchRequest, EntryMapper)}public <T> List<T> search(org.apache.directory.api.ldap.model.name.Dn baseDn, FilterBuilder filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String[] attributes, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper, querying only the requested
attributes.search in interface LdapConnectionOperations#search(SearchRequest, EntryMapper)}public <T> List<T> search(org.apache.directory.api.ldap.model.name.Dn baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String[] attributes, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper, querying only the requested
attributes.search in interface LdapConnectionOperations#search(SearchRequest, EntryMapper)}public <T> List<T> search(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest, EntryMapper<T> entryMapper)
LdapConnectionOperationssearchRequest, feeding the result into the
entryMapper.search in interface LdapConnectionOperationssearchRequest - The search requestentryMapper - The mapperpublic <T> T searchFirst(String baseDn, FilterBuilder filter, org.apache.directory.api.ldap.model.message.SearchScope scope, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper.searchFirst in interface LdapConnectionOperations#searchFirst(SearchRequest, EntryMapper)}public <T> T searchFirst(String baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper.searchFirst in interface LdapConnectionOperations#searchFirst(SearchRequest, EntryMapper)}public <T> T searchFirst(org.apache.directory.api.ldap.model.name.Dn baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper.searchFirst in interface LdapConnectionOperations#searchFirst(SearchRequest, EntryMapper)}public <T> T searchFirst(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper.searchFirst in interface LdapConnectionOperations#searchFirst(SearchRequest, EntryMapper)}public <T> T searchFirst(String baseDn, FilterBuilder filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String[] attributes, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper, querying only the requested
attributes.searchFirst in interface LdapConnectionOperations#searchFirst(SearchRequest, EntryMapper)}public <T> T searchFirst(String baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String[] attributes, EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper, querying only the requested
attributes.searchFirst in interface LdapConnectionOperations#searchFirst(SearchRequest, EntryMapper)}public <T> T searchFirst(org.apache.directory.api.ldap.model.name.Dn baseDn,
FilterBuilder filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String[] attributes,
EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper, querying only the requested
attributes.searchFirst in interface LdapConnectionOperations#searchFirst(SearchRequest, EntryMapper)}public <T> T searchFirst(org.apache.directory.api.ldap.model.name.Dn baseDn,
String filter,
org.apache.directory.api.ldap.model.message.SearchScope scope,
String[] attributes,
EntryMapper<T> entryMapper)
LdapConnectionOperationsentryMapper, querying only the requested
attributes.searchFirst in interface LdapConnectionOperations#searchFirst(SearchRequest, EntryMapper)}public <T> T searchFirst(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest,
EntryMapper<T> entryMapper)
LdapConnectionOperationssearchRequest, feeding the result into the
entryMapper. This is basically the same as
LdapConnectionOperations.search(SearchRequest, EntryMapper), but is optimized by
modifying the searchRequest to set its size limit to 1.
The searchRequest is returned to its original size limit
before this method returns (or throws an exception).searchFirst in interface LdapConnectionOperationssearchRequest - The search requestentryMapper - The mapperpublic void setModelFactory(ModelFactory modelFactory)
modelFactory implementation for this facade.modelFactory - The model factory implementationpublic void setPasswordPolicyResponder(PasswordPolicyResponder passwordPolicyResponder)
passwordPolicyResponder implementation for this
facade.passwordPolicyResponder - The password policy responder
implementationCopyright © 2009–2016 The Apache Software Foundation. All rights reserved.