Package org.bremersee.data.ldaptive
Interface LdaptiveOperations
-
- All Known Implementing Classes:
LdaptiveTemplate
@Validated public interface LdaptiveOperations
The interface for ldap operations.- Author:
- Christian Bremer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
add(@NotNull org.ldaptive.AddRequest addRequest)
Executes add operation.boolean
bind(@NotNull org.ldaptive.BindRequest request)
Executes bind operation.boolean
compare(@NotNull org.ldaptive.CompareRequest request)
Executes compare operation.void
delete(@NotNull org.ldaptive.DeleteRequest request)
Executes delete operation.@NotNull org.ldaptive.extended.ExtendedResponse
executeExtension(@NotNull org.ldaptive.extended.ExtendedRequest request)
Executes an extended request.boolean
exists(@NotNull String dn)
Exists.default <T> boolean
exists(T domainObject, @NotNull LdaptiveEntryMapper<T> entryMapper)
Exists.default Collection<org.ldaptive.LdapEntry>
findAll(@NotNull org.ldaptive.SearchRequest request)
Find all.default <T> Stream<T>
findAll(@NotNull org.ldaptive.SearchRequest request, @NotNull LdaptiveEntryMapper<T> entryMapper)
Find all.default Optional<org.ldaptive.LdapEntry>
findOne(@NotNull org.ldaptive.SearchRequest request)
Find one.default <T> Optional<T>
findOne(@NotNull org.ldaptive.SearchRequest request, @NotNull LdaptiveEntryMapper<T> entryMapper)
Find one.default String
generateUserPassword(@NotNull String dn)
Generate user password.@NotNull org.ldaptive.ConnectionFactory
getConnectionFactory()
Gets connection factory.void
modify(@NotNull org.ldaptive.ModifyRequest request)
Executes modify operation.void
modifyDn(@NotNull org.ldaptive.ModifyDnRequest request)
Executes modify dn operation.default void
modifyUserPassword(@NotNull String dn, String oldPass, String newPass)
Modifies user password.default <T> void
remove(T domainObject, @NotNull LdaptiveEntryMapper<T> entryMapper)
Remove.default <T> void
removeAll(Collection<T> domainObjects, @NotNull LdaptiveEntryMapper<T> entryMapper)
Remove all.<T> T
save(T domainObject, LdaptiveEntryMapper<T> entryMapper)
Save t.default <T> Stream<T>
saveAll(Collection<T> domainObjects, @NotNull LdaptiveEntryMapper<T> entryMapper)
Save all stream.@NotNull org.ldaptive.SearchResponse
search(@NotNull org.ldaptive.SearchRequest request)
Executes search operation.
-
-
-
Method Detail
-
getConnectionFactory
@NotNull @NotNull org.ldaptive.ConnectionFactory getConnectionFactory()
Gets connection factory.- Returns:
- the connection factory
-
add
void add(@NotNull @NotNull org.ldaptive.AddRequest addRequest)
Executes add operation.- Parameters:
addRequest
- the add request
-
bind
boolean bind(@NotNull @NotNull org.ldaptive.BindRequest request)
Executes bind operation.- Parameters:
request
- the request- Returns:
- the boolean
-
compare
boolean compare(@NotNull @NotNull org.ldaptive.CompareRequest request)
Executes compare operation.- Parameters:
request
- the request- Returns:
- the boolean
-
delete
void delete(@NotNull @NotNull org.ldaptive.DeleteRequest request)
Executes delete operation.- Parameters:
request
- the request
-
executeExtension
@NotNull @NotNull org.ldaptive.extended.ExtendedResponse executeExtension(@NotNull @NotNull org.ldaptive.extended.ExtendedRequest request)
Executes an extended request.- Parameters:
request
- the request- Returns:
- the extended response
-
generateUserPassword
default String generateUserPassword(@NotNull @NotNull String dn)
Generate user password.- Parameters:
dn
- the dn- Returns:
- the generated user password
-
modify
void modify(@NotNull @NotNull org.ldaptive.ModifyRequest request)
Executes modify operation.- Parameters:
request
- the request
-
modifyDn
void modifyDn(@NotNull @NotNull org.ldaptive.ModifyDnRequest request)
Executes modify dn operation.- Parameters:
request
- the request
-
modifyUserPassword
default void modifyUserPassword(@NotNull @NotNull String dn, @Nullable String oldPass, @Nullable String newPass)
Modifies user password.- Parameters:
dn
- the dnoldPass
- the old passnewPass
- the new pass
-
search
@NotNull @NotNull org.ldaptive.SearchResponse search(@NotNull @NotNull org.ldaptive.SearchRequest request)
Executes search operation.- Parameters:
request
- the request- Returns:
- the search response
-
findOne
default Optional<org.ldaptive.LdapEntry> findOne(@NotNull @NotNull org.ldaptive.SearchRequest request)
Find one.- Parameters:
request
- the request- Returns:
- the optional ldap entry
-
findOne
default <T> Optional<T> findOne(@NotNull @NotNull org.ldaptive.SearchRequest request, @NotNull @NotNull LdaptiveEntryMapper<T> entryMapper)
Find one.- Type Parameters:
T
- the type parameter- Parameters:
request
- the requestentryMapper
- the entry mapper- Returns:
- the optional domain object
-
findAll
default Collection<org.ldaptive.LdapEntry> findAll(@NotNull @NotNull org.ldaptive.SearchRequest request)
Find all.- Parameters:
request
- the request- Returns:
- the collection
-
findAll
default <T> Stream<T> findAll(@NotNull @NotNull org.ldaptive.SearchRequest request, @NotNull @NotNull LdaptiveEntryMapper<T> entryMapper)
Find all.- Type Parameters:
T
- the type parameter- Parameters:
request
- the requestentryMapper
- the entry mapper- Returns:
- the stream
-
exists
boolean exists(@NotNull @NotNull String dn)
Exists.- Parameters:
dn
- the dn- Returns:
- the boolean
-
exists
default <T> boolean exists(@NotNull T domainObject, @NotNull @NotNull LdaptiveEntryMapper<T> entryMapper)
Exists.- Type Parameters:
T
- the type parameter- Parameters:
domainObject
- the domain objectentryMapper
- the entry mapper- Returns:
- the boolean
-
save
<T> T save(T domainObject, LdaptiveEntryMapper<T> entryMapper)
Save t.- Type Parameters:
T
- the type parameter- Parameters:
domainObject
- the domain objectentryMapper
- the entry mapper- Returns:
- the t
-
saveAll
default <T> Stream<T> saveAll(@Nullable Collection<T> domainObjects, @NotNull @NotNull LdaptiveEntryMapper<T> entryMapper)
Save all stream.- Type Parameters:
T
- the type parameter- Parameters:
domainObjects
- the domain objectsentryMapper
- the entry mapper- Returns:
- the stream
-
remove
default <T> void remove(@NotNull T domainObject, @NotNull @NotNull LdaptiveEntryMapper<T> entryMapper)
Remove.- Type Parameters:
T
- the type parameter- Parameters:
domainObject
- the domain objectentryMapper
- the entry mapper
-
removeAll
default <T> void removeAll(@Nullable Collection<T> domainObjects, @NotNull @NotNull LdaptiveEntryMapper<T> entryMapper)
Remove all.- Type Parameters:
T
- the type parameter- Parameters:
domainObjects
- the domain objectsentryMapper
- the entry mapper
-
-