Package org.bremersee.data.ldaptive
Class LdaptiveTemplate
- java.lang.Object
-
- org.bremersee.data.ldaptive.LdaptiveTemplate
-
- All Implemented Interfaces:
Cloneable,LdaptiveOperations
public class LdaptiveTemplate extends Object implements LdaptiveOperations, Cloneable
The template for executing ldap operations.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description LdaptiveTemplate(org.ldaptive.ConnectionFactory connectionFactory)Instantiates a new ldap template.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(org.ldaptive.AddRequest request)Executes add operation.booleanbind(org.ldaptive.BindRequest request)Executes bind operation.LdaptiveTemplateclone()Returns a new instance of this ldaptive template with the same connection factory and error handler.LdaptiveTemplateclone(org.springframework.util.ErrorHandler errorHandler)Returns a new instance of this ldaptive template with the same connection factory and the given error handler.booleancompare(org.ldaptive.CompareRequest request)Executes compare operation.voiddelete(org.ldaptive.DeleteRequest request)Executes delete operation.org.ldaptive.extended.ExtendedResponseexecuteExtension(org.ldaptive.extended.ExtendedRequest request)Executes an extended request.booleanexists(String dn)Exists.org.ldaptive.ConnectionFactorygetConnectionFactory()Gets 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(org.springframework.util.ErrorHandler errorHandler)Sets error handler.-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bremersee.data.ldaptive.LdaptiveOperations
exists, findAll, findAll, findOne, findOne, generateUserPassword, modifyUserPassword, remove, removeAll, saveAll
-
-
-
-
Method Detail
-
getConnectionFactory
public org.ldaptive.ConnectionFactory getConnectionFactory()
Description copied from interface:LdaptiveOperationsGets connection factory.- Specified by:
getConnectionFactoryin interfaceLdaptiveOperations- Returns:
- the connection factory
-
setErrorHandler
public void setErrorHandler(org.springframework.util.ErrorHandler errorHandler)
Sets error handler.- Parameters:
errorHandler- the error handler
-
clone
public LdaptiveTemplate clone()
Returns a new instance of this ldaptive template with the same connection factory and error handler.
-
clone
public LdaptiveTemplate clone(org.springframework.util.ErrorHandler errorHandler)
Returns a new instance of this ldaptive template with the same connection factory and the given error handler.- Parameters:
errorHandler- the new error handler- Returns:
- the new instance of the ldaptive template
-
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
public boolean exists(String dn)
Description copied from interface:LdaptiveOperationsExists.- Specified by:
existsin interfaceLdaptiveOperations- Parameters:
dn- the dn- Returns:
- the boolean
-
save
public <T> T save(T domainObject, LdaptiveEntryMapper<T> entryMapper)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
-
-