Class SubtreeSpecification

    • Constructor Detail

      • SubtreeSpecification

        public SubtreeSpecification​(Dn rootDN)
        Create a dummy subtree specification. To be used when no subtree specification exists, for example in the case of old Draft based ldapSubEntry (non RFC3672 compliant).
        Parameters:
        rootDN - The root DN of the subtree.
    • Method Detail

      • valueOf

        public static SubtreeSpecification valueOf​(Dn rootDN,
                                                   String s)
                                            throws LdapException
        Parses the string argument as an RFC3672 subtree specification.
        Parameters:
        rootDN - The DN of the subtree specification's base entry.
        s - The string to be parsed.
        Returns:
        The RFC3672 subtree specification represented by the string argument.
        Throws:
        LdapException - If the string does not contain a parsable relative subtree specification.
      • equals

        public boolean equals​(Object obj)
        Indicates whether the provided object is logically equal to this subtree specification object.
        Overrides:
        equals in class Object
        Parameters:
        obj - The object for which to make the determination.
        Returns:
        true if the provided object is logically equal to this subtree specification object, or false if not.
      • getBaseDN

        public Dn getBaseDN()
        Get the absolute base DN of the subtree specification.
        Returns:
        Returns the absolute base DN of the subtree specification.
      • hashCode

        public int hashCode()
        Retrieves the hash code for this subtree specification object.
        Overrides:
        hashCode in class Object
        Returns:
        The hash code for this subtree specification object.
      • isDNWithinScope

        public boolean isDNWithinScope​(Dn dn)
        Determine if the specified DN is within the scope of the subtree specification.
        Parameters:
        dn - The distinguished name.
        Returns:
        Returns true if the DN is within the scope of the subtree specification, or false otherwise.
      • isWithinScope

        public boolean isWithinScope​(Entry entry)
        Determine if an entry is within the scope of the subtree specification.
        Parameters:
        entry - The entry.
        Returns:
        true if the entry is within the scope of the subtree specification, or false if not.
      • toString

        public String toString()
        Retrieves a string representation of this subtree specification object.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this subtree specification object.
      • toString

        public StringBuilder toString​(StringBuilder builder)
        Append the string representation of the subtree specification to the provided string builder.
        Parameters:
        builder - The string builder.
        Returns:
        The string builder.