public List<LDAPEntry> search(LDAPConnection ldapConnection, String baseDN,
            String filter, Collection<String> attributes, String attributeValue)
            throws GuacamoleException {
        String query = generateQuery(filter, attributes, attributeValue);
        return search(ldapConnection, baseDN, query);
    }
public List < LDAPEntry > search ( LDAPConnection ldapConnection , String baseDN , String filter , Collection < String > attributes , String attributeValue ) throws GuacamoleException { String query = generateQuery ( filter , attributes , attributeValue ) ; return search ( ldapConnection , baseDN , query ) ; }
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 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 attributes
A collection of all attributes to test for equivalence to the given
value, in order of decreasing priority.

@param attributeValue
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.

@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.