// This is a referral. We can return it if the ManageDsaIt flag is true
// Otherwise, we just throw a LdapReferralException
if ( !searchContext.isReferralIgnored() )
{
// Throw a Referral Exception
LdapReferralException exception = buildReferralExceptionForSearch( parentEntry, childDn,
searchContext.getScope() );
throw exception;
}
}
else if ( directoryService.getReferralManager().hasParentReferral( dn ) )
{
// We can't search an entry which has an ancestor referral
// Depending on the Context.REFERRAL property value, we will throw
// a different exception.
if ( searchContext.isReferralIgnored() )
{
LdapPartialResultException exception = buildLdapPartialResultException( childDn );
throw exception;
}
else
{
LdapReferralException exception = buildReferralExceptionForSearch( parentEntry, childDn,
searchContext.getScope() );
throw exception;
}
}
}