org.apache.directory.server.core.referral
Class ReferralLut

java.lang.Object
  extended byorg.apache.directory.server.core.referral.ReferralLut

public class ReferralLut
extends java.lang.Object

A simple lookup table of normalized referral distinguished names.

Version:
$Rev: 434579 $
Author:
Apache Directory Project

Constructor Summary
ReferralLut()
           
 
Method Summary
 LdapDN getFarthestReferralAncestor(LdapDN dn)
          Gets the normalized name of the farthest ancestor that is a referral.
 LdapDN getNearestReferralAncestor(LdapDN dn)
          Gets the normalized name of the nearest ancestor that is a referral.
 boolean isReferral(LdapDN dn)
          Checks if a the entry at a name is a referral.
 void referralAdded(LdapDN dn)
          Called to add an entry to the LUT when a referral is added.
 void referralChanged(LdapDN oldDn, LdapDN newDn)
          Called to update the LUT when the name of the referral changes due to a rename or move in the DIT.
 void referralDeleted(LdapDN dn)
          Called delete an entry from the LUT when a referral is deleted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferralLut

public ReferralLut()
Method Detail

isReferral

public boolean isReferral(LdapDN dn)
Checks if a the entry at a name is a referral.

Parameters:
dn - the normalized name of the referral

getFarthestReferralAncestor

public LdapDN getFarthestReferralAncestor(LdapDN dn)
Gets the normalized name of the farthest ancestor that is a referral. If the argument is a referral it will not be returned. Only ancestor's (includes parent) are considered.

Parameters:
dn - the name to get the farthest ancestor referral name for
Returns:
the farthest referral ancestor

getNearestReferralAncestor

public LdapDN getNearestReferralAncestor(LdapDN dn)
Gets the normalized name of the nearest ancestor that is a referral. If the argument is a referral it will not be returned. Only ancestor's (includes parent) are considered.

Parameters:
dn - the name to get the nearest ancestor referral name for
Returns:
the nearest referral ancestor or null if one does not exist

referralAdded

public void referralAdded(LdapDN dn)
Called to add an entry to the LUT when a referral is added.

Parameters:
dn - the normalized name of the added referral

referralDeleted

public void referralDeleted(LdapDN dn)
Called delete an entry from the LUT when a referral is deleted.

Parameters:
dn - the normalized name of the deleted referral

referralChanged

public void referralChanged(LdapDN oldDn,
                            LdapDN newDn)
Called to update the LUT when the name of the referral changes due to a rename or move in the DIT.

Parameters:
oldDn - the normalized old name for the referral
newDn - the normalized new name for the referral