Interface LdaptiveOperations

All Known Implementing Classes:
LdaptiveSambaTemplate, LdaptiveTemplate

public interface LdaptiveOperations
The interface for ldap operations.
Author:
Christian Bremer
  • Method Details

    • getConnectionFactory

      org.ldaptive.ConnectionFactory getConnectionFactory()
      Gets connection factory.
      Returns:
      the connection factory
    • 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

      default String generateUserPassword(String dn)
      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

      default void modifyUserPassword(String dn, String oldPass, String newPass)
      Modifies user password.
      Parameters:
      dn - the dn
      oldPass - the old pass
      newPass - the new pass
    • search

      org.ldaptive.SearchResponse search(org.ldaptive.SearchRequest request)
      Executes search operation.
      Parameters:
      request - the request
      Returns:
      the search response
    • findOne

      default Optional<org.ldaptive.LdapEntry> findOne(org.ldaptive.SearchRequest request)
      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 request
      entryMapper - the entry mapper
      Returns:
      the optional domain object
    • findAll

      default Collection<org.ldaptive.LdapEntry> findAll(org.ldaptive.SearchRequest request)
      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 request
      entryMapper - the entry mapper
      Returns:
      the stream
    • exists

      boolean exists(String dn)
      Exists.
      Parameters:
      dn - the dn
      Returns:
      the boolean
    • exists

      default <T> boolean exists(T domainObject, LdaptiveEntryMapper<T> entryMapper)
      Exists.
      Type Parameters:
      T - the type parameter
      Parameters:
      domainObject - the domain object
      entryMapper - 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 object
      entryMapper - the entry mapper
      Returns:
      the t
    • saveAll

      default <T> Stream<T> saveAll(Collection<T> domainObjects, LdaptiveEntryMapper<T> entryMapper)
      Save all stream.
      Type Parameters:
      T - the type parameter
      Parameters:
      domainObjects - the domain objects
      entryMapper - the entry mapper
      Returns:
      the stream
    • remove

      default <T> void remove(T domainObject, LdaptiveEntryMapper<T> entryMapper)
      Remove.
      Type Parameters:
      T - the type parameter
      Parameters:
      domainObject - the domain object
      entryMapper - the entry mapper
    • removeAll

      default <T> void removeAll(Collection<T> domainObjects, LdaptiveEntryMapper<T> entryMapper)
      Remove all.
      Type Parameters:
      T - the type parameter
      Parameters:
      domainObjects - the domain objects
      entryMapper - the entry mapper