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.api.ldap.model.entry.Entry entry)
Add a referral to the manager.
|
org.apache.directory.api.ldap.model.entry.Entry |
getParentReferral(org.apache.directory.api.ldap.model.name.Dn dn)
Get the Dn of the parent referral for a specific Dn
|
boolean |
hasParentReferral(org.apache.directory.api.ldap.model.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.api.ldap.model.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.api.ldap.model.name.Dn suffix)
Remove a partition from the manager, reading all the referrals from the base.
|
void |
removeReferral(org.apache.directory.api.ldap.model.entry.Entry entry)
Remove a referral from the manager.
|
void |
unlock()
Release the read-write lock on the referralManager.
|
public ReferralManagerImpl(DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
directoryService - The directory serviceException - If we can't initialize the managerorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void lockRead()
lockRead in interface ReferralManagerpublic void lockWrite()
lockWrite in interface ReferralManagerpublic void unlock()
unlock in interface ReferralManagerpublic void addReferral(org.apache.directory.api.ldap.model.entry.Entry entry)
addReferral in interface ReferralManagerpublic void init(DirectoryService directoryService, String... suffixes) throws org.apache.directory.api.ldap.model.exception.LdapException
init in interface ReferralManagerdirectoryService - The associated LDAP servicesuffixes - The partition listorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void remove(DirectoryService directoryService, org.apache.directory.api.ldap.model.name.Dn suffix) throws Exception
remove in interface ReferralManagerdirectoryService - The associated LDAP serviceExceptionpublic boolean hasParentReferral(org.apache.directory.api.ldap.model.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.api.ldap.model.entry.Entry getParentReferral(org.apache.directory.api.ldap.model.name.Dn dn)
getParentReferral in interface ReferralManagerdn - The Dn from which we want to get the parent referralpublic boolean isReferral(org.apache.directory.api.ldap.model.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.api.ldap.model.entry.Entry entry)
throws org.apache.directory.api.ldap.model.exception.LdapException
removeReferral in interface ReferralManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionCopyright © 2021. All rights reserved.