Class MatchedValuesControl


  • public class MatchedValuesControl
    extends Control
    This class implements the matched values control as defined in RFC 3876. It may be included in a search request to indicate that only attribute values matching one or more filters contained in the matched values control should be returned to the client.
    • Constructor Detail

      • MatchedValuesControl

        public MatchedValuesControl​(boolean isCritical,
                                    List<MatchedValuesFilter> filters)
        Creates a new matched values control using the default OID and the provided criticality and set of filters.
        Parameters:
        isCritical - Indicates whether this control should be considered critical to the operation processing.
        filters - The set of filters to use to determine which values to return.
    • Method Detail

      • writeValue

        public void writeValue​(ASN1Writer writer)
                        throws IOException
        Description copied from class: Control
        Writes this control's value to an ASN.1 writer. The value (if any) must be written as an ASN1OctetString.
        Specified by:
        writeValue in class Control
        Parameters:
        writer - The ASN.1 writer to use.
        Throws:
        IOException - If a problem occurs while writing to the stream.
      • getFilters

        public List<MatchedValuesFilter> getFilters()
        Retrieves the set of filters associated with this matched values control.
        Returns:
        The set of filters associated with this matched values control.
      • valueMatches

        public boolean valueMatches​(AttributeType type,
                                    ByteString value)
        Indicates whether any of the filters associated with this matched values control matches the provided attribute type/value.
        Parameters:
        type - The attribute type with which the value is associated.
        value - The attribute value for which to make the determination.
        Returns:
        true if at least one of the filters associated with this matched values control does match the provided attribute value, or false if none of the filters match.
      • toString

        public void toString​(StringBuilder buffer)
        Description copied from class: Control
        Appends a string representation of this control to the provided buffer.
        Overrides:
        toString in class Control
        Parameters:
        buffer - The buffer to which the information should be appended.