Interface LDAPOperations

All Known Subinterfaces:
LDAPClient

public interface LDAPOperations

LDAP reactive operations.

Since:
1.5
Author:
Jeremy Kuhn
  • Method Details

    • getBoundDN

      Optional<String> getBoundDN()

      Returns the DN bound to the operation.

      This DN should be present when LDAP operations is backed by an authenticated connection (e.g. after a LDAPClient.bind(String, String, java.util.function.Function) operation).

      Returns:
      an optional returning the bound DN or an empty optional if the connection is anonymous.
    • get

      Resolves and returns the entry identified by the specified DN.

      Parameters:
      dn - the DN of the entry to fetch
      Returns:
      a publisher of one entry or an empty publisher if no entry exists with the specified DN.
      Throws:
      LDAPException - if there was an error during the get operation
    • get

      Mono<LDAPEntry> get(String dn, Object... dnArgs) throws LDAPException

      Resolves and returns the entry identified by the specified DN.

      Parameters:
      dn - an expression to use to get the DN of the user to authenticate
      dnArgs - the arguments to use the format the DN expression
      Returns:
      a publisher of one entry or an empty publisher if no entry exists with the specified DN.
      Throws:
      LDAPException - if there was an error during the get operation
    • get

      Mono<LDAPEntry> get(String dn, String[] attributes) throws LDAPException

      Resolves and returns the entry identified by the specified DN with the specified list of attributes.

      Parameters:
      dn - the DN of the entry to fetch
      attributes - the list of attributes to query
      Returns:
      a publisher of one entry or an empty publisher if no entry exists with the specified DN.
      Throws:
      LDAPException - if there was an error during the get operation
    • get

      Mono<LDAPEntry> get(String dn, String[] attributes, Object... dnArgs) throws LDAPException

      Resolves and returns the entry identified by the specified DN with the specified list of attributes.

      Parameters:
      dn - the DN of the entry to fetch
      attributes - the list of attributes to query
      dnArgs - the arguments to use the format the DN expression
      Returns:
      a publisher of one entry or an empty publisher if no entry exists with the specified DN.
      Throws:
      LDAPException - if there was an error during the get operation
    • search

      Flux<LDAPEntry> search(String base, String filter) throws LDAPException

      Executes a search operation in the specified base context using the specified filter.

      Parameters:
      base - the base context
      filter - a filter
      Returns:
      a publisher of entries
      Throws:
      LDAPException - if there was an error during the search operation
    • search

      Flux<LDAPEntry> search(String base, String filter, Object... filterArgs) throws LDAPException

      Executes a search operation in the specified base context using the specified filter and arguments.

      Parameters:
      base - the base context
      filter - a filter
      filterArgs - the arguments to use to format the filter
      Returns:
      a publisher of entries
      Throws:
      LDAPException - if there was an error during the search operation
    • search

      Flux<LDAPEntry> search(String base, String[] attributes, String filter) throws LDAPException

      Executes a search operation in the specified base context using the specified filter returning the specified list of attributes.

      Parameters:
      base - the base context
      attributes - the list of attributes to query
      filter - a filter
      Returns:
      a publisher of entries
      Throws:
      LDAPException - if there was an error during the search operation
    • search

      Flux<LDAPEntry> search(String base, String[] attributes, String filter, Object... filterArgs) throws LDAPException

      Executes a search operation in the specified base context using the specified filter and arguments returning the specified list of attributes.

      Parameters:
      base - the base context
      attributes - the list of attributes to query
      filter - a filter
      filterArgs - the arguments to use to format the filter
      Returns:
      a publisher of entries
      Throws:
      LDAPException - if there was an error during the search operation
    • search

      Returns a builder used to build complex search operations.

      Returns:
      a search builder