|
Openfire 3.6.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.group.JDBCGroupProvider
public class JDBCGroupProvider
The JDBC group provider allows you to use an external database to define the make up of groups. It is best used with the JDBCAuthProvider to provide integration between your external system and Openfire. All data is treated as read-only so any set operations will result in an exception. To enable this provider, set the following in the system properties:
Constructor Summary | |
---|---|
JDBCGroupProvider()
Constructor of the JDBCGroupProvider class. |
Method Summary | |
---|---|
void |
addMember(String groupName,
JID user,
boolean administrator)
Always throws an UnsupportedOperationException because JDBC groups are read-only. |
Group |
createGroup(String name)
Always throws an UnsupportedOperationException because JDBC groups are read-only. |
void |
deleteGroup(String name)
Always throws an UnsupportedOperationException because JDBC groups are read-only. |
void |
deleteMember(String groupName,
JID user)
Always throws an UnsupportedOperationException because JDBC groups are read-only. |
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 start,
int num)
Returns the Collection of all groups in the system. |
Collection<String> |
getGroupNames(JID user)
Returns the Collection of group names that an entity belongs to. |
Collection<String> |
getSharedGroupsNames()
Returns an unmodifiable Collection of all shared groups in the system. |
boolean |
isReadOnly()
Always returns true because JDBC groups are read-only. |
boolean |
isSearchSupported()
Returns true if group searching is supported by the provider. |
Collection<String> |
search(String query)
Returns the group names that match a search. |
Collection<String> |
search(String query,
int startIndex,
int numResults)
Returns the group names that match a search given a start index and desired number of results. |
void |
setDescription(String name,
String description)
Always throws an UnsupportedOperationException because JDBC groups are read-only. |
void |
setName(String oldName,
String newName)
Always throws an UnsupportedOperationException because JDBC groups are read-only. |
void |
updateMember(String groupName,
JID user,
boolean administrator)
Always throws an UnsupportedOperationException because JDBC groups are read-only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JDBCGroupProvider()
Method Detail |
---|
public Group createGroup(String name) throws UnsupportedOperationException
createGroup
in interface GroupProvider
name
- the name of the group to create.
UnsupportedOperationException
- when called.public void deleteGroup(String name) throws UnsupportedOperationException
deleteGroup
in interface GroupProvider
name
- the name of the group to delete
UnsupportedOperationException
- when called.public Group getGroup(String name) throws GroupNotFoundException
GroupProvider
getGroup
in interface GroupProvider
name
- the name of the group.
GroupNotFoundException
- If no group with that ID could be foundpublic void setName(String oldName, String newName) throws UnsupportedOperationException
setName
in interface GroupProvider
oldName
- the current name of the group.newName
- the desired new name of the group.
UnsupportedOperationException
- when called.public void setDescription(String name, String description) throws UnsupportedOperationException
setDescription
in interface GroupProvider
name
- the group name.description
- the group description.
UnsupportedOperationException
- when called.public int getGroupCount()
GroupProvider
getGroupCount
in interface GroupProvider
public Collection<String> getSharedGroupsNames()
GroupProvider
getSharedGroupsNames
in interface GroupProvider
public Collection<String> getGroupNames()
GroupProvider
getGroupNames
in interface GroupProvider
public Collection<String> getGroupNames(int start, int num)
GroupProvider
getGroupNames
in interface GroupProvider
start
- start index in results.num
- number of results to return.
public Collection<String> getGroupNames(JID user)
GroupProvider
getGroupNames
in interface GroupProvider
user
- the JID of the entity.
public void addMember(String groupName, JID user, boolean administrator) throws UnsupportedOperationException
addMember
in interface GroupProvider
groupName
- name of a group.user
- the JID of the user to addadministrator
- true if is an administrator.
UnsupportedOperationException
- when called.public void updateMember(String groupName, JID user, boolean administrator) throws UnsupportedOperationException
updateMember
in interface GroupProvider
groupName
- the naame of a group.user
- the JID of the user with new privilegesadministrator
- true if is an administrator.
UnsupportedOperationException
- when called.public void deleteMember(String groupName, JID user) throws UnsupportedOperationException
deleteMember
in interface GroupProvider
groupName
- the name of a group.user
- the JID of the user to delete.
UnsupportedOperationException
- when called.public boolean isReadOnly()
isReadOnly
in interface GroupProvider
public Collection<String> search(String query)
GroupProvider
Before searching or showing a search UI, use the GroupProvider.isSearchSupported()
method
to ensure that searching is supported.
search
in interface GroupProvider
query
- the search string for group names.
public Collection<String> search(String query, int startIndex, int numResults)
GroupProvider
Before searching or showing a search UI, use the GroupProvider.isSearchSupported()
method
to ensure that searching is supported.
search
in interface GroupProvider
query
- the search string for group names.startIndex
- start index in results.numResults
- number of results to return.
public boolean isSearchSupported()
GroupProvider
isSearchSupported
in interface GroupProvider
|
Openfire 3.6.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |