Class MatchedValuesFilter

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static MatchedValuesFilter create​(Filter filter)
      Creates a new matched values filter from the provided search filter, if possible.
      static MatchedValuesFilter createApproximateFilter​(java.lang.String attributeType, byte[] assertionValue)
      Creates a new matched values filter for approximate matching with the provided information.
      static MatchedValuesFilter createApproximateFilter​(java.lang.String attributeType, java.lang.String assertionValue)
      Creates a new matched values filter for approximate matching with the provided information.
      static MatchedValuesFilter createEqualityFilter​(java.lang.String attributeType, byte[] assertionValue)
      Creates a new matched values filter for equality matching with the provided information.
      static MatchedValuesFilter createEqualityFilter​(java.lang.String attributeType, java.lang.String assertionValue)
      Creates a new matched values filter for equality matching with the provided information.
      static MatchedValuesFilter createExtensibleMatchFilter​(java.lang.String attributeType, java.lang.String matchingRuleID, byte[] assertionValue)
      Creates a new matched values filter for extensible matching with the provided information.
      static MatchedValuesFilter createExtensibleMatchFilter​(java.lang.String attributeType, java.lang.String matchingRuleID, java.lang.String assertionValue)
      Creates a new matched values filter for extensible matching with the provided information.
      static MatchedValuesFilter createGreaterOrEqualFilter​(java.lang.String attributeType, byte[] assertionValue)
      Creates a new matched values filter for greater-or-equal matching with the provided information.
      static MatchedValuesFilter createGreaterOrEqualFilter​(java.lang.String attributeType, java.lang.String assertionValue)
      Creates a new matched values filter for greater-or-equal matching with the provided information.
      static MatchedValuesFilter createLessOrEqualFilter​(java.lang.String attributeType, byte[] assertionValue)
      Creates a new matched values filter for less-or-equal matching with the provided information.
      static MatchedValuesFilter createLessOrEqualFilter​(java.lang.String attributeType, java.lang.String assertionValue)
      Creates a new matched values filter for less-or-equal matching with the provided information.
      static MatchedValuesFilter createPresentFilter​(java.lang.String attributeType)
      Creates a new matched values filter for presence matching with the provided information.
      static MatchedValuesFilter createSubstringFilter​(java.lang.String attributeType, byte[] subInitialValue, byte[][] subAnyValues, byte[] subFinalValue)
      Creates a new matched values filter for substring matching with the provided information.
      static MatchedValuesFilter createSubstringFilter​(java.lang.String attributeType, java.lang.String subInitialValue, java.lang.String[] subAnyValues, java.lang.String subFinalValue)
      Creates a new matched values filter for substring matching with the provided information.
      static MatchedValuesFilter decode​(ASN1Element element)
      Decodes the provided ASN.1 element as a matched values filter.
      ASN1Element encode()
      Encodes this matched values filter for use in the matched values control.
      java.lang.String getAssertionValue()
      Retrieves the string representation of the assertion value for this matched values filter, if available.
      byte[] getAssertionValueBytes()
      Retrieves the binary representation of the assertion value for this matched values filter, if available.
      java.lang.String getAttributeType()
      Retrieves the name of the attribute type for this matched values filter, if available.
      java.lang.String getMatchingRuleID()
      Retrieves the matching rule ID for this matched values filter, if available.
      byte getMatchType()
      Retrieves the match type for this matched values filter.
      ASN1OctetString getRawAssertionValue()
      Retrieves raw assertion value for this matched values filter, if available.
      ASN1OctetString[] getRawSubAnyValues()
      Retrieves the raw subAny elements for this matched values filter, if available.
      ASN1OctetString getRawSubFinalValue()
      Retrieves the raw subFinal element for this matched values filter, if available.
      ASN1OctetString getRawSubInitialValue()
      Retrieves the raw subInitial element for this matched values filter, if available.
      byte[][] getSubAnyValueBytes()
      Retrieves the binary representations of the subAny elements for this matched values filter, if available.
      java.lang.String[] getSubAnyValues()
      Retrieves the string representations of the subAny elements for this matched values filter, if available.
      java.lang.String getSubFinalValue()
      Retrieves the string representation of the subFinal element for this matched values filter, if available.
      byte[] getSubFinalValueBytes()
      Retrieves the binary representation of the subFinal element for this matched values filter, if available.
      java.lang.String getSubInitialValue()
      Retrieves the string representation of the subInitial element for this matched values filter, if available.
      byte[] getSubInitialValueBytes()
      Retrieves the binary representation of the subInitial element for this matched values filter, if available.
      Filter toFilter()
      Creates a search filter that is the equivalent of this matched values filter.
      java.lang.String toString()
      Retrieves a string representation of this matched values filter.
      void toString​(java.lang.StringBuilder buffer)
      Appends a string representation of this matched values filter to the provided buffer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • createEqualityFilter

        public static MatchedValuesFilter createEqualityFilter​(java.lang.String attributeType,
                                                               java.lang.String assertionValue)
        Creates a new matched values filter for equality matching with the provided information.
        Parameters:
        attributeType - The attribute type for the filter. It must not be null.
        assertionValue - The assertion value for the filter. It must not be null.
        Returns:
        The created equality match filter.
      • createEqualityFilter

        public static MatchedValuesFilter createEqualityFilter​(java.lang.String attributeType,
                                                               byte[] assertionValue)
        Creates a new matched values filter for equality matching with the provided information.
        Parameters:
        attributeType - The attribute type for the filter. It must not be null.
        assertionValue - The assertion value for the filter. It must not be null.
        Returns:
        The created equality match filter.
      • createSubstringFilter

        public static MatchedValuesFilter createSubstringFilter​(java.lang.String attributeType,
                                                                java.lang.String subInitialValue,
                                                                java.lang.String[] subAnyValues,
                                                                java.lang.String subFinalValue)
        Creates a new matched values filter for substring matching with the provided information. At least one substring filter element must be provided.
        Parameters:
        attributeType - The attribute type for the filter. It must not be null.
        subInitialValue - The subInitial value for the filter, or null if there is no subInitial element.
        subAnyValues - The set of subAny values for the filter, or null if there are no subAny elements.
        subFinalValue - The subFinal value for the filter, or null if there is no subFinal element.
        Returns:
        The created equality match filter.
      • createSubstringFilter

        public static MatchedValuesFilter createSubstringFilter​(java.lang.String attributeType,
                                                                byte[] subInitialValue,
                                                                byte[][] subAnyValues,
                                                                byte[] subFinalValue)
        Creates a new matched values filter for substring matching with the provided information. At least one substring filter element must be provided.
        Parameters:
        attributeType - The attribute type for the filter. It must not be null.
        subInitialValue - The subInitial value for the filter, or null if there is no subInitial element.
        subAnyValues - The set of subAny values for the filter, or null if there are no subAny elements.
        subFinalValue - The subFinal value for the filter, or null if there is no subFinal element.
        Returns:
        The created equality match filter.
      • createGreaterOrEqualFilter

        public static MatchedValuesFilter createGreaterOrEqualFilter​(java.lang.String attributeType,
                                                                     java.lang.String assertionValue)
        Creates a new matched values filter for greater-or-equal matching with the provided information.
        Parameters:
        attributeType - The attribute type for the filter. It must not be null.
        assertionValue - The assertion value for the filter. It must not be null.
        Returns:
        The created greater-or-equal match filter.
      • createGreaterOrEqualFilter

        public static MatchedValuesFilter createGreaterOrEqualFilter​(java.lang.String attributeType,
                                                                     byte[] assertionValue)
        Creates a new matched values filter for greater-or-equal matching with the provided information.
        Parameters:
        attributeType - The attribute type for the filter. It must not be null.
        assertionValue - The assertion value for the filter. It must not be null.
        Returns:
        The created greater-or-equal match filter.
      • createLessOrEqualFilter

        public static MatchedValuesFilter createLessOrEqualFilter​(java.lang.String attributeType,
                                                                  java.lang.String assertionValue)
        Creates a new matched values filter for less-or-equal matching with the provided information.
        Parameters:
        attributeType - The attribute type for the filter. It must not be null.
        assertionValue - The assertion value for the filter. It must not be null.
        Returns:
        The created less-or-equal match filter.
      • createLessOrEqualFilter

        public static MatchedValuesFilter createLessOrEqualFilter​(java.lang.String attributeType,
                                                                  byte[] assertionValue)
        Creates a new matched values filter for less-or-equal matching with the provided information.
        Parameters:
        attributeType - The attribute type for the filter. It must not be null.
        assertionValue - The assertion value for the filter. It must not be null.
        Returns:
        The created less-or-equal match filter.
      • createPresentFilter

        public static MatchedValuesFilter createPresentFilter​(java.lang.String attributeType)
        Creates a new matched values filter for presence matching with the provided information.
        Parameters:
        attributeType - The attribute type for the filter. It must not be null.
        Returns:
        The created present match filter.
      • createApproximateFilter

        public static MatchedValuesFilter createApproximateFilter​(java.lang.String attributeType,
                                                                  java.lang.String assertionValue)
        Creates a new matched values filter for approximate matching with the provided information.
        Parameters:
        attributeType - The attribute type for the filter. It must not be null.
        assertionValue - The assertion value for the filter. It must not be null.
        Returns:
        The created approximate match filter.
      • createApproximateFilter

        public static MatchedValuesFilter createApproximateFilter​(java.lang.String attributeType,
                                                                  byte[] assertionValue)
        Creates a new matched values filter for approximate matching with the provided information.
        Parameters:
        attributeType - The attribute type for the filter. It must not be null.
        assertionValue - The assertion value for the filter. It must not be null.
        Returns:
        The created greater-or-equal match filter.
      • createExtensibleMatchFilter

        public static MatchedValuesFilter createExtensibleMatchFilter​(java.lang.String attributeType,
                                                                      java.lang.String matchingRuleID,
                                                                      java.lang.String assertionValue)
        Creates a new matched values filter for extensible matching with the provided information. At least one of the attribute type and matching rule ID must be provided.
        Parameters:
        attributeType - The attribute type for the filter, or null if there is no attribute type.
        matchingRuleID - The matching rule ID for the filter, or null if there is no matching rule ID.
        assertionValue - The assertion value for the filter. It must not be null.
        Returns:
        The created extensible match filter.
      • createExtensibleMatchFilter

        public static MatchedValuesFilter createExtensibleMatchFilter​(java.lang.String attributeType,
                                                                      java.lang.String matchingRuleID,
                                                                      byte[] assertionValue)
        Creates a new matched values filter for extensible matching with the provided information. At least one of the attribute type and matching rule ID must be provided.
        Parameters:
        attributeType - The attribute type for the filter, or null if there is no attribute type.
        matchingRuleID - The matching rule ID for the filter, or null if there is no matching rule ID.
        assertionValue - The assertion value for the filter. It must not be null.
        Returns:
        The created extensible match filter.
      • create

        public static MatchedValuesFilter create​(Filter filter)
                                          throws LDAPException
        Creates a new matched values filter from the provided search filter, if possible.
        Parameters:
        filter - The search filter to use to create this matched values filter.
        Returns:
        The search filter that corresponds to this matched values filter.
        Throws:
        LDAPException - If the provided search filter cannot be represented as a matched values filter.
      • getMatchType

        public byte getMatchType()
        Retrieves the match type for this matched values filter.
        Returns:
        The match type for this matched values filter.
      • getAttributeType

        public java.lang.String getAttributeType()
        Retrieves the name of the attribute type for this matched values filter, if available.
        Returns:
        The name of the attribute type for this matched values filter, or null if there is none.
      • getAssertionValue

        public java.lang.String getAssertionValue()
        Retrieves the string representation of the assertion value for this matched values filter, if available.
        Returns:
        The string representation of the assertion value for this matched values filter, or null if there is none.
      • getAssertionValueBytes

        public byte[] getAssertionValueBytes()
        Retrieves the binary representation of the assertion value for this matched values filter, if available.
        Returns:
        The binary representation of the assertion value for this matched values filter, or null if there is none.
      • getRawAssertionValue

        public ASN1OctetString getRawAssertionValue()
        Retrieves raw assertion value for this matched values filter, if available.
        Returns:
        The raw assertion value for this matched values filter, or null if there is none.
      • getSubInitialValue

        public java.lang.String getSubInitialValue()
        Retrieves the string representation of the subInitial element for this matched values filter, if available.
        Returns:
        The string representation of the subInitial element for this matched values filter, or null if there is none.
      • getSubInitialValueBytes

        public byte[] getSubInitialValueBytes()
        Retrieves the binary representation of the subInitial element for this matched values filter, if available.
        Returns:
        The binary representation of the subInitial element for this matched values filter, or null if there is none.
      • getRawSubInitialValue

        public ASN1OctetString getRawSubInitialValue()
        Retrieves the raw subInitial element for this matched values filter, if available.
        Returns:
        The raw subInitial element for this matched values filter, or null if there is none.
      • getSubAnyValues

        public java.lang.String[] getSubAnyValues()
        Retrieves the string representations of the subAny elements for this matched values filter, if available.
        Returns:
        The string representations of the subAny element for this matched values filter, or an empty array if there are none.
      • getSubAnyValueBytes

        public byte[][] getSubAnyValueBytes()
        Retrieves the binary representations of the subAny elements for this matched values filter, if available.
        Returns:
        The binary representations of the subAny element for this matched values filter, or an empty array if there are none.
      • getRawSubAnyValues

        public ASN1OctetString[] getRawSubAnyValues()
        Retrieves the raw subAny elements for this matched values filter, if available.
        Returns:
        The raw subAny element for this matched values filter, or an empty array if there are none.
      • getSubFinalValue

        public java.lang.String getSubFinalValue()
        Retrieves the string representation of the subFinal element for this matched values filter, if available.
        Returns:
        The string representation of the subFinal element for this matched values filter, or null if there is none.
      • getSubFinalValueBytes

        public byte[] getSubFinalValueBytes()
        Retrieves the binary representation of the subFinal element for this matched values filter, if available.
        Returns:
        The binary representation of the subFinal element for this matched values filter, or null if there is none.
      • getRawSubFinalValue

        public ASN1OctetString getRawSubFinalValue()
        Retrieves the raw subFinal element for this matched values filter, if available.
        Returns:
        The raw subFinal element for this matched values filter, or null if there is none.
      • getMatchingRuleID

        public java.lang.String getMatchingRuleID()
        Retrieves the matching rule ID for this matched values filter, if available.
        Returns:
        The matching rule ID for this matched values filter, or null if there is none.
      • encode

        public ASN1Element encode()
        Encodes this matched values filter for use in the matched values control.
        Returns:
        The ASN.1 element containing the encoded representation of this matched values filter.
      • decode

        public static MatchedValuesFilter decode​(ASN1Element element)
                                          throws LDAPException
        Decodes the provided ASN.1 element as a matched values filter.
        Parameters:
        element - The ASN.1 element to decode as a matched values filter.
        Returns:
        The decoded matched values filter.
        Throws:
        LDAPException - If the provided ASN.1 element cannot be decoded as a matched values filter.
      • toFilter

        public Filter toFilter()
        Creates a search filter that is the equivalent of this matched values filter.
        Returns:
        A search filter that is the equivalent of this matched values filter.
      • toString

        public java.lang.String toString()
        Retrieves a string representation of this matched values filter.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of this matched values filter.
      • toString

        public void toString​(java.lang.StringBuilder buffer)
        Appends a string representation of this matched values filter to the provided buffer.
        Parameters:
        buffer - The buffer to which to append the string representation of this matched values filter.