Class BaseSubtreeSpecification

    • Constructor Summary

      Constructors 
      Constructor Description
      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​(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.
    • Constructor Detail

      • 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

        public 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.
        Parameters:
        refinement - the filter expression only composed of objectClass attribute value assertions
      • BaseSubtreeSpecification

        public 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.
        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 point
        minBaseDistance - the minimum distance below base to start including entries
        maxBaseDistance - the maximum distance from base past which entries are excluded
        chopAfter - the set of subordinates entries whose subordinates are to be excluded
        chopBefore - 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 to BaseSubtreeSpecification(org.apache.directory.api.ldap.model.name.Dn, int, int, Set, Set).
        Parameters:
        base - the base of the subtree relative to the administrative point
        minBaseDistance - the minimum distance below base to start including entries
        maxBaseDistance - the maximum distance from base past which entries are excluded
        chopAfter - the set of subordinates entries whose subordinates are to be excluded
        chopBefore - the set of subordinates entries and their subordinates to exclude
        refinement - the filter expression only composed of objectClass attribute value assertions
    • Method Detail

      • getBase

        public Dn getBase()
        Description copied from interface: SubtreeSpecification
        Gets 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:
        getBase in interface SubtreeSpecification
        Returns:
        The base
      • getChopBeforeExclusions

        public Set<DngetChopBeforeExclusions()
        Description copied from interface: SubtreeSpecification
        A 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:
        getChopBeforeExclusions in interface SubtreeSpecification
        Returns:
        The set of ChopBefore exclusions
      • getChopAfterExclusions

        public Set<DngetChopAfterExclusions()
        Description copied from interface: SubtreeSpecification
        A 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:
        getChopAfterExclusions in interface SubtreeSpecification
        Returns:
        The set of ChopAfter exclusions
      • getMinBaseDistance

        public int getMinBaseDistance()
        Description copied from interface: SubtreeSpecification
        Gets 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:
        getMinBaseDistance in interface SubtreeSpecification
        Returns:
        The mimimum distance from the base
      • getMaxBaseDistance

        public int getMaxBaseDistance()
        Description copied from interface: SubtreeSpecification
        Gets 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:
        getMaxBaseDistance in interface SubtreeSpecification
        Returns:
        The maximum distance from the base
        See Also:
        SubtreeSpecification.UNBOUNDED_MAX
      • getRefinement

        public ExprNode getRefinement()
        Description copied from interface: SubtreeSpecification
        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.
        Specified by:
        getRefinement in interface SubtreeSpecification
        Returns:
        The refinement