public List<Entry> search(LDAPConfiguration config,
            LdapNetworkConnection ldapConnection, Dn baseDN, ExprNode filter,
            Collection<String> filterAttributes, String filterValue,
            Collection<String> attributes) throws GuacamoleException {
        ExprNode query = generateQuery(filter, filterAttributes, filterValue);
        return search(config, ldapConnection, baseDN, query, 0, attributes);
    }
Executes the query which would be returned by generateQuery() using the
given connection, returning a list of all results. Only objects beneath
the given base DN are included in the search.

@param config
    The configuration of the LDAP server being queried.

@param ldapConnection
    The current connection to the LDAP server, associated with the
    current user.

@param baseDN
    The base DN to search using the given LDAP query.

@param filter
    The LDAP filter to apply to reduce the results of the query in
    addition to testing the values of the given attributes.

@param filterAttributes
    A collection of all attributes to test for equivalence to the given
    value, in order of decreasing priority.

@param filterValue
    The value that should be searched search for within the attributes
    of objects within the LDAP directory. If null, the search will test
    only for the presence of at least one of the given attributes on
    each object, regardless of the value of those attributes.

@param attributes
    A collection of the names of attributes that should be retrieved
    from LDAP entries returned by the search, or null if all available
    attributes should be returned.

@return
    A list of all results accessible to the user currently bound under
    the given LDAP connection.

@throws GuacamoleException
    If an error occurs executing the query, or if configuration
    information required to execute the query cannot be read from
    guacamole.properties.
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ObjectQueryService.java