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

java.lang.Object
  extended by org.apache.directory.server.core.interceptor.BaseInterceptor
      extended by org.apache.directory.server.core.referral.ReferralService
All Implemented Interfaces:
Interceptor

public class ReferralService
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: 523116 $
Author:
Apache Directory Project

Field Summary
static java.lang.String NAME
           
 
Constructor Summary
ReferralService()
          Creates a referral service interceptor.
 
Method Summary
 void add(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN normName, javax.naming.directory.Attributes entry)
          Handling a Add operation at the Referral level.
 void addContextPartition(NextInterceptor next, PartitionConfiguration cfg)
          Filters PartitionNexus.addContextPartition(PartitionConfiguration) call.
 boolean compare(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN normName, java.lang.String oid, java.lang.Object value)
          Filters PartitionNexus.compare(org.apache.directory.shared.ldap.name.LdapDN,String,Object) call.
 void delete(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN normName)
          Filters Partition.delete(org.apache.directory.shared.ldap.name.LdapDN) call.
 void doReferralExceptionOnSearchBase(org.apache.directory.shared.ldap.name.LdapDN base, javax.naming.directory.Attribute refs, int scope)
           
 void doReferralExceptionOnSearchBase(org.apache.directory.shared.ldap.name.LdapDN farthest, org.apache.directory.shared.ldap.name.LdapDN targetUpdn, javax.naming.directory.Attribute refs, int scope)
           
 void init(DirectoryServiceConfiguration dsConfig, InterceptorConfiguration cfg)
          Initialize the Interceptor loading all the existing referrals into a local cache.
 boolean isReferral(java.lang.String name)
           
 void modify(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN name, int modOp, javax.naming.directory.Attributes mods)
          Filters Partition.modify(org.apache.directory.shared.ldap.name.LdapDN,int,javax.naming.directory.Attributes) call.
 void modify(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN name, org.apache.directory.shared.ldap.message.ModificationItemImpl[] mods)
          Filters Partition#modify(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.ModificationItem[]) call.
 void modifyRn(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN oldName, java.lang.String newRdn, boolean deleteOldRdn)
          Filters Partition.modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean) call.
 void move(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN oldName, org.apache.directory.shared.ldap.name.LdapDN newParent)
          Filters Partition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN) call.
 void move(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN oldName, org.apache.directory.shared.ldap.name.LdapDN newParent, java.lang.String newRdn, boolean deleteOldRdn)
          Filters Partition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN,String,boolean) call.
 void removeContextPartition(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN suffix)
          Filters PartitionNexus.removeContextPartition(org.apache.directory.shared.ldap.name.LdapDN) call.
 javax.naming.NamingEnumeration search(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN base, java.util.Map env, org.apache.directory.shared.ldap.filter.ExprNode filter, javax.naming.directory.SearchControls controls)
          Filters Partition.search(org.apache.directory.shared.ldap.name.LdapDN,java.util.Map,org.apache.directory.shared.ldap.filter.ExprNode,javax.naming.directory.SearchControls) call.
 
Methods inherited from class org.apache.directory.server.core.interceptor.BaseInterceptor
bind, destroy, getContext, getMatchedName, getPrincipal, getRootDSE, getSuffix, hasEntry, isSuffix, list, listSuffixes, lookup, lookup, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

ReferralService

public ReferralService()
Creates a referral service interceptor.

Method Detail

init

public void init(DirectoryServiceConfiguration dsConfig,
                 InterceptorConfiguration cfg)
          throws javax.naming.NamingException
Initialize the Interceptor loading all the existing referrals into a local cache.

Specified by:
init in interface Interceptor
Overrides:
init in class BaseInterceptor
Throws:
javax.naming.NamingException

add

public void add(NextInterceptor next,
                org.apache.directory.shared.ldap.name.LdapDN normName,
                javax.naming.directory.Attributes entry)
         throws javax.naming.NamingException
Handling a Add operation at the Referral level. Adding an entry into the server might be done on a branch which points to another server. This is what we try to find out here.

Specified by:
add in interface Interceptor
Overrides:
add in class BaseInterceptor
Throws:
javax.naming.NamingException

compare

public boolean compare(NextInterceptor next,
                       org.apache.directory.shared.ldap.name.LdapDN normName,
                       java.lang.String oid,
                       java.lang.Object value)
                throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters PartitionNexus.compare(org.apache.directory.shared.ldap.name.LdapDN,String,Object) call.

Specified by:
compare in interface Interceptor
Overrides:
compare in class BaseInterceptor
Throws:
javax.naming.NamingException

