@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.FilterRefinement
A refinement which uses a search filter.
|
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,
org.opends.server.types.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.
|
org.opends.server.types.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, org.opends.server.types.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 org.opends.server.types.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-2017 ForgeRock AS. All Rights Reserved.