/**
* {@inheritDoc}
*/
public void action( LdapMessageContainer<ModifyDnRequestDecorator> container ) throws DecoderException
{
ModifyDnRequest modifyDnRequest = container.getMessage();
TLV tlv = container.getCurrentTLV();
// 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
{
modifyDnRequest.setDeleteOldRdn( BooleanDecoder.parse( value ) );
}
catch ( BooleanDecoderException bde )
{
LOG.error( I18n
.err( I18n.ERR_04091, Strings.dumpBytes( value.getData() ), bde.getMessage() ) );
// This will generate a PROTOCOL_ERROR
throw new DecoderException( bde.getMessage() );
}
// We can have an END transition
container.setGrammarEndAllowed( true );
if ( IS_DEBUG )
{
if ( modifyDnRequest.getDeleteOldRdn() )
{
LOG.debug( " Old Rdn attributes will be deleted" );
}
else
{