org.jbpm.services.task.utils

## Class LdapSearcher

- java.lang.Object
- - org.jbpm.services.task.utils.LdapSearcher

-     public class LdapSearcher
      extends Object

  Utility class providing LDAP search capabilities.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LdapSearcher.SearchScope`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `SEARCH_SCOPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LdapSearcher(Properties config)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<String>` | `getAttributeResults(String attributeId)`
    `List<SearchResult>` | `getSearchResults()`
    `String` | `getSingleAttributeResult(String attributeId)`
    `SearchResult` | `getSingleSearchResult()`
    `LdapSearcher` | `search(String context, String filterExpr, Object... filterArgs)` Search LDAP and stores the results in searchResults field.

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

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

- - ### Field Detail

    - #### SEARCH_SCOPE

          public static final String SEARCH_SCOPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### LdapSearcher

          public LdapSearcher(Properties config)

      Parameters:
        `config` - LDAP connection properties
      See Also:
        `Context`

  - ### Method Detail

    - #### search

          public LdapSearcher search(String context,
                                     String filterExpr,
                                     Object... filterArgs)

      Search LDAP and stores the results in searchResults field.
      Parameters:
        `context` - the name of the context where the search starts (the depth depends on ldap.search.scope)
        `filterExpr` - the filter expression to use for the search. The expression may contain variables of the form "`{i}`" where `i` is a non-negative integer. May not be null.
        `filterArgs` - the array of arguments to substitute for the variables in `filterExpr`. The value of `filterArgs[i]` will replace each occurrence of "`{i}`". If null, an equivalent of an empty array is used.
      Returns:
        this

    - #### getSingleSearchResult

          public SearchResult getSingleSearchResult()

    - #### getSearchResults

          public List<SearchResult> getSearchResults()

    - #### getSingleAttributeResult

          public String getSingleAttributeResult(String attributeId)

    - #### getAttributeResults

          public List<String> getAttributeResults(String attributeId)

Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.