Class LdaptiveTemplate

java.lang.Object
org.bremersee.ldaptive.LdaptiveTemplate
All Implemented Interfaces:
LdaptiveOperations
Direct Known Subclasses:
LdaptiveSambaTemplate

public class LdaptiveTemplate extends Object implements LdaptiveOperations
The template for executing ldap operations.
Author:
Christian Bremer
  • Constructor Details

    • LdaptiveTemplate

      public LdaptiveTemplate(org.ldaptive.ConnectionFactory connectionFactory)
      Instantiates a new ldaptive template.
      Parameters:
      connectionFactory - the connection factory
  • Method Details

    • getConnectionFactory

      public org.ldaptive.ConnectionFactory getConnectionFactory()
      Description copied from interface: LdaptiveOperations
      Gets connection factory.
      Specified by:
      getConnectionFactory in interface LdaptiveOperations
      Returns:
      the connection factory
    • setErrorHandler

      public void setErrorHandler(LdaptiveErrorHandler errorHandler)
      Sets error handler.
      Parameters:
      errorHandler - the error handler
    • copy

      public LdaptiveTemplate copy()
      Description copied from interface: LdaptiveOperations
      Returns a new instance of this ldap operations with the same connection factory and error handler.
      Specified by:
      copy in interface LdaptiveOperations
      Returns:
      a new instance of this ldap operations
    • copy

      public LdaptiveTemplate copy(LdaptiveErrorHandler errorHandler)
      Description copied from interface: LdaptiveOperations
      Returns a new instance of this ldap operations with the same connection factory and the given error handler.
      Specified by:
      copy in interface LdaptiveOperations
      Parameters:
      errorHandler - the new error handler
      Returns:
      the new instance of this ldap operations
    • add

      public void add(org.ldaptive.AddRequest request)
      Description copied from interface: LdaptiveOperations
      Executes add operation.
      Specified by:
      add in interface LdaptiveOperations
      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 interface LdaptiveOperations
      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 interface LdaptiveOperations
      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 interface LdaptiveOperations
      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 interface LdaptiveOperations
      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 interface LdaptiveOperations
      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 interface LdaptiveOperations
      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 interface LdaptiveOperations
      Parameters:
      request - the request
      Returns:
      the search response
    • exists

      public boolean exists(String dn)
      Description copied from interface: LdaptiveOperations
      Exists.
      Specified by:
      exists in interface LdaptiveOperations
      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 interface LdaptiveOperations
      Type Parameters:
      T - the type parameter
      Parameters:
      domainObject - the domain object
      entryMapper - the entry mapper
      Returns:
      the t