delete

public void delete(NextInterceptor next,
                   org.apache.directory.shared.ldap.name.LdapDN normName)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.delete(org.apache.directory.shared.ldap.name.LdapDN) call.

Specified by:
delete in interface Interceptor
Overrides:
delete in class BaseInterceptor
Throws:
javax.naming.NamingException

move

public void move(NextInterceptor next,
                 org.apache.directory.shared.ldap.name.LdapDN oldName,
                 org.apache.directory.shared.ldap.name.LdapDN newParent)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN) call.

Specified by:
move in interface Interceptor
Overrides:
move in class BaseInterceptor
Throws:
javax.naming.NamingException

move

public void move(NextInterceptor next,
                 org.apache.directory.shared.ldap.name.LdapDN oldName,
                 org.apache.directory.shared.ldap.name.LdapDN newParent,
                 java.lang.String newRdn,
                 boolean deleteOldRdn)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN,String,boolean) call.

Specified by:
move in interface Interceptor
Overrides:
move in class BaseInterceptor
Throws:
javax.naming.NamingException

modifyRn

public void modifyRn(NextInterceptor next,
                     org.apache.directory.shared.ldap.name.LdapDN oldName,
                     java.lang.String newRdn,
                     boolean deleteOldRdn)
              throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean) call.

Specified by:
modifyRn in interface Interceptor
Overrides:
modifyRn in class BaseInterceptor
Throws:
javax.naming.NamingException

modify

public void modify(NextInterceptor next,
                   org.apache.directory.shared.ldap.name.LdapDN name,
                   int modOp,
                   javax.naming.directory.Attributes mods)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.modify(org.apache.directory.shared.ldap.name.LdapDN,int,javax.naming.directory.Attributes) call.

Specified by:
modify in interface Interceptor
Overrides:
modify in class BaseInterceptor
Throws:
javax.naming.NamingException

modify

public void modify(NextInterceptor next,
                   org.apache.directory.shared.ldap.name.LdapDN name,
                   org.apache.directory.shared.ldap.message.ModificationItemImpl[] mods)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition#modify(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.ModificationItem[]) call.

Specified by:
modify in interface Interceptor
Overrides:
modify in class BaseInterceptor
Throws:
javax.naming.NamingException

addContextPartition

public void addContextPartition(NextInterceptor next,
                                PartitionConfiguration cfg)
                         throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters PartitionNexus.addContextPartition(PartitionConfiguration) call.

Specified by:
addContextPartition in interface Interceptor
Overrides:
addContextPartition in class BaseInterceptor
Throws:
javax.naming.NamingException

removeContextPartition

public void removeContextPartition(NextInterceptor next,
                                   org.apache.directory.shared.ldap.name.LdapDN suffix)
                            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters PartitionNexus.removeContextPartition(org.apache.directory.shared.ldap.name.LdapDN) call.

Specified by:
removeContextPartition in interface Interceptor
Overrides:
removeContextPartition in class BaseInterceptor
Throws:
javax.naming.NamingException

search

public javax.naming.NamingEnumeration search(NextInterceptor next,
                                             org.apache.directory.shared.ldap.name.LdapDN base,
                                             java.util.Map env,
                                             org.apache.directory.shared.ldap.filter.ExprNode filter,
                                             javax.naming.directory.SearchControls controls)
                                      throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.search(org.apache.directory.shared.ldap.name.LdapDN,java.util.Map,org.apache.directory.shared.ldap.filter.ExprNode,javax.naming.directory.SearchControls) call.

Specified by:
search in interface Interceptor
Overrides:
search in class BaseInterceptor
Throws:
javax.naming.NamingException

doReferralExceptionOnSearchBase

public void doReferralExceptionOnSearchBase(org.apache.directory.shared.ldap.name.LdapDN base,
                                            javax.naming.directory.Attribute refs,
                                            int scope)
                                     throws javax.naming.NamingException
Throws:
javax.naming.NamingException

doReferralExceptionOnSearchBase

public void doReferralExceptionOnSearchBase(org.apache.directory.shared.ldap.name.LdapDN farthest,
                                            org.apache.directory.shared.ldap.name.LdapDN targetUpdn,
                                            javax.naming.directory.Attribute refs,
                                            int scope)
                                     throws javax.naming.NamingException
Throws:
javax.naming.NamingException

isReferral

public boolean isReferral(java.lang.String name)
                   throws javax.naming.NamingException
Throws:
javax.naming.NamingException


Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.