Class BaseSubtreeSpecification
java.lang.Object
org.apache.directory.api.ldap.model.subtree.BaseSubtreeSpecification
- All Implemented Interfaces:
SubtreeSpecification
A simple implementation of the SubtreeSpecification interface.
- Author:
- Apache Directory Project
-
Field Summary
Fields inherited from interface SubtreeSpecification
UNBOUNDED_MAX -
Constructor Summary
ConstructorsConstructorDescriptionCreates a simple subtree whose administrative point is necessarily the base and all subordinates underneath (excluding those that are part of inner areas) are part of the the subtree.BaseSubtreeSpecification(ExprNode refinement) Creates a simple subtree refinement whose administrative point is necessarily the base and only those subordinates selected by the refinement filter are included.BaseSubtreeSpecification(Dn base) Creates a simple subtree whose administrative point above the base and all subordinates underneath the base (excluding those that are part of inner areas) are part of the the subtree.BaseSubtreeSpecification(Dn base, int minBaseDistance, int maxBaseDistance, Set<Dn> chopAfter, Set<Dn> chopBefore) Creates a subtree without a refinement filter where all other aspects can be varied.BaseSubtreeSpecification(Dn base, int minBaseDistance, int maxBaseDistance, Set<Dn> chopAfter, Set<Dn> chopBefore, ExprNode refinement) Creates a subtree which may be a refinement filter where all aspects of the specification can be set. -
Method Summary
Modifier and TypeMethodDescriptiongetBase()Gets an Rdn relative to the administrative context where the subtree scope begins.A set of RDNs relative to the base entry representing chopAfter specificExclusions from the subtree.A set of RDNs relative to the base entry representing chopBefore specificExclusions from the subtree.intGets the distance after which to start excluding entries in the subtree or subtree refinement.intGets the distance at which to start including entries in the subtree.A subtree refinement represents a non-contiguous selection of entries using a limited filter expression where attribute assertions are based on the objectClass of the entries.toString()voidtoString(StringBuilder buffer) Converts this item into its string representation as stored in directory.
-
Constructor Details
-
BaseSubtreeSpecification
public BaseSubtreeSpecification()Creates a simple subtree whose administrative point is necessarily the base and all subordinates underneath (excluding those that are part of inner areas) are part of the the subtree. -
BaseSubtreeSpecification
Creates a simple subtree refinement whose administrative point is necessarily the base and only those subordinates selected by the refinement filter are included.- Parameters:
refinement- the filter expression only composed of objectClass attribute value assertions
-
BaseSubtreeSpecification
Creates a simple subtree whose administrative point above the base and all subordinates underneath the base (excluding those that are part of inner areas) are part of the the subtree.- Parameters:
base- the base of the subtree relative to the administrative point
-
BaseSubtreeSpecification
public BaseSubtreeSpecification(Dn base, int minBaseDistance, int maxBaseDistance, Set<Dn> chopAfter, Set<Dn> chopBefore) Creates a subtree without a refinement filter where all other aspects can be varied.- Parameters:
base- the base of the subtree relative to the administrative pointminBaseDistance- the minimum distance below base to start including entriesmaxBaseDistance- the maximum distance from base past which entries are excludedchopAfter- the set of subordinates entries whose subordinates are to be excludedchopBefore- the set of subordinates entries and their subordinates to exclude
-
BaseSubtreeSpecification
public BaseSubtreeSpecification(Dn base, int minBaseDistance, int maxBaseDistance, Set<Dn> chopAfter, Set<Dn> chopBefore, ExprNode refinement) Creates a subtree which may be a refinement filter where all aspects of the specification can be set. If the refinement filter is null this defaults toBaseSubtreeSpecification(org.apache.directory.api.ldap.model.name.Dn, int, int, Set, Set).- Parameters:
base- the base of the subtree relative to the administrative pointminBaseDistance- the minimum distance below base to start including entriesmaxBaseDistance- the maximum distance from base past which entries are excludedchopAfter- the set of subordinates entries whose subordinates are to be excludedchopBefore- the set of subordinates entries and their subordinates to excluderefinement- the filter expression only composed of objectClass attribute value assertions
-
-
Method Details
-
getBase
Description copied from interface:SubtreeSpecificationGets an Rdn relative to the administrative context where the subtree scope begins. All subentries containing these specifications are immediate subordinates to the administrative point, and are considered to be part of the same naming context. Hence the base for the subtree specification of a subentry immediately subordinate to dc=apache,dc=org would be relative to the dc=apache,dc=org context.- Specified by:
getBasein interfaceSubtreeSpecification- Returns:
- The base
-
getChopBeforeExclusions
Description copied from interface:SubtreeSpecificationA set of RDNs relative to the base entry representing chopBefore specificExclusions from the subtree. According to RFC 3672: "If the chopBefore form is used then the specified entry and its subordinates are excluded from the subtree or subtree refinement."- Specified by:
getChopBeforeExclusionsin interfaceSubtreeSpecification- Returns:
- The set of ChopBefore exclusions
-
getChopAfterExclusions
Description copied from interface:SubtreeSpecificationA set of RDNs relative to the base entry representing chopAfter specificExclusions from the subtree. According to RFC 3672: "If the chopAfter form is used then only the subordinates of the specified entry are excluded from the subtree or subtree refinement."- Specified by:
getChopAfterExclusionsin interfaceSubtreeSpecification- Returns:
- The set of ChopAfter exclusions
-
getMinBaseDistance
public int getMinBaseDistance()Description copied from interface:SubtreeSpecificationGets the distance at which to start including entries in the subtree. All entries whose Rdn arcs relative to the base are less than the minimum are excluded from the subtree or subtree refinement. The default is zero and therefore excludes nothing.- Specified by:
getMinBaseDistancein interfaceSubtreeSpecification- Returns:
- The mimimum distance from the base
-
getMaxBaseDistance
public int getMaxBaseDistance()Description copied from interface:SubtreeSpecificationGets the distance after which to start excluding entries in the subtree or subtree refinement. RFC 3672 Section 2.1.3 states: "Entries that are more than the maximum number of Rdn arcs below the base entry are excluded from the subtree or subtree refinement. An absent maximum component indicates that there is no upper limit on the number of Rdn arcs below the base entry for entries in the subtree or subtree refinement." If the maximum is limitless a negative value should be used to represent the maximum distance - which makes no sense other than to denote the lack of an upper limit.- Specified by:
getMaxBaseDistancein interfaceSubtreeSpecification- Returns:
- The maximum distance from the base
- See Also:
-
getRefinement
Description copied from interface:SubtreeSpecificationA subtree refinement represents a non-contiguous selection of entries using a limited filter expression where attribute assertions are based on the objectClass of the entries.- Specified by:
getRefinementin interfaceSubtreeSpecification- Returns:
- The refinement
-
toString
Converts this item into its string representation as stored in directory.- Specified by:
toStringin interfaceSubtreeSpecification- Parameters:
buffer- the string buffer
-
toString
-