Openfire 3.9.3 Javadoc

org.jivesoftware.openfire.group
Class JDBCGroupProvider

java.lang.Object
  extended by org.jivesoftware.openfire.group.AbstractGroupProvider
      extended by org.jivesoftware.openfire.group.JDBCGroupProvider
All Implemented Interfaces:
GroupProvider

public class JDBCGroupProvider
extends AbstractGroupProvider

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:

Then you need to set your driver, connection string and SQL statements: In order to use the configured JDBC connection provider do not use a JDBC connection string, set the following property

Author:
David Snopek

Constructor Summary
JDBCGroupProvider()
          Constructor of the JDBCGroupProvider class.
 
Method Summary
 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(org.xmpp.packet.JID user)
          Returns the Collection of group names that an entity belongs to.
 
Methods inherited from class org.jivesoftware.openfire.group.AbstractGroupProvider
addMember, createGroup, deleteGroup, deleteMember, getPublicSharedGroupNames, getSharedGroupNames, getSharedGroupNames, getVisibleGroupNames, isReadOnly, isSearchSupported, isSharingSupported, loadProperties, search, search, search, setDescription, setName, updateMember
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCGroupProvider

public JDBCGroupProvider()
Constructor of the JDBCGroupProvider class.

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

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 start,
                                        int num)
Description copied from interface: GroupProvider
Returns the Collection of all groups in the system.

Parameters:
start - start index in results.
num - 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.

Openfire 3.9.3 Javadoc

Copyright © 2003-2008 Jive Software.