Package org.bremersee.ldaptive
Interface LdaptiveOperations
- All Known Implementing Classes:
LdaptiveSambaTemplate,LdaptiveTemplate
public interface LdaptiveOperations
The interface for ldap operations.
- Author:
- Christian Bremer
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(org.ldaptive.AddRequest addRequest) 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.default <T> booleanexists(T domainObject, LdaptiveEntryMapper<T> entryMapper) Exists.default Collection<org.ldaptive.LdapEntry> findAll(org.ldaptive.SearchRequest request) Find all.default <T> Stream<T> findAll(org.ldaptive.SearchRequest request, LdaptiveEntryMapper<T> entryMapper) Find all.default Optional<org.ldaptive.LdapEntry> findOne(org.ldaptive.SearchRequest request) Find one.default <T> Optional<T> findOne(org.ldaptive.SearchRequest request, LdaptiveEntryMapper<T> entryMapper) Find one.default StringGenerate user password.org.ldaptive.ConnectionFactoryGets connection factory.voidmodify(org.ldaptive.ModifyRequest request) Executes modify operation.voidmodifyDn(org.ldaptive.ModifyDnRequest request) Executes modify dn operation.default voidmodifyUserPassword(String dn, String oldPass, String newPass) Modifies user password.default <T> voidremove(T domainObject, LdaptiveEntryMapper<T> entryMapper) Remove.default <T> voidremoveAll(Collection<T> domainObjects, LdaptiveEntryMapper<T> entryMapper) Remove all.<T> Tsave(T domainObject, LdaptiveEntryMapper<T> entryMapper) Save t.default <T> Stream<T> saveAll(Collection<T> domainObjects, LdaptiveEntryMapper<T> entryMapper) Save all stream.org.ldaptive.SearchResponsesearch(org.ldaptive.SearchRequest request) Executes search operation.
-
Method Details
-
getConnectionFactory
org.ldaptive.ConnectionFactory getConnectionFactory()Gets connection factory.- Returns:
- the connection factory
-
copy
LdaptiveOperations copy()Returns a new instance of this ldap operations with the same connection factory and error handler.- Returns:
- a new instance of this ldap operations
-
copy
Returns a new instance of this ldap operations with the same connection factory and the given error handler.- Parameters:
errorHandler- the new error handler- Returns:
- the new instance of this ldap operations
-
add
void add(org.ldaptive.AddRequest addRequest) Executes add operation.- Parameters:
addRequest- the add request
-
bind
boolean bind(org.ldaptive.BindRequest request) Executes bind operation.- Parameters:
request- the request- Returns:
- the boolean
-
compare
boolean compare(org.ldaptive.CompareRequest request) Executes compare operation.- Parameters:
request- the request- Returns:
- the boolean
-
delete
void delete(org.ldaptive.DeleteRequest request) Executes delete operation.- Parameters:
request- the request
-
executeExtension
org.ldaptive.extended.ExtendedResponse executeExtension(org.ldaptive.extended.ExtendedRequest request) Executes an extended request.- Parameters:
request- the request- Returns:
- the extended response
-
generateUserPassword
Generate user password.- Parameters:
dn- the dn- Returns:
- the generated user password
-
modify
void modify(org.ldaptive.ModifyRequest request) Executes modify operation.- Parameters:
request- the request
-
modifyDn
void modifyDn(org.ldaptive.ModifyDnRequest request) Executes modify dn operation.- Parameters:
request- the request
-
modifyUserPassword
Modifies user password.- Parameters:
dn- the dnoldPass- the old passnewPass- the new pass
-
search
org.ldaptive.SearchResponse search(org.ldaptive.SearchRequest request) Executes search operation.- Parameters:
request- the request- Returns:
- the search response
-
findOne
Find one.- Parameters:
request- the request- Returns:
- the optional ldap entry
-
findOne
default <T> Optional<T> findOne(org.ldaptive.SearchRequest request, LdaptiveEntryMapper<T> entryMapper) Find one.- Type Parameters:
T- the type parameter- Parameters:
request- the requestentryMapper- the entry mapper- Returns:
- the optional domain object
-
findAll
Find all.- Parameters:
request- the request- Returns:
- the collection
-
findAll
default <T> Stream<T> findAll(org.ldaptive.SearchRequest request, LdaptiveEntryMapper<T> entryMapper) Find all.- Type Parameters:
T- the type parameter- Parameters:
request- the requestentryMapper- the entry mapper- Returns:
- the stream
-
exists
Exists.- Parameters:
dn- the dn- Returns:
- the boolean
-
exists
Exists.- Type Parameters:
T- the type parameter- Parameters:
domainObject- the domain objectentryMapper- the entry mapper- Returns:
- the boolean
-
save
Save t.- Type Parameters:
T- the type parameter- Parameters:
domainObject- the domain objectentryMapper- the entry mapper- Returns:
- the t
-
saveAll
Save all stream.- Type Parameters:
T- the type parameter- Parameters:
domainObjects- the domain objectsentryMapper- the entry mapper- Returns:
- the stream
-
remove
Remove.- Type Parameters:
T- the type parameter- Parameters:
domainObject- the domain objectentryMapper- the entry mapper
-
removeAll
Remove all.- Type Parameters:
T- the type parameter- Parameters:
domainObjects- the domain objectsentryMapper- the entry mapper
-