org.apache.directory.server.core.referral
Class ReferralInterceptor
java.lang.Object
org.apache.directory.server.core.interceptor.BaseInterceptor
org.apache.directory.server.core.referral.ReferralInterceptor
- All Implemented Interfaces:
- Interceptor
public class ReferralInterceptor
- extends BaseInterceptor
An service which is responsible referral handling behavoirs. It manages
referral handling behavoir when the Context.REFERRAL is implicitly
or explicitly set to "ignore", when set to "throw" and when set to "follow".
- Version:
- $Rev$
- Author:
- Apache Directory Project
- XBean
| Methods inherited from class org.apache.directory.server.core.interceptor.BaseInterceptor |
addContextPartition, bind, compare, destroy, getContext, getMatchedName, getName, getPrincipal, getRootDSE, getSuffix, hasEntry, list, listSuffixes, lookup, removeContextPartition, search, unbind |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReferralInterceptor
public ReferralInterceptor()
init
public void init(DirectoryService directoryService)
throws java.lang.Exception
- Specified by:
init in interface Interceptor- Overrides:
init in class BaseInterceptor
- Throws:
java.lang.Exception
add
public void add(NextInterceptor next,
AddOperationContext opContext)
throws java.lang.Exception
- Add an entry into the server. We have 3 cases :
(1) The entry does not have any parent referral and is not a referral itself
(2) The entry does not have any parent referral and is a referral itself
(3) The entry has a parent referral
Case (1) is easy : we inject the entry into the server and we are done.
Case (2) is the same as case (1), but we have to update the referral manager.
Case (3) is handled by the LdapProcotol handler, as we have to return a
LdapResult containing a list of this entry's parent's referrals URL, if the
ManageDSAIT control is not present, or the parent's entry if the control
is present.
Of course, if the entry already exists, nothing will be done, as we will get an
entryAlreadyExists error.
- Specified by:
add in interface Interceptor- Overrides:
add in class BaseInterceptor
- Throws:
java.lang.Exception
delete
public void delete(NextInterceptor next,
DeleteOperationContext opContext)
throws java.lang.Exception
- Delete an entry in the server. We have 4 cases :
(1) the entry is not a referral and does not have a parent referral
(2) the entry is not a referral but has a parent referral
(3) the entry is a referral
Case (1) is handled by removing the entry from the server
In case (2), we return an exception build using the parent referral
For case(3), we remove the entry from the server and remove the referral
from the referral manager.
If the entry does not exist in the server, we will get a NoSuchObject error
- Specified by:
delete in interface Interceptor- Overrides:
delete in class BaseInterceptor
- Throws:
java.lang.Exception
move
public void move(NextInterceptor next,
MoveOperationContext opContext)
throws java.lang.Exception
- Specified by:
move in interface Interceptor- Overrides:
move in class BaseInterceptor
- Throws:
java.lang.Exception
moveAndRename
public void moveAndRename(NextInterceptor next,
MoveAndRenameOperationContext opContext)
throws java.lang.Exception
- Specified by:
moveAndRename in interface Interceptor- Overrides:
moveAndRename in class BaseInterceptor
- Throws:
java.lang.Exception
rename
public void rename(NextInterceptor next,
RenameOperationContext opContext)
throws java.lang.Exception
- Specified by:
rename in interface Interceptor- Overrides:
rename in class BaseInterceptor
- Throws:
java.lang.Exception
modify
public void modify(NextInterceptor next,
ModifyOperationContext opContext)
throws java.lang.Exception
- Modify an entry in the server.
- Specified by:
modify in interface Interceptor- Overrides:
modify in class BaseInterceptor
- Throws:
java.lang.Exception
Copyright © 2003-2010 The Apache Software Foundation. All Rights Reserved.