Package org.jivesoftware.openfire.ldap
Class LdapGroupProvider
java.lang.Object
org.jivesoftware.openfire.group.AbstractGroupProvider
org.jivesoftware.openfire.ldap.LdapGroupProvider
- All Implemented Interfaces:
GroupProvider
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
-
Field Summary
FieldsFields inherited from class org.jivesoftware.openfire.group.AbstractGroupProvider
SHARED_GROUP_RECURSIVE, sharedGroupMetaCache -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new LDAP group provider.LdapGroupProvider(String ldapConfigPropertyName) -
Method Summary
Modifier and TypeMethodDescriptiongenNextRangePart(int lasthigh) Returns a group based on its name.intReturns the number of groups in the system.Returns the Collection of all group names in the system.getGroupNames(int startIndex, int numResults) Returns the Collection of all groups in the system.getGroupNames(org.xmpp.packet.JID user) Returns the Collection of group names that an entity belongs to.booleanReturns true if the provider supports group search capability.Returns a collection of group search results.Returns a collection of group search results.Returns the names of groups that have a property matching the given key/value pair.Methods inherited from class org.jivesoftware.openfire.group.AbstractGroupProvider
addMember, createGroup, deleteGroup, deleteMember, getPublicSharedGroupNames, getSharedGroupNames, getSharedGroupNames, getVisibleGroupNames, hasSharedGroups, isReadOnly, isSharingSupported, loadProperties, setDescription, setName, updateMember
-
Field Details
-
PROCESSBIGGROUPS
-
-
Constructor Details
-
LdapGroupProvider
public LdapGroupProvider()Constructs a new LDAP group provider. -
LdapGroupProvider
-
-
Method Details
-
getGroup
Description copied from interface:GroupProviderReturns a group based on its name.- Parameters:
groupName- the name of the group.- Returns:
- the group with the given name.
- Throws:
GroupNotFoundException- If no group with that ID could be found
-
genNextRangePart
-
getGroupCount
public int getGroupCount()Description copied from interface:GroupProviderReturns the number of groups in the system.- Returns:
- the number of groups in the system.
-
getGroupNames
Description copied from interface:GroupProviderReturns the Collection of all group names in the system.- Returns:
- the Collection of all groups.
-
getGroupNames
Description copied from interface:GroupProviderReturns 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
startIndexandnumResults.
-
getGroupNames
Description copied from interface:GroupProviderReturns the Collection of group names that an entity belongs to. Implementations should use the bare JID representation of the JID passed as an argument to this method.- Parameters:
user- the (bare) JID of the entity.- Returns:
- the Collection of group names that the user belongs to.
-
search
Description copied from interface:GroupProviderReturns the names of groups that have a property matching the given key/value pair. This provides a 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 theGroupProvider.isSearchSupported()method to ensure that searching is supported.- Specified by:
searchin interfaceGroupProvider- Overrides:
searchin classAbstractGroupProvider- 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
Description copied from class:AbstractGroupProviderReturns a collection of group search results. This implementation returns an empty collection.- Specified by:
searchin interfaceGroupProvider- Overrides:
searchin classAbstractGroupProvider- Parameters:
query- the search string for group names.- Returns:
- all groups that match the search.
-
search
Description copied from class:AbstractGroupProviderReturns a collection of group search results. This implementation returns an empty collection.- Specified by:
searchin interfaceGroupProvider- Overrides:
searchin classAbstractGroupProvider- 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.
-
isSearchSupported
public boolean isSearchSupported()Description copied from class:AbstractGroupProviderReturns true if the provider supports group search capability. This implementation always returns false.- Specified by:
isSearchSupportedin interfaceGroupProvider- Overrides:
isSearchSupportedin classAbstractGroupProvider- Returns:
- true if searching is supported.
-