Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.ldap
Class LdapGroupManager

java.lang.Object
  extended by com.jivesoftware.base.ldap.LdapGroupManager
All Implemented Interfaces:
GroupManager

public class LdapGroupManager
extends java.lang.Object
implements GroupManager


Constructor Summary
LdapGroupManager()
          Constructor of the LdapGroupProvider class.
 
Method Summary
 Group createGroup(java.lang.String name)
          Factory method for creating a new Group.
 void deleteGroup(Group group)
          Deletes a group from the system.
 Group getGroup(long groupID)
          Gets a Group by ID.
 Group getGroup(java.lang.String name)
          Gets a Group by name.
 int getGroupCount()
          Returns the total number of groups in the system.
 LongList getGroupIDs(User user)
          Returns a list of group ids for all the groups that the user is a member of.
 java.util.Iterator getGroups()
          Returns an iterator for all groups in the system.
 java.util.Iterator getGroups(int startIndex, int numResults)
          Returns an iterator for all groups starting at startIndex with the given number of results.
 java.util.Iterator getUserGroups(User user)
          Returns an iterator for all groups that a user is a member of.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapGroupManager

public LdapGroupManager()
Constructor of the LdapGroupProvider class. Gets an LdapManager instance from the LdapManager class.

Method Detail

createGroup

public Group createGroup(java.lang.String name)
                  throws GroupAlreadyExistsException
Description copied from interface: GroupManager
Factory method for creating a new Group. A unique name is the only required field.

Specified by:
createGroup in interface GroupManager
Parameters:
name - the new and unique name for the group.
Returns:
a new group.
Throws:
GroupAlreadyExistsException - if the group name already exists in the system.

getGroup

public Group getGroup(long groupID)
               throws GroupNotFoundException
Description copied from interface: GroupManager
Gets a Group by ID. throws GroupNotFoundException if the group does not exist.

Specified by:
getGroup in interface GroupManager
Throws:
GroupNotFoundException

getGroup

public Group getGroup(java.lang.String name)
               throws GroupNotFoundException
Description copied from interface: GroupManager
Gets a Group by name. throws GroupNotFoundException if the group does not exist.

Specified by:
getGroup in interface GroupManager
Throws:
GroupNotFoundException

deleteGroup

public void deleteGroup(Group group)
                 throws UnauthorizedException
Description copied from interface: GroupManager
Deletes a group from the system.

Specified by:
deleteGroup in interface GroupManager
Parameters:
group - the group to delete.
Throws:
UnauthorizedException - if not a system administrator.

getGroupCount

public int getGroupCount()
Description copied from interface: GroupManager
Returns the total number of groups in the system.

Specified by:
getGroupCount in interface GroupManager
Returns:
the total number of groups.

getGroups

public java.util.Iterator getGroups()
Description copied from interface: GroupManager
Returns an iterator for all groups in the system.

Specified by:
getGroups in interface GroupManager
Returns:
an Iterator for all groups.

getGroups

public java.util.Iterator getGroups(int startIndex,
                                    int numResults)
Description copied from interface: GroupManager
Returns an iterator for all groups starting at startIndex with the given number of results. This is useful to support pagination in a GUI where you may only want to display a certain number of results per page. It is possible that the number of results returned will be less than that specified by numResults if numResults is greater than the number of records left in the system to display.

Specified by:
getGroups in interface GroupManager
Parameters:
startIndex - the beginning index to start the results at.
numResults - the total number of results to return.
Returns:
an Iterator for all groups in the specified range.

getUserGroups

public java.util.Iterator getUserGroups(User user)
Description copied from interface: GroupManager
Returns an iterator for all groups that a user is a member of.

Specified by:
getUserGroups in interface GroupManager
Parameters:
user - the user to get a list of groups for.
Returns:
all groups that a user belongs to.

getGroupIDs

public LongList getGroupIDs(User user)
Description copied from interface: GroupManager
Returns a list of group ids for all the groups that the user is a member of.

Specified by:
getGroupIDs in interface GroupManager
Parameters:
user - the user to get a list of groups for.
Returns:
all groups that a user belongs to.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.