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 void
add(org.ldaptive.AddRequest request)
Executes add operation.boolean
bind(org.ldaptive.BindRequest request)
Executes bind operation.LdaptiveTemplate
clone()
Returns a new instance of this ldaptive template with the same connection factory and error handler.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.boolean
compare(org.ldaptive.CompareRequest request)
Executes compare operation.void
delete(org.ldaptive.DeleteRequest request)
Executes delete operation.org.ldaptive.extended.ExtendedResponse
executeExtension(org.ldaptive.extended.ExtendedRequest request)
Executes an extended request.boolean
exists(String dn)
Exists.org.ldaptive.ConnectionFactory
getConnectionFactory()
Gets connection factory.void
modify(org.ldaptive.ModifyRequest request)
Executes modify operation.void
modifyDn(org.ldaptive.ModifyDnRequest request)
Executes modify dn operation.<T> T
save(T domainObject, LdaptiveEntryMapper<T> entryMapper)
Save t.org.ldaptive.SearchResponse
search(org.ldaptive.SearchRequest request)
Executes search operation.void
setErrorHandler(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:LdaptiveOperations
Gets connection factory.- Specified by:
getConnectionFactory
in 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:LdaptiveOperations
Executes add operation.- Specified by:
add
in interfaceLdaptiveOperations
- Parameters:
request
- the add request
-
bind
public boolean bind(org.ldaptive.BindRequest request)
Description copied from interface:LdaptiveOperations
Executes bind operation.- Specified by:
bind
in interfaceLdaptiveOperations
- Parameters:
request
- the request- Returns:
- the boolean
-
compare
public boolean compare(org.ldaptive.CompareRequest request)
Description copied from interface:LdaptiveOperations
Executes compare operation.- Specified by:
compare
in interfaceLdaptiveOperations
- Parameters:
request
- the request- Returns:
- the boolean
-
delete
public void delete(org.ldaptive.DeleteRequest request)
Description copied from interface:LdaptiveOperations
Executes delete operation.- Specified by:
delete
in interfaceLdaptiveOperations
- Parameters:
request
- the request
-
executeExtension
public org.ldaptive.extended.ExtendedResponse executeExtension(org.ldaptive.extended.ExtendedRequest request)
Description copied from interface:LdaptiveOperations
Executes an extended request.- Specified by:
executeExtension
in interfaceLdaptiveOperations
- Parameters:
request
- the request- Returns:
- the extended response
-
modify
public void modify(org.ldaptive.ModifyRequest request)
Description copied from interface:LdaptiveOperations
Executes modify operation.- Specified by:
modify
in interfaceLdaptiveOperations
- Parameters:
request
- the request
-
modifyDn
public void modifyDn(org.ldaptive.ModifyDnRequest request)
Description copied from interface:LdaptiveOperations
Executes modify dn operation.- Specified by:
modifyDn
in interfaceLdaptiveOperations
- Parameters:
request
- the request
-
search
public org.ldaptive.SearchResponse search(org.ldaptive.SearchRequest request)
Description copied from interface:LdaptiveOperations
Executes search operation.- Specified by:
search
in interfaceLdaptiveOperations
- Parameters:
request
- the request- Returns:
- the search response
-
exists
public boolean exists(String dn)
Description copied from interface:LdaptiveOperations
Exists.- Specified by:
exists
in interfaceLdaptiveOperations
- Parameters:
dn
- the dn- Returns:
- the boolean
-
save
public <T> T save(T domainObject, LdaptiveEntryMapper<T> entryMapper)
Description copied from interface:LdaptiveOperations
Save t.- Specified by:
save
in interfaceLdaptiveOperations
- Type Parameters:
T
- the type parameter- Parameters:
domainObject
- the domain objectentryMapper
- the entry mapper- Returns:
- the t
-
-