org.keycloak.federation.ldap.idm.store.ldap

## Class LDAPOperationManager

- java.lang.Object
- - org.keycloak.federation.ldap.idm.store.ldap.LDAPOperationManager

-     public class LDAPOperationManager
      extends Object

  This class provides a set of operations to manage LDAP trees.

  Author:
    Anil Saldhana, Pedro Silva

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LDAPOperationManager(LDAPConfig config)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAttribute(String dn, Attribute attribute)` Adds the given `Attribute` instance using the given DN.
    `void` | `authenticate(String dn, String password)` Performs a simple authentication using the given DN and password to bind to the authentication context.
    `void` | `createSubContext(String name, Attributes attributes)`
    `String` | `decodeEntryUUID(Object entryUUID)`
    `Attributes` | `getAttributes(String entryUUID, String baseDN, Set<String> returningAttributes)`
    `String` | `getFilterById(String id)`
    `SearchResult` | `lookupById(String baseDN, String id, Collection<String> returningAttributes)`
    `void` | `modifyAttribute(String dn, Attribute attribute)` Modifies the given `Attribute` instance using the given DN.
    `void` | `modifyAttributes(String dn, ModificationItem[] mods)`
    `void` | `modifyAttributes(String dn, NamingEnumeration<Attribute> attributes)` Modifies the given `Attribute` instances using the given DN.
    `void` | `removeAttribute(String dn, Attribute attribute)` Removes the given `Attribute` instance using the given DN.
    `void` | `removeEntry(String entryDn)` Removes the object from the LDAP tree
    `List<SearchResult>` | `search(String baseDN, String filter, Collection<String> returningAttributes, int searchScope)`
    `List<SearchResult>` | `searchPaginated(String baseDN, String filter, LDAPQuery identityQuery)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LDAPOperationManager

          public LDAPOperationManager(LDAPConfig config)
                               throws NamingException

      Throws:
        `NamingException`

  - ### Method Detail

    - #### modifyAttribute

          public void modifyAttribute(String dn,
                                      Attribute attribute)

      Modifies the given `Attribute` instance using the given DN. This method performs a REPLACE_ATTRIBUTE operation.

      Parameters:
        `dn` -
        `attribute` -

    - #### modifyAttributes

          public void modifyAttributes(String dn,
                                       NamingEnumeration<Attribute> attributes)

      Modifies the given `Attribute` instances using the given DN. This method performs a REPLACE_ATTRIBUTE operation.

      Parameters:
        `dn` -
        `attributes` -

    - #### removeAttribute

          public void removeAttribute(String dn,
                                      Attribute attribute)

      Removes the given `Attribute` instance using the given DN. This method performs a REMOVE_ATTRIBUTE operation.

      Parameters:
        `dn` -
        `attribute` -

    - #### addAttribute

          public void addAttribute(String dn,
                                   Attribute attribute)

      Adds the given `Attribute` instance using the given DN. This method performs a ADD_ATTRIBUTE operation.

      Parameters:
        `dn` -
        `attribute` -

    - #### removeEntry

          public void removeEntry(String entryDn)

      Removes the object from the LDAP tree

    - #### search

          public List<SearchResult> search(String baseDN,
                                           String filter,
                                           Collection<String> returningAttributes,
                                           int searchScope)
                                    throws NamingException

      Throws:
        `NamingException`

    - #### searchPaginated

          public List<SearchResult> searchPaginated(String baseDN,
                                                    String filter,
                                                    LDAPQuery identityQuery)
                                             throws NamingException

      Throws:
        `NamingException`

    - #### getFilterById

          public String getFilterById(String id)

    - #### lookupById

          public SearchResult lookupById(String baseDN,
                                         String id,
                                         Collection<String> returningAttributes)

    - #### authenticate

          public void authenticate(String dn,
                                   String password)
                            throws AuthenticationException

      Performs a simple authentication using the given DN and password to bind to the authentication context.

      Parameters:
        `dn` -
        `password` -
      Throws:
        `AuthenticationException` - if authentication is not successful

    - #### modifyAttributes

          public void modifyAttributes(String dn,
                                       ModificationItem[] mods)

    - #### createSubContext

          public void createSubContext(String name,
                                       Attributes attributes)

    - #### getAttributes

          public Attributes getAttributes(String entryUUID,
                                          String baseDN,
                                          Set<String> returningAttributes)

    - #### decodeEntryUUID

          public String decodeEntryUUID(Object entryUUID)

Copyright © 2016 JBoss by Red Hat. All rights reserved.