SearchRequestDecorator searchRequestDecorator = container.getMessage();
TLV tlv = container.getCurrentTLV();
// We can allocate the Attribute Value Assertion
PresentFilter presentFilter = new PresentFilter( container.getTlvId() );
// add the filter to the request filter
searchRequestDecorator.addCurrentFilter( presentFilter );
searchRequestDecorator.setTerminalFilter( presentFilter );
String value = Strings.utf8ToString( tlv.getValue().getData() );
if ( Strings.isEmpty( value ) )
{
presentFilter.setAttributeDescription( "" );
}
else
{
// Store the value.
String type = Strings.utf8ToString( tlv.getValue().getData() );
presentFilter.setAttributeDescription( type );
}
// We now have to get back to the nearest filter which is
// not terminal.
searchRequestDecorator.unstackFilters( container );