}
public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException
{
SearchRequestDecorator searchRequest = container.getMessage();
TLV tlv = container.getCurrentTLV();
// Store the value.
ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) searchRequest.getTerminalFilter();
// We get the value. If it's a 0, it's a FALSE. If it's
// a FF, it's a TRUE. Any other value should be an error,
// but we could relax this constraint. So if we have
// something
// which is not 0, it will be interpreted as TRUE, but we
// will generate a warning.
Value value = tlv.getValue();
try
{
extensibleMatchFilter.setDnAttributes( BooleanDecoder.parse( value ) );
}
catch ( BooleanDecoderException bde )
{
LOG.error( I18n
.err( I18n.ERR_04110, Strings.dumpBytes(value.getData()), bde.getMessage() ) );
throw new DecoderException( bde.getMessage() );
}
if ( IS_DEBUG )
{
LOG.debug( "Dn Attributes : {}", Boolean.valueOf( extensibleMatchFilter.isDnAttributes() ) );
}
// unstack the filters if needed
searchRequest.unstackFilters( container );
}