Class LDAPGroupSubTree
- java.lang.Object
-
- org.silverpeas.core.admin.domain.driver.ldapdriver.AbstractLDAPGroup
-
- org.silverpeas.core.admin.domain.driver.ldapdriver.LDAPGroupSubTree
-
public class LDAPGroupSubTree extends AbstractLDAPGroup
This class manage groups that are described as follows : The group object are root to their children Method used to retrieve users and groups that are direct children of a given group : GroupG (i.e. children that have no groups between group node to their node) : 1) Search all child groups of GroupG 2) Sort the result by DN 3) Remove from the search all the groups that are not directly under GroupG (i.e. there is another group between). Those groups are the direct children of GroupG (result of "getChildGroupsEntryByLDAPEntry" call) 4) Performs a search of the users that have for baseDN GroupG's DN and that have NOT : (DN substring of any direct child groups' DN)- Author:
- tleroi
-
-
Constructor Summary
Constructors Constructor Description LDAPGroupSubTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.novell.ldap.LDAPEntry[]
getChildGroupsEntry(String lds, String parentId, String extraFilter)
Gets a set of LDAP entries that are the child groups of a parent one THIS FUNCTION THROW EXCEPTION ONLY WHEN NO SYNCHRO IS RUNNINGString[]
getGroupMemberGroupIds(String lds, String groupId)
Gets the group's parent groups IDs THIS FUNCTION ALWAYS THROW EXCEPTION (EVEN IF A SYNCHRO IS RUNNING)protected String[]
getUserIds(String lds, com.novell.ldap.LDAPEntry groupEntry)
Gets the users ID that are directly in the group describes by groupEntry THIS FUNCTION ALWAYS THROW EXCEPTION (EVEN IF A SYNCHRO IS RUNNING)String[]
getUserMemberGroupIds(String lds, String userId)
Gets the users groups IDs THIS FUNCTION ALWAYS THROW EXCEPTION (EVEN IF A SYNCHRO IS RUNNING)-
Methods inherited from class org.silverpeas.core.admin.domain.driver.ldapdriver.AbstractLDAPGroup
beginSynchronization, endSynchronization, getAllGroups, getGroup, getGroupByName, getGroupEntry, getGroupEntryByName, getGroups, getMemberEntry, getSpecificId, init, translateGroup, translateGroups
-
-
-
-
Method Detail
-
getGroupMemberGroupIds
public String[] getGroupMemberGroupIds(String lds, String groupId) throws AdminException
Description copied from class:AbstractLDAPGroup
Gets the group's parent groups IDs THIS FUNCTION ALWAYS THROW EXCEPTION (EVEN IF A SYNCHRO IS RUNNING)- Specified by:
getGroupMemberGroupIds
in classAbstractLDAPGroup
groupId
- the group's Id- Returns:
- the groups that contain the group
- Throws:
AdminException
- if an error occurs
-
getUserMemberGroupIds
public String[] getUserMemberGroupIds(String lds, String userId) throws AdminException
Description copied from class:AbstractLDAPGroup
Gets the users groups IDs THIS FUNCTION ALWAYS THROW EXCEPTION (EVEN IF A SYNCHRO IS RUNNING)- Specified by:
getUserMemberGroupIds
in classAbstractLDAPGroup
userId
- the user's Id- Returns:
- the groups that contain the user
- Throws:
AdminException
- if an error occurs.
-
getUserIds
protected String[] getUserIds(String lds, com.novell.ldap.LDAPEntry groupEntry) throws AdminException
Description copied from class:AbstractLDAPGroup
Gets the users ID that are directly in the group describes by groupEntry THIS FUNCTION ALWAYS THROW EXCEPTION (EVEN IF A SYNCHRO IS RUNNING)- Specified by:
getUserIds
in classAbstractLDAPGroup
groupEntry
- the group that contains users- Returns:
- the father's group ID or empty string if the group is at the root level
- Throws:
AdminException
- if an error occurs.
-
getChildGroupsEntry
protected com.novell.ldap.LDAPEntry[] getChildGroupsEntry(String lds, String parentId, String extraFilter) throws AdminException
Description copied from class:AbstractLDAPGroup
Gets a set of LDAP entries that are the child groups of a parent one THIS FUNCTION THROW EXCEPTION ONLY WHEN NO SYNCHRO IS RUNNING- Specified by:
getChildGroupsEntry
in classAbstractLDAPGroup
- Parameters:
lds
- the LDAP connectionparentId
- Id of the parent group- Returns:
- all founded child groups or root groups if parentId is equal to null or is empty
- Throws:
AdminException
- if an error occur during LDAP operations
-
-