@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class MatchedValuesFilter extends java.lang.Object implements java.io.Serializable
MatchedValuesRequestControl
as defined in
RFC 3876. It is similar to
a search filter (see the Filter
class), but may only contain a single
element (i.e., no AND, OR, or NOT components are allowed), and extensible
matching does not allow the use of the dnAttributes field.Modifier and Type | Field and Description |
---|---|
static byte |
MATCH_TYPE_APPROXIMATE
The match type that will be used for approximate match filters.
|
static byte |
MATCH_TYPE_EQUALITY
The match type that will be used for equality match filters.
|
static byte |
MATCH_TYPE_EXTENSIBLE
The match type that will be used for extensible match filters.
|
static byte |
MATCH_TYPE_GREATER_OR_EQUAL
The match type that will be used for greater-or-equal match filters.
|
static byte |
MATCH_TYPE_LESS_OR_EQUAL
The match type that will be used for less-or-equal match filters.
|
static byte |
MATCH_TYPE_PRESENT
The match type that will be used for presence match filters.
|
static byte |
MATCH_TYPE_SUBSTRINGS
The match type that will be used for substring match filters.
|
Modifier and Type | Method and 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.
|
public static final byte MATCH_TYPE_EQUALITY
public static final byte MATCH_TYPE_SUBSTRINGS
public static final byte MATCH_TYPE_GREATER_OR_EQUAL
public static final byte MATCH_TYPE_LESS_OR_EQUAL
public static final byte MATCH_TYPE_PRESENT
public static final byte MATCH_TYPE_APPROXIMATE
public static final byte MATCH_TYPE_EXTENSIBLE
@NotNull public static MatchedValuesFilter createEqualityFilter(@NotNull java.lang.String attributeType, @NotNull java.lang.String assertionValue)
attributeType
- The attribute type for the filter. It must not be
null
.assertionValue
- The assertion value for the filter. It must not be
null
.@NotNull public static MatchedValuesFilter createEqualityFilter(@NotNull java.lang.String attributeType, @NotNull byte[] assertionValue)
attributeType
- The attribute type for the filter. It must not be
null
.assertionValue
- The assertion value for the filter. It must not be
null
.@NotNull public static MatchedValuesFilter createSubstringFilter(@NotNull java.lang.String attributeType, @Nullable java.lang.String subInitialValue, @Nullable java.lang.String[] subAnyValues, @Nullable java.lang.String subFinalValue)
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.@NotNull public static MatchedValuesFilter createSubstringFilter(@NotNull java.lang.String attributeType, @Nullable byte[] subInitialValue, @Nullable byte[][] subAnyValues, @Nullable byte[] subFinalValue)
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.@NotNull public static MatchedValuesFilter createGreaterOrEqualFilter(@NotNull java.lang.String attributeType, @NotNull java.lang.String assertionValue)
attributeType
- The attribute type for the filter. It must not be
null
.assertionValue
- The assertion value for the filter. It must not be
null
.@NotNull public static MatchedValuesFilter createGreaterOrEqualFilter(@NotNull java.lang.String attributeType, @NotNull byte[] assertionValue)
attributeType
- The attribute type for the filter. It must not be
null
.assertionValue
- The assertion value for the filter. It must not be
null
.@NotNull public static MatchedValuesFilter createLessOrEqualFilter(@NotNull java.lang.String attributeType, @NotNull java.lang.String assertionValue)
attributeType
- The attribute type for the filter. It must not be
null
.assertionValue
- The assertion value for the filter. It must not be
null
.@NotNull public static MatchedValuesFilter createLessOrEqualFilter(@NotNull java.lang.String attributeType, @NotNull byte[] assertionValue)
attributeType
- The attribute type for the filter. It must not be
null
.assertionValue
- The assertion value for the filter. It must not be
null
.@NotNull public static MatchedValuesFilter createPresentFilter(@NotNull java.lang.String attributeType)
attributeType
- The attribute type for the filter. It must not be
null
.@NotNull public static MatchedValuesFilter createApproximateFilter(@NotNull java.lang.String attributeType, @NotNull java.lang.String assertionValue)
attributeType
- The attribute type for the filter. It must not be
null
.assertionValue
- The assertion value for the filter. It must not be
null
.@NotNull public static MatchedValuesFilter createApproximateFilter(@NotNull java.lang.String attributeType, @NotNull byte[] assertionValue)
attributeType
- The attribute type for the filter. It must not be
null
.assertionValue
- The assertion value for the filter. It must not be
null
.@NotNull public static MatchedValuesFilter createExtensibleMatchFilter(@Nullable java.lang.String attributeType, @Nullable java.lang.String matchingRuleID, @NotNull java.lang.String assertionValue)
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
.@NotNull public static MatchedValuesFilter createExtensibleMatchFilter(@Nullable java.lang.String attributeType, @Nullable java.lang.String matchingRuleID, @NotNull byte[] assertionValue)
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
.@NotNull public static MatchedValuesFilter create(@NotNull Filter filter) throws LDAPException
filter
- The search filter to use to create this matched values
filter.LDAPException
- If the provided search filter cannot be represented
as a matched values filter.public byte getMatchType()
@Nullable public java.lang.String getAttributeType()
null
if there is none.@Nullable public java.lang.String getAssertionValue()
null
if there is none.@Nullable public byte[] getAssertionValueBytes()
null
if there is none.@Nullable public ASN1OctetString getRawAssertionValue()
null
if there is none.@Nullable public java.lang.String getSubInitialValue()
null
if there is none.@Nullable public byte[] getSubInitialValueBytes()
null
if there is none.@Nullable public ASN1OctetString getRawSubInitialValue()
null
if there is none.@NotNull public java.lang.String[] getSubAnyValues()
@NotNull public byte[][] getSubAnyValueBytes()
@NotNull public ASN1OctetString[] getRawSubAnyValues()
@Nullable public java.lang.String getSubFinalValue()
null
if there is none.@Nullable public byte[] getSubFinalValueBytes()
null
if there is none.@Nullable public ASN1OctetString getRawSubFinalValue()
null
if there is none.@Nullable public java.lang.String getMatchingRuleID()
null
if there is none.@NotNull public ASN1Element encode()
@NotNull public static MatchedValuesFilter decode(@NotNull ASN1Element element) throws LDAPException
element
- The ASN.1 element to decode as a matched values filter.LDAPException
- If the provided ASN.1 element cannot be decoded as
a matched values filter.@NotNull public Filter toFilter()
@NotNull public java.lang.String toString()
toString
in class java.lang.Object