.getSchemaManager().getNormalizerMapping() );
boolean rdnChanged = req.getNewRdn() != null &&
! newRdn.getNormName().equals( oldRdn.getNormName() );
CoreSession coreSession = session.getCoreSession();
if ( rdnChanged )
{
if ( req.getNewSuperior() != null )
{
coreSession.moveAndRename( req );
}
else
{
coreSession.rename( req );
}
}
else if ( req.getNewSuperior() != null )
{
req.setNewRdn( null );
coreSession.move( req );
}
else
{
result.setErrorMessage( "Attempt to move entry onto itself." );
result.setResultCode( ResultCodeEnum.ENTRY_ALREADY_EXISTS );