| | |
| | | { |
| | | // == exact CSN |
| | | // validate provided CSN is correct |
| | | new CSN(filter.getAssertionValue().toString()); |
| | | validateCSN(filter.getAssertionValue()); |
| | | } |
| | | else if (filter.getFilterType() == FilterType.AND) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private static void validateCSN(final ByteString assertionValue) |
| | | throws DirectoryException |
| | | { |
| | | try |
| | | { |
| | | new CSN(assertionValue.toString()); |
| | | } |
| | | catch (IllegalArgumentException e) |
| | | { |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | LocalizableMessage.raw("Could not convert value '%s' to a CSN", assertionValue), e); |
| | | } |
| | | } |
| | | |
| | | private boolean matches(SearchFilter filter, FilterType filterType, String primaryName) |
| | | { |
| | | return filter.getFilterType() == filterType |