public final class MatchedValuesFilter extends Object
Modifier and Type | Field and Description |
---|---|
static byte |
APPROXIMATE_MATCH_TYPE
The BER type associated with the approxMatch filter type.
|
static byte |
EQUALITY_MATCH_TYPE
The BER type associated with the equalityMatch filter type.
|
static byte |
EXTENSIBLE_MATCH_TYPE
The BER type associated with the extensibleMatch filter type.
|
static byte |
GREATER_OR_EQUAL_TYPE
The BER type associated with the greaterOrEqual filter type.
|
static byte |
LESS_OR_EQUAL_TYPE
The BER type associated with the lessOrEqual filter type.
|
static byte |
PRESENT_TYPE
The BER type associated with the present filter type.
|
static byte |
SUBSTRINGS_TYPE
The BER type associated with the substrings filter type.
|
Modifier and Type | Method and Description |
---|---|
static MatchedValuesFilter |
createApproximateFilter(AttributeType attributeType,
ByteString assertionValue)
Creates a new approxMatch filter with the provided information.
|
static MatchedValuesFilter |
createApproximateFilter(String rawAttributeType,
ByteString rawAssertionValue)
Creates a new approxMatch filter with the provided information.
|
static MatchedValuesFilter |
createEqualityFilter(AttributeType attributeType,
ByteString assertionValue)
Creates a new equalityMatch filter with the provided information.
|
static MatchedValuesFilter |
createEqualityFilter(String rawAttributeType,
ByteString rawAssertionValue)
Creates a new equalityMatch filter with the provided information.
|
static MatchedValuesFilter |
createExtensibleMatchFilter(AttributeType attributeType,
MatchingRule matchingRule,
ByteString assertionValue)
Creates a new extensibleMatch filter with the provided information.
|
static MatchedValuesFilter |
createExtensibleMatchFilter(String rawAttributeType,
String matchingRuleID,
ByteString rawAssertionValue)
Creates a new extensibleMatch filter with the provided information.
|
static MatchedValuesFilter |
createGreaterOrEqualFilter(AttributeType attributeType,
ByteString assertionValue)
Creates a new greaterOrEqual filter with the provided information.
|
static MatchedValuesFilter |
createGreaterOrEqualFilter(String rawAttributeType,
ByteString rawAssertionValue)
Creates a new greaterOrEqual filter with the provided information.
|
static MatchedValuesFilter |
createLessOrEqualFilter(AttributeType attributeType,
ByteString assertionValue)
Creates a new lessOrEqual filter with the provided information.
|
static MatchedValuesFilter |
createLessOrEqualFilter(String rawAttributeType,
ByteString rawAssertionValue)
Creates a new lessOrEqual filter with the provided information.
|
static MatchedValuesFilter |
createPresentFilter(AttributeType attributeType)
Creates a new present filter with the provided information.
|
static MatchedValuesFilter |
createPresentFilter(String rawAttributeType)
Creates a new present filter with the provided information.
|
static MatchedValuesFilter |
createSubstringsFilter(AttributeType attributeType,
ByteString subInitial,
List<ByteString> subAny,
ByteString subFinal)
Creates a new substrings filter with the provided information.
|
static MatchedValuesFilter |
createSubstringsFilter(String rawAttributeType,
ByteString subInitial,
List<ByteString> subAny,
ByteString subFinal)
Creates a new substrings filter with the provided information.
|
static MatchedValuesFilter |
decode(Asn1Reader reader)
Decodes the provided ASN.1 element as a matched values filter item.
|
void |
encode(Asn1Writer writer)
Encodes this matched values filter as an ASN.1 element.
|
MatchingRule |
getApproximateMatchingRule()
Retrieves the approximate matching rule that should be used for this matched values filter.
|
ByteString |
getAssertionValue()
Retrieves the assertion value for this matched values filter.
|
AttributeType |
getAttributeType()
Retrieves the attribute type for this matched values filter.
|
MatchingRule |
getEqualityMatchingRule()
Retrieves the equality matching rule that should be used for this matched values filter.
|
MatchingRule |
getMatchingRule()
Retrieves the matching rule for this matched values filter.
|
String |
getMatchingRuleID()
Retrieves the matching rule ID for this matched values filter.
|
byte |
getMatchType()
Retrieves the match type for this matched values filter.
|
MatchingRule |
getOrderingMatchingRule()
Retrieves the ordering matching rule that should be used for this matched values filter.
|
ByteString |
getRawAssertionValue()
Retrieves the raw, unprocessed assertion value for this matched values filter.
|
String |
getRawAttributeType()
Retrieves the raw, unprocessed attribute type for this matched values filter.
|
List<ByteString> |
getSubAnyElements()
Retrieves the set of subAny elements for this matched values filter.
|
ByteString |
getSubFinalElement()
Retrieves the subFinal element for this matched values filter.
|
ByteString |
getSubInitialElement()
Retrieves the subInitial element for this matched values filter.
|
MatchingRule |
getSubstringMatchingRule()
Retrieves the substring matching rule that should be used for this matched values filter.
|
String |
toString()
Retrieves a string representation of this matched values filter, as an RFC 2254-compliant filter string.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this matched values filter, as an RFC 2254-compliant filter string, to the
provided buffer.
|
boolean |
valueMatches(AttributeType type,
ByteString value)
Indicates whether the specified attribute value matches the criteria defined in this matched values filter.
|
public static final byte EQUALITY_MATCH_TYPE
public static final byte SUBSTRINGS_TYPE
public static final byte GREATER_OR_EQUAL_TYPE
public static final byte LESS_OR_EQUAL_TYPE
public static final byte PRESENT_TYPE
public static final byte APPROXIMATE_MATCH_TYPE
public static final byte EXTENSIBLE_MATCH_TYPE
public static MatchedValuesFilter createEqualityFilter(String rawAttributeType, ByteString rawAssertionValue)
rawAttributeType
- The raw, unprocessed attribute type.rawAssertionValue
- The raw, unprocessed assertion value.public static MatchedValuesFilter createEqualityFilter(AttributeType attributeType, ByteString assertionValue)
attributeType
- The attribute type.assertionValue
- The assertion value.public static MatchedValuesFilter createSubstringsFilter(String rawAttributeType, ByteString subInitial, List<ByteString> subAny, ByteString subFinal)
rawAttributeType
- The raw, unprocessed attribute type.subInitial
- The subInitial element.subAny
- The set of subAny elements.subFinal
- The subFinal element.public static MatchedValuesFilter createSubstringsFilter(AttributeType attributeType, ByteString subInitial, List<ByteString> subAny, ByteString subFinal)
attributeType
- The raw, unprocessed attribute type.subInitial
- The subInitial element.subAny
- The set of subAny elements.subFinal
- The subFinal element.public static MatchedValuesFilter createGreaterOrEqualFilter(String rawAttributeType, ByteString rawAssertionValue)
rawAttributeType
- The raw, unprocessed attribute type.rawAssertionValue
- The raw, unprocessed assertion value.public static MatchedValuesFilter createGreaterOrEqualFilter(AttributeType attributeType, ByteString assertionValue)
attributeType
- The attribute type.assertionValue
- The assertion value.public static MatchedValuesFilter createLessOrEqualFilter(String rawAttributeType, ByteString rawAssertionValue)
rawAttributeType
- The raw, unprocessed attribute type.rawAssertionValue
- The raw, unprocessed assertion value.public static MatchedValuesFilter createLessOrEqualFilter(AttributeType attributeType, ByteString assertionValue)
attributeType
- The attribute type.assertionValue
- The assertion value.public static MatchedValuesFilter createPresentFilter(String rawAttributeType)
rawAttributeType
- The raw, unprocessed attribute type.public static MatchedValuesFilter createPresentFilter(AttributeType attributeType)
attributeType
- The attribute type.public static MatchedValuesFilter createApproximateFilter(String rawAttributeType, ByteString rawAssertionValue)
rawAttributeType
- The raw, unprocessed attribute type.rawAssertionValue
- The raw, unprocessed assertion value.public static MatchedValuesFilter createApproximateFilter(AttributeType attributeType, ByteString assertionValue)
attributeType
- The attribute type.assertionValue
- The assertion value.public static MatchedValuesFilter createExtensibleMatchFilter(String rawAttributeType, String matchingRuleID, ByteString rawAssertionValue)
rawAttributeType
- The raw, unprocessed attribute type.matchingRuleID
- The matching rule ID.rawAssertionValue
- The raw, unprocessed assertion value.public static MatchedValuesFilter createExtensibleMatchFilter(AttributeType attributeType, MatchingRule matchingRule, ByteString assertionValue)
attributeType
- The attribute type.matchingRule
- The matching rule.assertionValue
- The assertion value.public void encode(Asn1Writer writer) throws IOException
writer
- The ASN1Writer to use to encode this matched values filter.IOException
- if an error occurs while encoding.public static MatchedValuesFilter decode(Asn1Reader reader) throws LDAPException
reader
- The ASN.1 reader.LDAPException
- If a problem occurs while attempting to decode the filter item.public byte getMatchType()
public String getRawAttributeType()
null
if there is
none.public AttributeType getAttributeType()
null
if there is none.public ByteString getRawAssertionValue()
null
if there is
none.public ByteString getAssertionValue()
null
if there is none.public ByteString getSubInitialElement()
null
if there is none.public List<ByteString> getSubAnyElements()
null
or an empty list.public ByteString getSubFinalElement()
null
if there is none.public String getMatchingRuleID()
null
if there is none.public MatchingRule getMatchingRule()
null
if there is none.public MatchingRule getApproximateMatchingRule()
null
if
there is none.public MatchingRule getEqualityMatchingRule()
null
if
there is none.public MatchingRule getOrderingMatchingRule()
null
if
there is none.public MatchingRule getSubstringMatchingRule()
null
if
there is none.public boolean valueMatches(AttributeType type, ByteString value)
type
- The attribute type with which the provided value is associated.value
- The attribute value for which to make the determination.true
if the specified attribute value matches the criteria defined in this matched values
filter, or false
if not.public String toString()
public void toString(StringBuilder buffer)
buffer
- The buffer to which the filter string should be appended.Copyright 2010-2020 ForgeRock AS.