Package org.bremersee.ldaptive
Class LdaptiveTemplate
java.lang.Object
org.bremersee.ldaptive.LdaptiveTemplate
- All Implemented Interfaces:
LdaptiveOperations
- Direct Known Subclasses:
LdaptiveSambaTemplate
The template for executing ldap operations.
- Author:
- Christian Bremer
-
Constructor Summary
ConstructorsConstructorDescriptionLdaptiveTemplate(org.ldaptive.ConnectionFactory connectionFactory) Instantiates a new ldaptive template. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(org.ldaptive.AddRequest request) Executes add operation.booleanbind(org.ldaptive.BindRequest request) Executes bind operation.booleancompare(org.ldaptive.CompareRequest request) Executes compare operation.copy()Returns a new instance of this ldap operations with the same connection factory and error handler.copy(LdaptiveErrorHandler errorHandler) Returns a new instance of this ldap operations with the same connection factory and the given error handler.voiddelete(org.ldaptive.DeleteRequest request) Executes delete operation.org.ldaptive.extended.ExtendedResponseexecuteExtension(org.ldaptive.extended.ExtendedRequest request) Executes an extended request.booleanExists.org.ldaptive.ConnectionFactoryGets connection factory.voidmodify(org.ldaptive.ModifyRequest request) Executes modify operation.voidmodifyDn(org.ldaptive.ModifyDnRequest request) Executes modify dn operation.<T> Tsave(T domainObject, LdaptiveEntryMapper<T> entryMapper) Save t.org.ldaptive.SearchResponsesearch(org.ldaptive.SearchRequest request) Executes search operation.voidsetErrorHandler(LdaptiveErrorHandler errorHandler) Sets error handler.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bremersee.ldaptive.LdaptiveOperations
exists, findAll, findAll, findOne, findOne, generateUserPassword, modifyUserPassword, remove, removeAll, saveAll
-
Constructor Details
-
LdaptiveTemplate
public LdaptiveTemplate(org.ldaptive.ConnectionFactory connectionFactory) Instantiates a new ldaptive template.- Parameters:
connectionFactory- the connection factory
-
-
Method Details
-
getConnectionFactory
public org.ldaptive.ConnectionFactory getConnectionFactory()Description copied from interface:LdaptiveOperationsGets connection factory.- Specified by:
getConnectionFactoryin interfaceLdaptiveOperations- Returns:
- the connection factory
-
setErrorHandler
Sets error handler.- Parameters:
errorHandler- the error handler
-
copy
Description copied from interface:LdaptiveOperationsReturns a new instance of this ldap operations with the same connection factory and error handler.- Specified by:
copyin interfaceLdaptiveOperations- Returns:
- a new instance of this ldap operations
-
copy
Description copied from interface:LdaptiveOperationsReturns a new instance of this ldap operations with the same connection factory and the given error handler.- Specified by:
copyin interfaceLdaptiveOperations- Parameters:
errorHandler- the new error handler- Returns:
- the new instance of this ldap operations
-
add
public void add(org.ldaptive.AddRequest request) Description copied from interface:LdaptiveOperationsExecutes add operation.- Specified by:
addin interfaceLdaptiveOperations- Parameters:
request- the add request
-
bind
public boolean bind(org.ldaptive.BindRequest request) Description copied from interface:LdaptiveOperationsExecutes bind operation.- Specified by:
bindin interfaceLdaptiveOperations- Parameters:
request- the request- Returns:
- the boolean
-
compare
public boolean compare(org.ldaptive.CompareRequest request) Description copied from interface:LdaptiveOperationsExecutes compare operation.- Specified by:
comparein interfaceLdaptiveOperations- Parameters:
request- the request- Returns:
- the boolean
-
delete
public void delete(org.ldaptive.DeleteRequest request) Description copied from interface:LdaptiveOperationsExecutes delete operation.- Specified by:
deletein interfaceLdaptiveOperations- Parameters:
request- the request
-
executeExtension
public org.ldaptive.extended.ExtendedResponse executeExtension(org.ldaptive.extended.ExtendedRequest request) Description copied from interface:LdaptiveOperationsExecutes an extended request.- Specified by:
executeExtensionin interfaceLdaptiveOperations- Parameters:
request- the request- Returns:
- the extended response
-
modify
public void modify(org.ldaptive.ModifyRequest request) Description copied from interface:LdaptiveOperationsExecutes modify operation.- Specified by:
modifyin interfaceLdaptiveOperations- Parameters:
request- the request
-
modifyDn
public void modifyDn(org.ldaptive.ModifyDnRequest request) Description copied from interface:LdaptiveOperationsExecutes modify dn operation.- Specified by:
modifyDnin interfaceLdaptiveOperations- Parameters:
request- the request
-
search
public org.ldaptive.SearchResponse search(org.ldaptive.SearchRequest request) Description copied from interface:LdaptiveOperationsExecutes search operation.- Specified by:
searchin interfaceLdaptiveOperations- Parameters:
request- the request- Returns:
- the search response
-
exists
Description copied from interface:LdaptiveOperationsExists.- Specified by:
existsin interfaceLdaptiveOperations- Parameters:
dn- the dn- Returns:
- the boolean
-
save
Description copied from interface:LdaptiveOperationsSave t.- Specified by:
savein interfaceLdaptiveOperations- Type Parameters:
T- the type parameter- Parameters:
domainObject- the domain objectentryMapper- the entry mapper- Returns:
- the t
-