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 ReferralManager
public void lockWrite()
lockWrite
in interface ReferralManager
public void unlock()
unlock
in interface ReferralManager
public void addReferral(org.apache.directory.shared.ldap.entry.ServerEntry entry)
addReferral
in interface ReferralManager
public void init(DirectoryService directoryService, String... suffixes) throws Exception
init
in interface ReferralManager
directoryService
- The associated LDAP servicesuffixes
- The partition listException
public void remove(DirectoryService directoryService, org.apache.directory.shared.ldap.name.DN suffix) throws Exception
remove
in interface ReferralManager
directoryService
- The associated LDAP serviceException
public boolean hasParentReferral(org.apache.directory.shared.ldap.name.DN dn)
hasParentReferral
in interface ReferralManager
dn
- 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 ReferralManager
dn
- The DN from which we want to get the parent referralpublic boolean isReferral(org.apache.directory.shared.ldap.name.DN dn)
isReferral
in interface ReferralManager
dn
- 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 ReferralManager
Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.