|
Openfire 3.8.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.openfire.group.AbstractGroupProvider
public abstract class AbstractGroupProvider
Shared base class for Openfire GroupProvider implementations. By default
all mutator methods throw UnsupportedOperationException. In
addition, group search operations are disabled.
Subclasses may optionally implement these capabilities, and must also
at minimum implement the GroupProvider.getGroup(String) method.
| Constructor Summary | |
|---|---|
AbstractGroupProvider()
|
|
| Method Summary | |
|---|---|
void |
addMember(String groupName,
org.xmpp.packet.JID user,
boolean administrator)
Adds an entity to a group (optional operation). |
Group |
createGroup(String name)
Creates a group with the given name (optional operation). |
void |
deleteGroup(String name)
Deletes the group (optional operation). |
void |
deleteMember(String groupName,
org.xmpp.packet.JID user)
Deletes an entity from a group (optional operation). |
Collection<String> |
getPublicSharedGroupNames()
Returns an unmodifiable Collection of all public shared groups in the system. |
Collection<String> |
getSharedGroupNames()
Returns the name of the groups that are shared groups. |
Collection<String> |
getSharedGroupNames(org.xmpp.packet.JID user)
Returns an unmodifiable Collection of all shared groups in the system for a given user. |
Collection<String> |
getVisibleGroupNames(String userGroup)
Returns an unmodifiable Collection of groups that are visible to the members of the given group. |
boolean |
isReadOnly()
Always true for a read-only provider |
boolean |
isSearchSupported()
Returns true if the provider supports group search capability. |
boolean |
isSharingSupported()
Returns true if this GroupProvider allows group sharing. |
Map<String,String> |
loadProperties(Group group)
Returns a custom Map that updates the database whenever
a property value is added, changed, or deleted. |
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. |
void |
setDescription(String name,
String description)
Updates the group's description. |
void |
setName(String oldName,
String newName)
Sets the name of a group to a new name. |
void |
updateMember(String groupName,
org.xmpp.packet.JID user,
boolean administrator)
Updates the privileges of an entity in a group. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jivesoftware.openfire.group.GroupProvider |
|---|
getGroup, getGroupCount, getGroupNames, getGroupNames, getGroupNames |
| Constructor Detail |
|---|
public AbstractGroupProvider()
| Method Detail |
|---|
public void addMember(String groupName,
org.xmpp.packet.JID user,
boolean administrator)
GroupProvider
addMember in interface GroupProvidergroupName - the group to add the member touser - the JID of the entity to addadministrator - True if the member is an administrator of the group
UnsupportedOperationException
public void updateMember(String groupName,
org.xmpp.packet.JID user,
boolean administrator)
GroupProvider
updateMember in interface GroupProvidergroupName - the group where the change happeneduser - the JID of the entity with new privilegesadministrator - True if the member is an administrator of the group
UnsupportedOperationException
public void deleteMember(String groupName,
org.xmpp.packet.JID user)
GroupProvider
deleteMember in interface GroupProvidergroupName - the group name.user - the JID of the entity to delete.
UnsupportedOperationExceptionpublic boolean isReadOnly()
isReadOnly in interface GroupProviderpublic Group createGroup(String name)
GroupProviderThe provider is responsible for setting the creation date and modification date to the current date/time.
createGroup in interface GroupProvidername - name of the group.
UnsupportedOperationExceptionpublic void deleteGroup(String name)
GroupProvider
deleteGroup in interface GroupProvidername - the name of the group to delete.
UnsupportedOperationException
public void setName(String oldName,
String newName)
throws GroupAlreadyExistsException
GroupProvider
setName in interface GroupProvideroldName - the current name of the group.newName - the desired new name of the group.
UnsupportedOperationException
GroupAlreadyExistsException - if a group with the same name already
exists.
public void setDescription(String name,
String description)
throws GroupNotFoundException
GroupProvider
setDescription in interface GroupProvidername - the group name.description - the group description.
UnsupportedOperationException
GroupNotFoundException - if no existing group could be found to update.public boolean isSearchSupported()
isSearchSupported in interface GroupProviderpublic Collection<String> search(String query)
search in interface GroupProviderquery - the search string for group names.
public Collection<String> search(String query,
int startIndex,
int numResults)
search in interface GroupProviderquery - the search string for group names.startIndex - start index in results.numResults - number of results to return.
public Collection<String> getSharedGroupNames()
getSharedGroupNames in interface GroupProviderpublic Collection<String> getSharedGroupNames(org.xmpp.packet.JID user)
GroupProvider
getSharedGroupNames in interface GroupProviderpublic Collection<String> getVisibleGroupNames(String userGroup)
GroupProvider
getVisibleGroupNames in interface GroupProvideruserGroup - The given group
public Collection<String> search(String key,
String value)
GroupProviderGroupProvider.isSearchSupported() method
to ensure that searching is supported.
search in interface GroupProviderkey - The name of a group property (e.g. "sharedRoster.showInRoster")value - The value to match for the given property
public Collection<String> getPublicSharedGroupNames()
GroupProvider
getPublicSharedGroupNames in interface GroupProviderpublic boolean isSharingSupported()
GroupProvider
isSharingSupported in interface GroupProviderpublic Map<String,String> loadProperties(Group group)
Map that updates the database whenever
a property value is added, changed, or deleted.
loadProperties in interface GroupProvidername - The target group
|
Openfire 3.8.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||