/**
* {@inheritDoc}
*/
public void action( LdapMessageContainer<ModifyRequestDecorator> container )
{
ModifyRequestDecorator modifyRequestDecorator = container.getMessage();
TLV tlv = container.getCurrentTLV();
// Store the value. It can't be null
byte[] value = StringConstants.EMPTY_BYTES;
if ( tlv.getLength() == 0 )
{
modifyRequestDecorator.addAttributeValue( "" );
}
else
{
value = tlv.getValue().getData();
if ( container.isBinary( modifyRequestDecorator.getCurrentAttributeType() ) )
{
modifyRequestDecorator.addAttributeValue( value );
}
else
{
modifyRequestDecorator.addAttributeValue( Strings.utf8ToString((byte[]) value) );
}
}
// We can have an END transition
container.setGrammarEndAllowed( true );