org.opends.server.api
Class SubstringMatchingRule
java.lang.Object
org.opends.server.api.MatchingRule<SubstringMatchingRuleCfg>
org.opends.server.api.SubstringMatchingRule
- Direct Known Subclasses:
- CaseExactIA5SubstringMatchingRule, CaseExactSubstringMatchingRule, CaseIgnoreIA5SubstringMatchingRule, CaseIgnoreListSubstringMatchingRule, CaseIgnoreSubstringMatchingRule, NumericStringSubstringMatchingRule, OctetStringSubstringMatchingRule, TelephoneNumberSubstringMatchingRule
@PublicAPI(stability=VOLATILE,
mayInstantiate=false,
mayExtend=true,
mayInvoke=false)
public abstract class SubstringMatchingRule
- extends MatchingRule<SubstringMatchingRuleCfg>
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 substring 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 |
SubstringMatchingRule
public SubstringMatchingRule()
normalizeSubstring
public abstract ByteString normalizeSubstring(ByteString substring)
throws DirectoryException
- Normalizes the provided value fragment into a form that can be
used to efficiently compare values.
- Parameters:
substring
- The value fragment to be normalized.
- Returns:
- The normalized form of the value fragment.
- Throws:
DirectoryException
- If the provided value fragment is
not acceptable according to the
associated syntax.
valueMatchesSubstring
public abstract boolean valueMatchesSubstring(ByteString value,
ByteString subInitial,
java.util.List<ByteString> subAnyElements,
ByteString subFinal)
- Determines whether the provided value matches the given substring
filter components. Note that any of the substring filter
components may be
null
but at least one of them must be
non-null
.
- Parameters:
value
- The normalized value against which to
compare the substring components.subInitial
- The normalized substring value fragment
that should appear at the beginning of
the target value.subAnyElements
- The normalized substring value fragments
that should appear in the middle of the
target value.subFinal
- The normalized substring value fragment
that should appear at the end of the
target value.
- Returns:
true
if the provided value does match the given
substring components, 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.
Note that substring matching rules by default do not support
extensible matching, and therefore this method will always return
UNDEFINED
. If a substring matching rule does support
extensible matching operations, then it should override this
method and provide an appropriate implementation.
- Specified by:
valuesMatch
in class MatchingRule<SubstringMatchingRuleCfg>
- 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.