if ( !url.startsWith( "ldap" ) )
{
respRef.getReferral().addLdapUrl( url );
}
LdapUrl ldapUrl = null;
try
{
ldapUrl = new LdapUrl( url );
ldapUrl.setForceScopeRendering( true );
}
catch ( LdapURLEncodingException e )
{
LOG.error( I18n.err( I18n.ERR_165, url, entry ) );
}
switch ( req.getScope() )
{
case SUBTREE:
ldapUrl.setScope( SearchScope.SUBTREE.getScope() );
break;
case ONELEVEL: // one level here is object level on remote server
ldapUrl.setScope( SearchScope.OBJECT.getScope() );
break;
default:
throw new IllegalStateException( I18n.err( I18n.ERR_686 ) );
}
respRef.getReferral().addLdapUrl( ldapUrl.toString() );
}
return respRef;
}
else