use of org.apache.directory.api.ldap.codec.search.ExtensibleMatchFilter in project directory-ldap-api by apache.
the class StoreTypeMatchingRule method action.
/**
* {@inheritDoc}
*/
public void action(LdapMessageContainer<SearchRequestDecorator> container) throws DecoderException {
SearchRequestDecorator searchRequest = container.getMessage();
TLV tlv = container.getCurrentTLV();
if (tlv.getLength() == 0) {
String msg = I18n.err(I18n.ERR_04022);
LOG.error(msg);
throw new DecoderException(msg);
} else {
// Store the value.
ExtensibleMatchFilter extensibleMatchFilter = (ExtensibleMatchFilter) searchRequest.getTerminalFilter();
String type = Strings.utf8ToString(tlv.getValue().getData());
extensibleMatchFilter.setType(type);
if (IS_DEBUG) {
LOG.debug("Stored a type matching rule : {}", type);
}
}
}
Aggregations