use of org.apache.directory.api.ldap.codec.search.Filter in project directory-ldap-api by apache.
the class InitAndFilter method action.
/**
* {@inheritDoc}
*/
public void action(LdapMessageContainer<SearchRequestDecorator> container) throws DecoderException {
TLV tlv = container.getCurrentTLV();
if (tlv.getLength() == 0) {
String msg = I18n.err(I18n.ERR_04006);
LOG.error(msg);
throw new DecoderException(msg);
}
SearchRequestDecorator searchRequestDecorator = container.getMessage();
// We can allocate the SearchRequest
Filter andFilter = new AndFilter(container.getTlvId());
// Set the filter
searchRequestDecorator.addCurrentFilter(andFilter);
if (IS_DEBUG) {
LOG.debug("Initialize AND filter");
}
}
use of org.apache.directory.api.ldap.codec.search.Filter in project directory-ldap-api by apache.
the class InitEqualityMatchFilter method action.
/**
* {@inheritDoc}
*/
public void action(LdapMessageContainer<SearchRequestDecorator> container) throws DecoderException {
SearchRequestDecorator searchRequestDecorator = container.getMessage();
// We can allocate the Attribute Value Assertion
Filter filter = new AttributeValueAssertionFilter(container.getTlvId(), LdapCodecConstants.EQUALITY_MATCH_FILTER);
searchRequestDecorator.addCurrentFilter(filter);
// Store the filter structure that still has to be
// fulfilled
searchRequestDecorator.setTerminalFilter(filter);
if (IS_DEBUG) {
LOG.debug("Initialize Equality Match filter");
}
}
use of org.apache.directory.api.ldap.codec.search.Filter in project directory-ldap-api by apache.
the class InitExtensibleMatchFilter method action.
/**
* {@inheritDoc}
*/
public void action(LdapMessageContainer<SearchRequestDecorator> container) throws DecoderException {
SearchRequestDecorator searchRequestDecorator = container.getMessage();
// We can allocate the ExtensibleMatch Filter
Filter extensibleMatchFilter = new ExtensibleMatchFilter(container.getTlvId());
searchRequestDecorator.addCurrentFilter(extensibleMatchFilter);
searchRequestDecorator.setTerminalFilter(extensibleMatchFilter);
if (IS_DEBUG) {
LOG.debug("Initialize Extensible Match filter");
}
}
use of org.apache.directory.api.ldap.codec.search.Filter in project directory-ldap-api by apache.
the class InitGreaterOrEqualFilter method action.
/**
* {@inheritDoc}
*/
public void action(LdapMessageContainer<SearchRequestDecorator> container) throws DecoderException {
SearchRequestDecorator searchRequestDecorator = container.getMessage();
// We can allocate the Attribute Value Assertion
Filter filter = new AttributeValueAssertionFilter(container.getTlvId(), LdapCodecConstants.GREATER_OR_EQUAL_FILTER);
searchRequestDecorator.addCurrentFilter(filter);
// Store the filter structure that still has to be
// fulfilled
searchRequestDecorator.setTerminalFilter(filter);
if (IS_DEBUG) {
LOG.debug("Initialize Greater Or Equal filter");
}
}
use of org.apache.directory.api.ldap.codec.search.Filter in project directory-ldap-api by apache.
the class InitLessOrEqualFilter method action.
/**
* {@inheritDoc}
*/
public void action(LdapMessageContainer<SearchRequestDecorator> container) throws DecoderException {
SearchRequestDecorator searchRequestDecorator = container.getMessage();
// We can allocate the Attribute Value Assertion
Filter filter = new AttributeValueAssertionFilter(container.getTlvId(), LdapCodecConstants.LESS_OR_EQUAL_FILTER);
searchRequestDecorator.addCurrentFilter(filter);
// Store the filter structure that still has to be
// fulfilled
searchRequestDecorator.setTerminalFilter(filter);
if (IS_DEBUG) {
LOG.debug("Initialize Less Or Equal filter");
}
}
Aggregations