public 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(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
org.forgerock.opendj.ldap.ByteString assertionValue)
Creates a new approxMatch filter with the provided information.
|
static MatchedValuesFilter |
createApproximateFilter(String rawAttributeType,
org.forgerock.opendj.ldap.ByteString rawAssertionValue)
Creates a new approxMatch filter with the provided information.
|
static MatchedValuesFilter |
createEqualityFilter(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
org.forgerock.opendj.ldap.ByteString assertionValue)
Creates a new equalityMatch filter with the provided information.
|
static MatchedValuesFilter |
createEqualityFilter(String rawAttributeType,
org.forgerock.opendj.ldap.ByteString rawAssertionValue)
Creates a new equalityMatch filter with the provided information.
|
static MatchedValuesFilter |
createExtensibleMatchFilter(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
org.forgerock.opendj.ldap.schema.MatchingRule matchingRule,
org.forgerock.opendj.ldap.ByteString assertionValue)
Creates a new extensibleMatch filter with the provided information.
|
static MatchedValuesFilter |
createExtensibleMatchFilter(String rawAttributeType,
String matchingRuleID,
org.forgerock.opendj.ldap.ByteString rawAssertionValue)
Creates a new extensibleMatch filter with the provided information.
|
static MatchedValuesFilter |
createFromLDAPFilter(RawFilter filter)
Creates a new matched values filter from the provided LDAP filter.
|
static MatchedValuesFilter |
createGreaterOrEqualFilter(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
org.forgerock.opendj.ldap.ByteString assertionValue)
Creates a new greaterOrEqual filter with the provided information.
|
static MatchedValuesFilter |
createGreaterOrEqualFilter(String rawAttributeType,
org.forgerock.opendj.ldap.ByteString rawAssertionValue)
Creates a new greaterOrEqual filter with the provided information.
|
static MatchedValuesFilter |
createLessOrEqualFilter(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
org.forgerock.opendj.ldap.ByteString assertionValue)
Creates a new lessOrEqual filter with the provided information.
|
static MatchedValuesFilter |
createLessOrEqualFilter(String rawAttributeType,
org.forgerock.opendj.ldap.ByteString rawAssertionValue)
Creates a new lessOrEqual filter with the provided information.
|
static MatchedValuesFilter |
createPresentFilter(org.forgerock.opendj.ldap.schema.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(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
org.forgerock.opendj.ldap.ByteString subInitial,
List<org.forgerock.opendj.ldap.ByteString> subAny,
org.forgerock.opendj.ldap.ByteString subFinal)
Creates a new substrings filter with the provided information.
|
static MatchedValuesFilter |
createSubstringsFilter(String rawAttributeType,
org.forgerock.opendj.ldap.ByteString subInitial,
List<org.forgerock.opendj.ldap.ByteString> subAny,
org.forgerock.opendj.ldap.ByteString subFinal)
Creates a new substrings filter with the provided information.
|
static MatchedValuesFilter |
decode(org.forgerock.opendj.io.Asn1Reader reader)
Decodes the provided ASN.1 element as a matched values filter item.
|
void |
encode(org.forgerock.opendj.io.Asn1Writer writer)
Encodes this matched values filter as an ASN.1 element.
|
org.forgerock.opendj.ldap.schema.MatchingRule |
getApproximateMatchingRule()
Retrieves the approximate matching rule that should be used for this
matched values filter.
|
org.forgerock.opendj.ldap.ByteString |
getAssertionValue()
Retrieves the assertion value for this matched values filter.
|
org.forgerock.opendj.ldap.schema.AttributeType |
getAttributeType()
Retrieves the attribute type for this matched values filter.
|
org.forgerock.opendj.ldap.schema.MatchingRule |
getEqualityMatchingRule()
Retrieves the equality matching rule that should be used for this matched
values filter.
|
org.forgerock.opendj.ldap.schema.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.
|
org.forgerock.opendj.ldap.schema.MatchingRule |
getOrderingMatchingRule()
Retrieves the ordering matching rule that should be used for this matched
values filter.
|
org.forgerock.opendj.ldap.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<org.forgerock.opendj.ldap.ByteString> |
getSubAnyElements()
Retrieves the set of subAny elements for this matched values filter.
|
org.forgerock.opendj.ldap.ByteString |
getSubFinalElement()
Retrieves the subFinal element for this matched values filter.
|
org.forgerock.opendj.ldap.ByteString |
getSubInitialElement()
Retrieves the subInitial element for this matched values filter.
|
org.forgerock.opendj.ldap.schema.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(org.forgerock.opendj.ldap.schema.AttributeType type,
org.forgerock.opendj.ldap.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, org.forgerock.opendj.ldap.ByteString rawAssertionValue)
rawAttributeType
- The raw, unprocessed attribute type.rawAssertionValue
- The raw, unprocessed assertion value.public static MatchedValuesFilter createEqualityFilter(org.forgerock.opendj.ldap.schema.AttributeType attributeType, org.forgerock.opendj.ldap.ByteString assertionValue)
attributeType
- The attribute type.assertionValue
- The assertion value.public static MatchedValuesFilter createSubstringsFilter(String rawAttributeType, org.forgerock.opendj.ldap.ByteString subInitial, List<org.forgerock.opendj.ldap.ByteString> subAny, org.forgerock.opendj.ldap.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(org.forgerock.opendj.ldap.schema.AttributeType attributeType, org.forgerock.opendj.ldap.ByteString subInitial, List<org.forgerock.opendj.ldap.ByteString> subAny, org.forgerock.opendj.ldap.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, org.forgerock.opendj.ldap.ByteString rawAssertionValue)
rawAttributeType
- The raw, unprocessed attribute type.rawAssertionValue
- The raw, unprocessed assertion value.public static MatchedValuesFilter createGreaterOrEqualFilter(org.forgerock.opendj.ldap.schema.AttributeType attributeType, org.forgerock.opendj.ldap.ByteString assertionValue)
attributeType
- The attribute type.assertionValue
- The assertion value.public static MatchedValuesFilter createLessOrEqualFilter(String rawAttributeType, org.forgerock.opendj.ldap.ByteString rawAssertionValue)
rawAttributeType
- The raw, unprocessed attribute type.rawAssertionValue
- The raw, unprocessed assertion value.public static MatchedValuesFilter createLessOrEqualFilter(org.forgerock.opendj.ldap.schema.AttributeType attributeType, org.forgerock.opendj.ldap.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(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
attributeType
- The attribute type.public static MatchedValuesFilter createApproximateFilter(String rawAttributeType, org.forgerock.opendj.ldap.ByteString rawAssertionValue)
rawAttributeType
- The raw, unprocessed attribute type.rawAssertionValue
- The raw, unprocessed assertion value.public static MatchedValuesFilter createApproximateFilter(org.forgerock.opendj.ldap.schema.AttributeType attributeType, org.forgerock.opendj.ldap.ByteString assertionValue)
attributeType
- The attribute type.assertionValue
- The assertion value.public static MatchedValuesFilter createExtensibleMatchFilter(String rawAttributeType, String matchingRuleID, org.forgerock.opendj.ldap.ByteString rawAssertionValue)
rawAttributeType
- The raw, unprocessed attribute type.matchingRuleID
- The matching rule ID.rawAssertionValue
- The raw, unprocessed assertion value.public static MatchedValuesFilter createExtensibleMatchFilter(org.forgerock.opendj.ldap.schema.AttributeType attributeType, org.forgerock.opendj.ldap.schema.MatchingRule matchingRule, org.forgerock.opendj.ldap.ByteString assertionValue)
attributeType
- The attribute type.matchingRule
- The matching rule.assertionValue
- The assertion value.public static MatchedValuesFilter createFromLDAPFilter(RawFilter filter) throws LDAPException
filter
- The LDAP filter to use for this matched values filter.LDAPException
- If the provided LDAP filter cannot be treated as a
matched values filter.public void encode(org.forgerock.opendj.io.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(org.forgerock.opendj.io.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 org.forgerock.opendj.ldap.schema.AttributeType getAttributeType()
null
if there is none.public org.forgerock.opendj.ldap.ByteString getRawAssertionValue()
null
if there is none.public org.forgerock.opendj.ldap.ByteString getAssertionValue()
null
if there is none.public org.forgerock.opendj.ldap.ByteString getSubInitialElement()
null
if there is none.public List<org.forgerock.opendj.ldap.ByteString> getSubAnyElements()
null
or an empty list.public org.forgerock.opendj.ldap.ByteString getSubFinalElement()
null
if there is none.public String getMatchingRuleID()
null
if there is none.public org.forgerock.opendj.ldap.schema.MatchingRule getMatchingRule()
null
if there is none.public org.forgerock.opendj.ldap.schema.MatchingRule getApproximateMatchingRule()
null
if there is none.public org.forgerock.opendj.ldap.schema.MatchingRule getEqualityMatchingRule()
null
if there is none.public org.forgerock.opendj.ldap.schema.MatchingRule getOrderingMatchingRule()
null
if there is none.public org.forgerock.opendj.ldap.schema.MatchingRule getSubstringMatchingRule()
null
if there is none.public boolean valueMatches(org.forgerock.opendj.ldap.schema.AttributeType type, org.forgerock.opendj.ldap.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-2017 ForgeRock AS. All Rights Reserved.