org.opends.server.api
Class EqualityMatchingRule
java.lang.Object
org.opends.server.api.MatchingRule<EqualityMatchingRuleCfg>
org.opends.server.api.EqualityMatchingRule
- Direct Known Subclasses:
- AuthPasswordEqualityMatchingRule, AuthPasswordExactEqualityMatchingRule, BitStringEqualityMatchingRule, BooleanEqualityMatchingRule, CaseExactEqualityMatchingRule, CaseExactIA5EqualityMatchingRule, CaseIgnoreEqualityMatchingRule, CaseIgnoreIA5EqualityMatchingRule, CaseIgnoreListEqualityMatchingRule, DirectoryStringFirstComponentEqualityMatchingRule, DistinguishedNameEqualityMatchingRule, GeneralizedTimeEqualityMatchingRule, IntegerEqualityMatchingRule, IntegerFirstComponentEqualityMatchingRule, NumericStringEqualityMatchingRule, ObjectIdentifierEqualityMatchingRule, ObjectIdentifierFirstComponentEqualityMatchingRule, OctetStringEqualityMatchingRule, PresentationAddressEqualityMatchingRule, ProtocolInformationEqualityMatchingRule, TelephoneNumberEqualityMatchingRule, UniqueMemberEqualityMatchingRule, UserPasswordEqualityMatchingRule, UserPasswordExactEqualityMatchingRule, UUIDEqualityMatchingRule, WordEqualityMatchingRule
@PublicAPI(stability=VOLATILE,
mayInstantiate=false,
mayExtend=true,
mayInvoke=false)
public abstract class EqualityMatchingRule
- extends MatchingRule<EqualityMatchingRuleCfg>
This class defines the set of methods and structures that must be
implemented by a Directory Server module that implements a matching
rule used for equality matching.
Methods inherited from class org.opends.server.api.MatchingRule |
equals, finalizeMatchingRule, getDescription, getName, getNameOrOID, getOID, getSyntaxOID, hashCode, initializeMatchingRule, isConfigurationAcceptable, isObsolete, normalizeValue, toString, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
EqualityMatchingRule
public EqualityMatchingRule()
areEqual
public abstract boolean areEqual(ByteString value1,
ByteString value2)
- Indicates whether the two provided normalized values are equal to
each other.
- Parameters:
value1
- The normalized form of the first value to
compare.value2
- The normalized form of the second value to
compare.
- Returns:
true
if the provided values are equal, or
false
if not.
valuesMatch
public ConditionResult valuesMatch(ByteString attributeValue,
ByteString assertionValue)
- Indicates whether the provided attribute value should be
considered a match for the given assertion value. This will only
be used for the purpose of extensible matching. Other forms of
matching against equality matching rules should use the
areEqual
method.
- Specified by:
valuesMatch
in class MatchingRule<EqualityMatchingRuleCfg>
- Parameters:
attributeValue
- The attribute value in a form that has
been normalized according to this
matching rule.assertionValue
- The assertion value in a form that has
been normalized according to this
matching rule.
- Returns:
true
if the attribute value should be considered
a match for the provided assertion value, or
false
if not.
generateHashCode
public int generateHashCode(AttributeValue attributeValue)
- Generates a hash code for the provided attribute value. This
version of the method will simply create a hash code from the
normalized form of the attribute value. For matching rules
explicitly designed to work in cases where byte-for-byte
comparisons of normalized values is not sufficient for
determining equality (e.g., if the associated attribute syntax is
based on hashed or encrypted values), then this method must be
overridden to provide an appropriate implementation for that
case.
- Parameters:
attributeValue
- The attribute value for which to generate
the hash code.
- Returns:
- The hash code generated for the provided attribute
value.