Class NumSubordinateHacker


  • public class NumSubordinateHacker
    extends Object
    Class used to handle the case where numsubordinates does not work between databases.
    • Constructor Detail

      • NumSubordinateHacker

        public NumSubordinateHacker()
    • Method Detail

      • containsChildrenOf

        public boolean containsChildrenOf​(LDAPURL parentUrl)
        Tells whether the list of unreliable contains children of the entry with LDAPUrl parentUrl.
        Parameters:
        parentUrl - the LDAPURL of the parent.
        Returns:
        true if the list of unreliable entries contains a children of the parentUrl. Returns false otherwise.
      • contains

        public boolean contains​(LDAPURL url)
        Tells whether the list of unreliable contains the entry with LDAPURL url. It assumes that we previously called containsChildrenOf (there's no check of the host/port).
        Parameters:
        url - the LDAPURL of the parent.
        Returns:
        true if the url correspond to an unreliable entry and false otherwise.
      • update

        public void update​(Collection<DN> allSuffixes,
                           Collection<DN> rootSuffixes,
                           String serverHost,
                           int serverPort)
        This method construct a list with the entries the entries that are parents of the suffix entries. This list is needed to overpass the fact that numsubordinates does not work between databases.
        Parameters:
        allSuffixes - a collection with all the suffixes.
        rootSuffixes - a collection with the root suffixes.
        serverHost - the name of the host where the server is installed.
        serverPort - the LDAP(s) port of the server.