Class LDAPGroupSubTree


  • public class LDAPGroupSubTree
    extends AbstractLDAPGroup
    This class manage groups that are described as follows : The group object are root to their childs Method used to retreive users and groups that are direct childs of a given group : GroupG (i.e. childs 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 Detail

      • LDAPGroupSubTree

        public LDAPGroupSubTree()
    • Method Detail

      • getUserIds

        protected String[] getUserIds​(String lds,
                                      com.novell.ldap.LDAPEntry groupEntry)
                               throws AdminException
        Description copied from class: AbstractLDAPGroup
        return the users ID that are directly in the group discribes by groupEntry THIS FUNCTION ALWAYS THROW EXCEPTION (EVEN IF A SYNCHRO IS RUNNING)
        Specified by:
        getUserIds in class AbstractLDAPGroup
        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
      • getChildGroupsEntry

        protected com.novell.ldap.LDAPEntry[] getChildGroupsEntry​(String lds,
                                                                  String parentId,
                                                                  String extraFilter)
                                                           throws AdminException
        Description copied from class: AbstractLDAPGroup
        Return 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 class AbstractLDAPGroup
        Parameters:
        lds - the LDAP connection
        parentId - 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