* message id number
*/
private int changeModRDNEntry( LdifEntry entry, int messageId ) throws IOException, DecoderException,
InvalidNameException, NamingException, EncoderException
{
ModifyDNRequestCodec modifyDNRequest = new ModifyDNRequestCodec();
String dn = entry.getDn().getName();
if ( isDebugEnabled() )
{
System.out.println( "Modify DN of entry " + dn );
}
modifyDNRequest.setEntry( new DN( dn ) );
modifyDNRequest.setDeleteOldRDN( entry.isDeleteOldRdn() );
modifyDNRequest.setNewRDN( new RDN( entry.getNewRdn() ) );
if ( StringTools.isEmpty( entry.getNewSuperior() ) == false )
{
modifyDNRequest.setNewSuperior( new DN( entry.getNewSuperior() ) );
}
modifyDNRequest.setMessageId( messageId );
// Encode and send the delete request
ByteBuffer bb = modifyDNRequest.encode();
bb.flip();
sendMessage( bb );
bb.clear();