/**
* {@inheritDoc}
*/
public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException
{
SearchRequestDecorator decorator = container.getMessage();
TLV tlv = container.getCurrentTLV();
// Store the value.
SubstringFilter substringFilter = ( SubstringFilter ) decorator.getTerminalFilter();
if ( tlv.getLength() == 0 )
{
String msg = I18n.err( I18n.ERR_04019 );
LOG.error( msg );
throw new DecoderException( msg );
}
String any = Strings.utf8ToString( tlv.getValue().getData() );
substringFilter.addAnySubstrings( any );
// We now have to get back to the nearest filter which is
// not terminal.
decorator.unstackFilters( container );
if ( IS_DEBUG )
{
LOG.debug( "Stored a any substring : {}", any );
}