/**
* {@inheritDoc}
*/
public void action( LdapMessageContainer<ModifyRequestDecorator> container ) throws DecoderException
{
ModifyRequestDecorator modifyRequestDecorator = container.getMessage();
ModifyRequest modifyRequest = modifyRequestDecorator.getDecorated();
TLV tlv = container.getCurrentTLV();
// Store the value. It can't be null
String type = null;
if ( tlv.getLength() == 0 )
{
String msg = I18n.err( I18n.ERR_04083 );
LOG.error( msg );
ModifyResponseImpl response = new ModifyResponseImpl( modifyRequest.getMessageId() );
throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
modifyRequest.getName(), null );
}
else
{
type = Strings.utf8ToString( tlv.getValue().getData() );
modifyRequestDecorator.addAttributeTypeAndValues( type );
}
if ( IS_DEBUG )
{
LOG.debug( "Modifying type : {}", type );