Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.ldap
Class LdapSearchGroupManager

java.lang.Object
  extended by com.jivesoftware.base.ldap.LdapSearchGroupManager
All Implemented Interfaces:
GroupManager, IntrospectiveGroupManager

public class LdapSearchGroupManager
extends java.lang.Object
implements IntrospectiveGroupManager

Manages the LDAP search groups. An ldap search group refers to the LDAP Search Manager for its group memebers and wraps an instance of DbGroup in order to maintain all other aspects of the group.


Field Summary
static java.lang.String PROPERTY_BASEDN
           
static java.lang.String PROPERTY_SEARCH
           
 
Constructor Summary
LdapSearchGroupManager()
           
 
Method Summary
 Group createGroup(java.lang.String name)
          Factory method for creating a new Group.
 Group createGroup(java.lang.String name, java.lang.String searchFilter)
           
 void deleteGroup(Group group)
          Deletes a group from the system.
protected static DbGroupManager getDbGroupManager()
           
 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.
 boolean isCreateGroupSupported()
          Indicates whether the GroupManager supports creating groups via the createGroups() method.
 boolean isDeleteGroupSupported()
          Indicates whether the GroupManager supports deleting groups via the deleteGroups() method.
 boolean isGetUserGroupsSupported()
          Indicates whether the GroupManager supports getting a listing of all groups for a given user via the getUserGroups() method.
 boolean isGroupListSupported()
          Indicates whether the GroupManager supports getting a listing of all groups via the getGroups() method.
 boolean isReadOnly()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_BASEDN

public static final java.lang.String PROPERTY_BASEDN
See Also:
Constant Field Values

PROPERTY_SEARCH

public static final java.lang.String PROPERTY_SEARCH
See Also:
Constant Field Values
Constructor Detail

LdapSearchGroupManager

public LdapSearchGroupManager()
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.

createGroup

public Group createGroup(java.lang.String name,
                         java.lang.String searchFilter)
                  throws GroupAlreadyExistsException
Throws:
GroupAlreadyExistsException

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.

isCreateGroupSupported

public boolean isCreateGroupSupported()
Description copied from interface: IntrospectiveGroupManager
Indicates whether the GroupManager supports creating groups via the createGroups() method.

Specified by:
isCreateGroupSupported in interface IntrospectiveGroupManager
Returns:
true if creating a new group through the GroupManager is supported.

isDeleteGroupSupported

public boolean isDeleteGroupSupported()
Description copied from interface: IntrospectiveGroupManager
Indicates whether the GroupManager supports deleting groups via the deleteGroups() method.

Specified by:
isDeleteGroupSupported in interface IntrospectiveGroupManager
Returns:
true if deleting a group through the GroupManager is supported.

isGroupListSupported

public boolean isGroupListSupported()
Description copied from interface: IntrospectiveGroupManager
Indicates whether the GroupManager supports getting a listing of all groups via the getGroups() method.

Specified by:
isGroupListSupported in interface IntrospectiveGroupManager
Returns:
true if getGroups() is implemented.

isGetUserGroupsSupported

public boolean isGetUserGroupsSupported()
Description copied from interface: IntrospectiveGroupManager
Indicates whether the GroupManager supports getting a listing of all groups for a given user via the getUserGroups() method.

Specified by:
isGetUserGroupsSupported in interface IntrospectiveGroupManager
Returns:
true if getUserGroups(User user) is implemented.

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface IntrospectiveGroupManager

getDbGroupManager

protected static DbGroupManager getDbGroupManager()

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.