Class LdapGroupProvider

  • All Implemented Interfaces:
    GroupProvider

    public class LdapGroupProvider
    extends AbstractGroupProvider
    LDAP implementation of the GroupProvider interface. All data in the directory is treated as read-only so any set operations will result in an exception.
    Author:
    Matt Tucker, Greg Ferguson and Cameron Moore
    • Constructor Detail

      • LdapGroupProvider

        public LdapGroupProvider()
        Constructs a new LDAP group provider.
    • Method Detail

      • getGroupCount

        public int getGroupCount()
        Description copied from interface: GroupProvider
        Returns the number of groups in the system.
        Returns:
        the number of groups in the system.
      • getGroupNames

        public Collection<String> getGroupNames()
        Description copied from interface: GroupProvider
        Returns the Collection of all group names in the system.
        Returns:
        the Collection of all groups.
      • getGroupNames

        public Collection<String> getGroupNames​(int startIndex,
                                                int numResults)
        Description copied from interface: GroupProvider
        Returns the Collection of all groups in the system.
        Parameters:
        startIndex - start index in results.
        numResults - number of results to return.
        Returns:
        the Collection of all group names given the startIndex and numResults.
      • getGroupNames

        public Collection<String> getGroupNames​(org.xmpp.packet.JID user)
        Description copied from interface: GroupProvider
        Returns the Collection of group names that an entity belongs to.
        Parameters:
        user - the JID of the entity.
        Returns:
        the Collection of group names that the user belongs to.
      • search

        public Collection<String> search​(String key,
                                         String value)
        Description copied from interface: GroupProvider
        Returns the names of groups that have a property matching the given key/value pair. This provides an simple extensible search mechanism for providers with differing property sets and storage models. The semantics of the key/value matching (wildcard support, scoping, etc.) are unspecified by the interface and may vary for each implementation. Before searching or showing a search UI, use the GroupProvider.isSearchSupported() method to ensure that searching is supported.
        Specified by:
        search in interface GroupProvider
        Overrides:
        search in class AbstractGroupProvider
        Parameters:
        key - The name of a group property (e.g. "sharedRoster.showInRoster")
        value - The value to match for the given property
        Returns:
        unmodifiable Collection of group names that match the given key/value pair.
      • search

        public Collection<String> search​(String query,
                                         int startIndex,
                                         int numResults)
        Description copied from class: AbstractGroupProvider
        Returns a collection of group search results. This implementation returns an empty collection.
        Specified by:
        search in interface GroupProvider
        Overrides:
        search in class AbstractGroupProvider
        Parameters:
        query - the search string for group names.
        startIndex - start index in results.
        numResults - number of results to return.
        Returns:
        all groups that match the search.