@PublicAPI(stability=VOLATILE, mayInstantiate=false, mayExtend=true, mayInvoke=false) public final class SubtreeSpecification extends Object
This implementation extends RFC 3672 by supporting search filters
for specification filters. More specifically, the
Refinement product has been extended as follows:
Refinement = item / and / or / not / Filter Filter = dquote *SafeUTF8Character dquote
| Modifier and Type | Class and Description |
|---|---|
static class |
SubtreeSpecification.AndRefinement
RFC 3672 subtree specification AND refinement.
|
static class |
SubtreeSpecification.FilterRefinement
A refinement which uses a search filter.
|
static class |
SubtreeSpecification.ItemRefinement
RFC 3672 subtree specification Item refinement.
|
static class |
SubtreeSpecification.NotRefinement
RFC 3672 subtree specification NOT refinement.
|
static class |
SubtreeSpecification.OrRefinement
RFC 3672 subtree specification OR refinement.
|
protected static class |
SubtreeSpecification.Parser
Internal utility class which can be used by sub-classes to help
parse string representations.
|
static class |
SubtreeSpecification.Refinement
Abstract interface for RFC3672 specification filter refinements.
|
| Constructor and Description |
|---|
SubtreeSpecification(org.forgerock.opendj.ldap.DN rootDN,
org.forgerock.opendj.ldap.DN relativeBaseDN,
int minimumDepth,
int maximumDepth,
Iterable<org.forgerock.opendj.ldap.DN> chopBefore,
Iterable<org.forgerock.opendj.ldap.DN> chopAfter,
SubtreeSpecification.Refinement refinements)
Create a new RFC3672 subtree specification.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Indicates whether the provided object is logically equal to this
subtree specification object.
|
org.forgerock.opendj.ldap.DN |
getBaseDN()
Get the absolute base DN of the subtree specification.
|
Iterable<org.forgerock.opendj.ldap.DN> |
getChopAfter()
Get the set of chop after relative DNs.
|
Iterable<org.forgerock.opendj.ldap.DN> |
getChopBefore()
Get the set of chop before relative DNs.
|
int |
getMaximumDepth()
Get the maximum depth of the subtree specification.
|
int |
getMinimumDepth()
Get the minimum depth of the subtree specification.
|
SubtreeSpecification.Refinement |
getRefinements()
Get the specification filter refinements.
|
org.forgerock.opendj.ldap.DN |
getRelativeBaseDN()
Get the relative base DN.
|
org.forgerock.opendj.ldap.DN |
getRootDN()
Get the root DN.
|
int |
hashCode()
Retrieves the hash code for this subtree specification object.
|
boolean |
isDNWithinScope(org.forgerock.opendj.ldap.DN dn)
Determine if the specified DN is within the scope of the subtree
specification.
|
boolean |
isWithinScope(Entry entry)
Determine if an entry is within the scope of the subtree
specification.
|
String |
toString()
Retrieves a string representation of this subtree specification
object.
|
StringBuilder |
toString(StringBuilder builder)
Append the string representation of the subtree specification to
the provided string builder.
|
static SubtreeSpecification |
valueOf(org.forgerock.opendj.ldap.DN rootDN,
String s)
Parses the string argument as an RFC3672 subtree specification.
|
public SubtreeSpecification(org.forgerock.opendj.ldap.DN rootDN, org.forgerock.opendj.ldap.DN relativeBaseDN, int minimumDepth, int maximumDepth, Iterable<org.forgerock.opendj.ldap.DN> chopBefore, Iterable<org.forgerock.opendj.ldap.DN> chopAfter, SubtreeSpecification.Refinement refinements)
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.public static SubtreeSpecification valueOf(org.forgerock.opendj.ldap.DN rootDN, String s) throws DirectoryException
rootDN - The DN of the subtree specification's base entry.s - The string to be parsed.DirectoryException - If the string does not contain a parsable relative
subtree specification.public boolean equals(Object obj)
public org.forgerock.opendj.ldap.DN getBaseDN()
public Iterable<org.forgerock.opendj.ldap.DN> getChopAfter()
public Iterable<org.forgerock.opendj.ldap.DN> getChopBefore()
public int getMaximumDepth()
public int getMinimumDepth()
public SubtreeSpecification.Refinement getRefinements()
null if none were specified.public org.forgerock.opendj.ldap.DN getRelativeBaseDN()
null if
none was specified.public org.forgerock.opendj.ldap.DN getRootDN()
public int hashCode()
public boolean isDNWithinScope(org.forgerock.opendj.ldap.DN dn)
dn - The distinguished name.true if the DN is within the scope
of the subtree specification, or false
otherwise.public boolean isWithinScope(Entry entry)
entry - The entry.true if the entry is within the scope of the
subtree specification, or false if not.public String toString()
public StringBuilder toString(StringBuilder builder)
builder - The string builder.Copyright © 2010-2018 ForgeRock AS. All Rights Reserved.