org.apache.ldap.server.interceptor
Class InterceptorChain

java.lang.Object
  extended byorg.apache.ldap.server.interceptor.InterceptorChain

public class InterceptorChain
extends java.lang.Object

Manages the chain of Interceptors.

Version:
$Rev: 264732 $, $Date: 2005-08-30 04:04:51 -0400 (Tue, 30 Aug 2005) $
Author:
Apache Directory Project

Constructor Summary
InterceptorChain()
          Create a new interceptor chain.
 
Method Summary
 void add(java.lang.String upName, javax.naming.Name normName, javax.naming.directory.Attributes entry)
           
 void addAfter(java.lang.String prevInterceptorName, InterceptorConfiguration cfg)
           
 void addBefore(java.lang.String nextInterceptorName, InterceptorConfiguration cfg)
           
 void addContextPartition(ContextPartitionConfiguration cfg)
           
 void addFirst(InterceptorConfiguration cfg)
           
 void addLast(InterceptorConfiguration cfg)
           
 void delete(javax.naming.Name name)
           
 void destroy()
          Deinitializes and deregisters all interceptors this chain contains.
 Interceptor get(java.lang.String interceptorName)
          Returns the registered interceptor with the specified name.
 java.util.List getAll()
          Returns the list of all registered interceptors.
 javax.naming.Name getMatchedName(javax.naming.Name name, boolean normalized)
           
 javax.naming.directory.Attributes getRootDSE()
           
 javax.naming.Name getSuffix(javax.naming.Name name, boolean normalized)
           
 boolean hasEntry(javax.naming.Name name)
           
 void init(ContextFactoryConfiguration factoryCfg)
          Initializes and registers all interceptors according to the specified ContextFactoryConfiguration.
 boolean isSuffix(javax.naming.Name name)
           
 javax.naming.NamingEnumeration list(javax.naming.Name base)
           
 java.util.Iterator listSuffixes(boolean normalized)
           
 javax.naming.directory.Attributes lookup(javax.naming.Name name)
           
 javax.naming.directory.Attributes lookup(javax.naming.Name dn, java.lang.String[] attrIds)
           
 void modify(javax.naming.Name name, int modOp, javax.naming.directory.Attributes mods)
           
 void modify(javax.naming.Name name, javax.naming.directory.ModificationItem[] mods)
           
 void modifyRn(javax.naming.Name name, java.lang.String newRn, boolean deleteOldRn)
           
 void move(javax.naming.Name oriChildName, javax.naming.Name newParentName)
           
 void move(javax.naming.Name oriChildName, javax.naming.Name newParentName, java.lang.String newRn, boolean deleteOldRn)
           
 InterceptorConfiguration remove(java.lang.String interceptorName)
           
 void removeContextPartition(javax.naming.Name suffix)
           
 javax.naming.NamingEnumeration search(javax.naming.Name base, java.util.Map env, org.apache.ldap.common.filter.ExprNode filter, javax.naming.directory.SearchControls searchCtls)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterceptorChain

public InterceptorChain()
Create a new interceptor chain.

Method Detail

init

public void init(ContextFactoryConfiguration factoryCfg)
          throws javax.naming.NamingException
Initializes and registers all interceptors according to the specified ContextFactoryConfiguration.

Throws:
javax.naming.NamingException

destroy

public void destroy()
Deinitializes and deregisters all interceptors this chain contains.


get

public Interceptor get(java.lang.String interceptorName)
Returns the registered interceptor with the specified name.

Returns:
null if the specified name doesn't exist.

getAll

public java.util.List getAll()
Returns the list of all registered interceptors.


addFirst

public void addFirst(InterceptorConfiguration cfg)
              throws javax.naming.NamingException
Throws:
javax.naming.NamingException

addLast

public void addLast(InterceptorConfiguration cfg)
             throws javax.naming.NamingException
Throws:
javax.naming.NamingException

addBefore

public void addBefore(java.lang.String nextInterceptorName,
                      InterceptorConfiguration cfg)
               throws javax.naming.NamingException
Throws:
javax.naming.NamingException

remove

public InterceptorConfiguration remove(java.lang.String interceptorName)
                                throws javax.naming.NamingException
Throws:
javax.naming.NamingException

addAfter

public void addAfter(java.lang.String prevInterceptorName,
                     InterceptorConfiguration cfg)
              throws javax.naming.NamingException
Throws:
javax.naming.NamingException

getRootDSE

public javax.naming.directory.Attributes getRootDSE()
                                             throws javax.naming.NamingException
Throws:
javax.naming.NamingException

getMatchedName

public javax.naming.Name getMatchedName(javax.naming.Name name,
                                        boolean normalized)
                                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

getSuffix

public javax.naming.Name getSuffix(javax.naming.Name name,
                                   boolean normalized)
                            throws javax.naming.NamingException
Throws:
javax.naming.NamingException

listSuffixes

public java.util.Iterator listSuffixes(boolean normalized)
                                throws javax.naming.NamingException
Throws:
javax.naming.NamingException

addContextPartition

public void addContextPartition(ContextPartitionConfiguration cfg)
                         throws javax.naming.NamingException
Throws:
javax.naming.NamingException

removeContextPartition

public void removeContextPartition(javax.naming.Name suffix)
                            throws javax.naming.NamingException
Throws:
javax.naming.NamingException

delete

public void delete(javax.naming.Name name)
            throws javax.naming.NamingException
Throws:
javax.naming.NamingException

add

public void add(java.lang.String upName,
                javax.naming.Name normName,
                javax.naming.directory.Attributes entry)
         throws javax.naming.NamingException
Throws:
javax.naming.NamingException

modify

public void modify(javax.naming.Name name,
                   int modOp,
                   javax.naming.directory.Attributes mods)
            throws javax.naming.NamingException
Throws:
javax.naming.NamingException

modify

public void modify(javax.naming.Name name,
                   javax.naming.directory.ModificationItem[] mods)
            throws javax.naming.NamingException
Throws:
javax.naming.NamingException

list

public javax.naming.NamingEnumeration list(javax.naming.Name base)
                                    throws javax.naming.NamingException
Throws:
javax.naming.NamingException

search

public javax.naming.NamingEnumeration search(javax.naming.Name base,
                                             java.util.Map env,
                                             org.apache.ldap.common.filter.ExprNode filter,
                                             javax.naming.directory.SearchControls searchCtls)
                                      throws javax.naming.NamingException
Throws:
javax.naming.NamingException

lookup

public javax.naming.directory.Attributes lookup(javax.naming.Name name)
                                         throws javax.naming.NamingException
Throws:
javax.naming.NamingException

lookup

public javax.naming.directory.Attributes lookup(javax.naming.Name dn,
                                                java.lang.String[] attrIds)
                                         throws javax.naming.NamingException
Throws:
javax.naming.NamingException

hasEntry

public boolean hasEntry(javax.naming.Name name)
                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

isSuffix

public boolean isSuffix(javax.naming.Name name)
                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

modifyRn

public void modifyRn(javax.naming.Name name,
                     java.lang.String newRn,
                     boolean deleteOldRn)
              throws javax.naming.NamingException
Throws:
javax.naming.NamingException

move

public void move(javax.naming.Name oriChildName,
                 javax.naming.Name newParentName)
          throws javax.naming.NamingException
Throws:
javax.naming.NamingException

move

public void move(javax.naming.Name oriChildName,
                 javax.naming.Name newParentName,
                 java.lang.String newRn,
                 boolean deleteOldRn)
          throws javax.naming.NamingException
Throws:
javax.naming.NamingException