{
// Throw a Referral Exception
// We have found a parent referral for the current Dn
Dn childDn = dn.getDescendantOf( parentEntry.getDn() );
LdapReferralException exception = buildReferralException( parentEntry, childDn );
throw exception;
}
}
else if ( referralManager.hasParentReferral( dn ) )
{
// We can't delete an entry which has an ancestor referral
// Depending on the Context.REFERRAL property value, we will throw
// a different exception.
if ( modifyContext.isReferralIgnored() )
{
// We have found a parent referral for the current Dn
Dn childDn = dn.getDescendantOf( parentEntry.getDn() );
LdapPartialResultException exception = buildLdapPartialResultException( childDn );
throw exception;
}
else
{
// We have found a parent referral for the current Dn
Dn childDn = dn.getDescendantOf( parentEntry.getDn() );
LdapReferralException exception = buildReferralException( parentEntry, childDn );
throw exception;
}
}
}
}