Package org.jivesoftware.openfire.crowd
Class CrowdGroupProvider
- java.lang.Object
-
- org.jivesoftware.openfire.group.AbstractGroupProvider
-
- org.jivesoftware.openfire.crowd.CrowdGroupProvider
-
- All Implemented Interfaces:
GroupProvider
public class CrowdGroupProvider extends AbstractGroupProvider
Atlassian Crowd implementation of the GroupProvider. We do not permit modifications of groups from this provider - only read-only access.
-
-
Constructor Summary
Constructors Constructor Description CrowdGroupProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Group
getGroup(String name)
Returns a group based on it's name.int
getGroupCount()
Returns the number of groups in the system.Collection<String>
getGroupNames()
Returns the Collection of all group names in the system.Collection<String>
getGroupNames(int startIndex, int numResults)
Returns the Collection of all groups in the system.Collection<String>
getGroupNames(org.xmpp.packet.JID user)
Returns the Collection of group names that an entity belongs to.boolean
isReadOnly()
Modifying group not implemented - read-only for nowboolean
isSearchSupported()
Returns true if the provider supports group search capability.Collection<String>
search(String query)
Returns a collection of group search results.Collection<String>
search(String query, int startIndex, int numResults)
Returns a collection of group search results.Collection<String>
search(String key, String value)
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, isSharingSupported, loadProperties, setDescription, setName, updateMember
-
-
-
-
Method Detail
-
getGroup
public Group getGroup(String name) throws GroupNotFoundException
Description copied from interface:GroupProvider
Returns a group based on it's name.- Parameters:
name
- the name of the group.- Returns:
- the group with the given name.
- Throws:
GroupNotFoundException
- If no group with that ID could be found
-
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.
-
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
andnumResults
.
-
search
public Collection<String> search(String query)
Description copied from class:AbstractGroupProvider
Returns a collection of group search results. This implementation returns an empty collection.- Specified by:
search
in interfaceGroupProvider
- Overrides:
search
in classAbstractGroupProvider
- Parameters:
query
- the search string for group names.- Returns:
- all groups that match the search.
-
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 interfaceGroupProvider
- Overrides:
search
in 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.
-
isReadOnly
public boolean isReadOnly()
Modifying group not implemented - read-only for now- Specified by:
isReadOnly
in interfaceGroupProvider
- Overrides:
isReadOnly
in classAbstractGroupProvider
- Returns:
- true if the user provider is read-only.
-
isSearchSupported
public boolean isSearchSupported()
Description copied from class:AbstractGroupProvider
Returns true if the provider supports group search capability. This implementation always returns false.- Specified by:
isSearchSupported
in interfaceGroupProvider
- Overrides:
isSearchSupported
in classAbstractGroupProvider
- Returns:
- true if searching is supported.
-
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 theGroupProvider.isSearchSupported()
method to ensure that searching is supported.- Specified by:
search
in interfaceGroupProvider
- Overrides:
search
in 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.
- See Also:
AbstractGroupProvider.search(java.lang.String, java.lang.String)
-
-