Class SubtreeSpecification

    • Constructor Detail

      • SubtreeSpecification

        public SubtreeSpecification​(DN rootDN,
                                    DN relativeBaseDN,
                                    int minimumDepth,
                                    int maximumDepth,
                                    Iterable<DN> chopBefore,
                                    Iterable<DN> chopAfter,
                                    org.opends.server.types.SubtreeSpecification.Refinement refinements)
        Create a new RFC3672 subtree specification.
        Parameters:
        rootDN - The root DN of the subtree.
        relativeBaseDN - The relative base DN (or null if not specified).
        minimumDepth - The minimum depth (less than or equal to 0 means unlimited).
        maximumDepth - The maximum depth (less than 0 means unlimited).
        chopBefore - The set of chop before local names (relative to the relative base DN), or null if there are none.
        chopAfter - The set of chop after local names (relative to the relative base DN), or null if there are none.
        refinements - The optional specification filter refinements, or null if there are none.
    • Method Detail

      • valueOf

        public static SubtreeSpecification valueOf​(DN rootDN,
                                                   String s)
                                            throws DirectoryException
        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:
        DirectoryException - 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.
      • getChopAfter

        public Iterable<DN> getChopAfter()
        Get the set of chop after relative DNs.
        Returns:
        Returns the set of chop after relative DNs.
      • getChopBefore

        public Iterable<DN> getChopBefore()
        Get the set of chop before relative DNs.
        Returns:
        Returns the set of chop before relative DNs.
      • getMaximumDepth

        public int getMaximumDepth()
        Get the maximum depth of the subtree specification.
        Returns:
        Returns the maximum depth (less than 0 indicates unlimited depth).
      • getMinimumDepth

        public int getMinimumDepth()
        Get the minimum depth of the subtree specification.
        Returns:
        Returns the minimum depth (<=0 indicates unlimited depth).
      • getRefinements

        public org.opends.server.types.SubtreeSpecification.Refinement getRefinements()
        Get the specification filter refinements.
        Returns:
        Returns the specification filter refinements, or null if none were specified.
      • getRelativeBaseDN

        public DN getRelativeBaseDN()
        Get the relative base DN.
        Returns:
        Returns the relative base DN or null if none was specified.
      • getRootDN

        public DN getRootDN()
        Get the root DN.
        Returns:
        Returns the root DN.
      • 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.