| | |
| | | |
| | | private static final String EQUALITY_ID = "equality"; |
| | | |
| | | /** |
| | | * Retrieves the normalized form of the provided value, which is best suited |
| | | * for efficiently performing matching operations on that value. |
| | | * |
| | | * @param schema The schema. |
| | | * @param value The value to be normalized. |
| | | * |
| | | * @return The normalized version of the provided value. |
| | | * |
| | | * @throws DecodeException If the provided value is invalid according to |
| | | * the associated attribute syntax. |
| | | */ |
| | | @Override |
| | | public ByteString normalizeAttributeValue(Schema schema, ByteSequence value) |
| | | throws DecodeException |
| | | { |
| | | // We will not alter the value in any way |
| | | return value.toByteString(); |
| | | } |
| | | |
| | | private final Collection<? extends Indexer> indexers = Collections.singleton(new Indexer() |
| | | { |
| | | @Override |
| | |
| | | return ByteSequence.COMPARATOR; |
| | | } |
| | | |
| | | /** |
| | | * Retrieves the normalized form of the provided value, which is best suited |
| | | * for efficiently performing matching operations on that value. |
| | | * |
| | | * @param schema The schema. |
| | | * @param value The value to be normalized. |
| | | * |
| | | * @return The normalized version of the provided value. |
| | | * |
| | | * @throws DecodeException If the provided value is invalid according to |
| | | * the associated attribute syntax. |
| | | */ |
| | | @Override |
| | | public ByteString normalizeAttributeValue(Schema schema, ByteSequence value) throws DecodeException |
| | | { |
| | | // We will not alter the value in any way |
| | | return value.toByteString(); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Assertion getAssertion(final Schema schema, final ByteSequence assertionValue) throws DecodeException |
| | | { |
| | | final ByteString normalizedAssertionValue = normalizeAttributeValue(schema, assertionValue); |
| | | return new Assertion() |
| | | { |
| | | final ByteString normalizedAssertionValue = normalizeAttributeValue(schema, assertionValue); |
| | | |
| | | @Override |
| | | public ConditionResult matches(final ByteSequence normalizedAttributeValue) |
| | | { |
| | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isIndexingSupported() |
| | | public Collection<? extends Indexer> getIndexers() |
| | | { |
| | | return indexers.isEmpty(); |
| | | return indexers; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Collection<? extends Indexer> getIndexers() |
| | | public boolean isIndexingSupported() |
| | | { |
| | | return indexers; |
| | | return indexers.isEmpty(); |
| | | } |
| | | |
| | | /** |
| | |
| | | return ConditionResult.valueOf( |
| | | storageScheme.passwordMatches(assertionValue, ByteString.valueOf(userPWComponents[1]))); |
| | | } |
| | | } |
| | | |
| | | } |