public class ReferralManagerImpl extends Object implements ReferralManager
| Constructor and Description |
|---|
ReferralManagerImpl(DirectoryService directoryService)
Creates a new instance of ReferralManagerImpl.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addReferral(org.apache.directory.shared.ldap.entry.ServerEntry entry)
Add a referral to the manager.
|
org.apache.directory.shared.ldap.entry.ServerEntry |
getParentReferral(org.apache.directory.shared.ldap.name.DN dn)
Get the DN of the parent referral for a specific DN
|
boolean |
hasParentReferral(org.apache.directory.shared.ldap.name.DN dn)
Tells if this DN has a parent which is a referral.
|
void |
init(DirectoryService directoryService,
String... suffixes)
Initialize the manager, reading all the referrals from the base.
|
boolean |
isReferral(org.apache.directory.shared.ldap.name.DN dn)
Tells if a DN is a referral (its associated entry contains the Referral ObjectClass).
|
void |
lockRead()
Get a read-lock on the referralManager.
|
void |
lockWrite()
Get a write-lock on the referralManager.
|
void |
remove(DirectoryService directoryService,
org.apache.directory.shared.ldap.name.DN suffix)
Remove a partition from the manager, reading all the referrals from the base.
|
void |
removeReferral(org.apache.directory.shared.ldap.entry.ServerEntry entry)
Remove a referral from the manager.
|
void |
unlock()
Release the read-write lock on the referralManager.
|
public ReferralManagerImpl(DirectoryService directoryService) throws Exception
directoryService - The directory serviceException - If we can't initialize the managerpublic void lockRead()
lockRead in interface ReferralManagerpublic void lockWrite()
lockWrite in interface ReferralManagerpublic void unlock()
unlock in interface ReferralManagerpublic void addReferral(org.apache.directory.shared.ldap.entry.ServerEntry entry)
addReferral in interface ReferralManagerpublic void init(DirectoryService directoryService, String... suffixes) throws Exception
init in interface ReferralManagerdirectoryService - The associated LDAP servicesuffixes - The partition listExceptionpublic void remove(DirectoryService directoryService, org.apache.directory.shared.ldap.name.DN suffix) throws Exception
remove in interface ReferralManagerdirectoryService - The associated LDAP serviceExceptionpublic boolean hasParentReferral(org.apache.directory.shared.ldap.name.DN dn)
hasParentReferral in interface ReferralManagerdn - The DN we want to check for a referral in its partentstrue if there is a parent referralpublic org.apache.directory.shared.ldap.entry.ServerEntry getParentReferral(org.apache.directory.shared.ldap.name.DN dn)
getParentReferral in interface ReferralManagerdn - The DN from which we want to get the parent referralpublic boolean isReferral(org.apache.directory.shared.ldap.name.DN dn)
isReferral in interface ReferralManagerdn - The entry's DN we want to checktrue if the DN is associated with a referralpublic void removeReferral(org.apache.directory.shared.ldap.entry.ServerEntry entry)
removeReferral in interface ReferralManagerCopyright © 2003-2012 Apache Software Foundation. All Rights Reserved.