org.apache.directory.server.core.interceptor
Class BaseInterceptor

java.lang.Object
  extended by org.apache.directory.server.core.interceptor.BaseInterceptor
All Implemented Interfaces:
Interceptor
Direct Known Subclasses:
AuthenticationService, AuthorizationService, CollectiveAttributeService, DefaultAuthorizationService, EventService, ExceptionService, NormalizationService, OperationalAttributeService, ReferralService, SchemaService, SubentryService

public abstract class BaseInterceptor
extends java.lang.Object
implements Interceptor

A easy-to-use implementation of Interceptor. All methods are implemented to pass the flow of control to next interceptor by defaults. Please override the methods you have concern in.

Version:
$Rev: 493916 $, $Date: 2007-01-08 03:44:33 +0100 (Mon, 08 Jan 2007) $
Author:
Apache Directory Project

Constructor Summary
protected BaseInterceptor()
          Creates a new instance.
 
Method Summary
 void add(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN normName, javax.naming.directory.Attributes entry)
          Filters Partition.add(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.Attributes) call.
 void addContextPartition(NextInterceptor next, PartitionConfiguration cfg)
          Filters PartitionNexus.addContextPartition(PartitionConfiguration) call.
 void bind(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN bindDn, byte[] credentials, java.util.List mechanisms, java.lang.String saslAuthId)
          Filters Partition.bind(org.apache.directory.shared.ldap.name.LdapDN,byte[],java.util.List,String) call.
 boolean compare(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN name, 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 name)
          Filters Partition.delete(org.apache.directory.shared.ldap.name.LdapDN) call.
 void destroy()
          This method does nothing by default.
static javax.naming.ldap.LdapContext getContext()
          Returns the current JNDI Context.
 org.apache.directory.shared.ldap.name.LdapDN getMatchedName(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN dn)
          Filters PartitionNexus.getMatchedName(org.apache.directory.shared.ldap.name.LdapDN) call.
static LdapPrincipal getPrincipal()
          Returns LdapPrincipal of current context.
 javax.naming.directory.Attributes getRootDSE(NextInterceptor next)
          Filters PartitionNexus.getRootDSE() call.
 org.apache.directory.shared.ldap.name.LdapDN getSuffix(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN dn)
          Filters PartitionNexus.getSuffix(org.apache.directory.shared.ldap.name.LdapDN) call.
 boolean hasEntry(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN name)
          Filters Partition.lookup(org.apache.directory.shared.ldap.name.LdapDN,String[]) call.
 void init(DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg)
          This method does nothing by default.
 boolean isSuffix(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN name)
          Filters Partition.isSuffix(org.apache.directory.shared.ldap.name.LdapDN) call.
 javax.naming.NamingEnumeration list(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN base)
          Filters Partition.list(org.apache.directory.shared.ldap.name.LdapDN) call.
 java.util.Iterator listSuffixes(NextInterceptor next)
          Filters PartitionNexus.listSuffixes() call.
 javax.naming.directory.Attributes lookup(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN name)
          Filters Partition.lookup(org.apache.directory.shared.ldap.name.LdapDN) call.
 javax.naming.directory.Attributes lookup(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN dn, java.lang.String[] attrIds)
          Filters Partition.lookup(org.apache.directory.shared.ldap.name.LdapDN,String[]) call.
 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 name, java.lang.String newRn, boolean deleteOldRn)
          Filters Partition.modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean) call.
 void move(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN oriChildName, org.apache.directory.shared.ldap.name.LdapDN newParentName)
          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 oriChildName, org.apache.directory.shared.ldap.name.LdapDN newParentName, java.lang.String newRn, boolean deleteOldRn)
          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 searchCtls)
          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.
 void unbind(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN bindDn)
          Filters Partition.unbind(org.apache.directory.shared.ldap.name.LdapDN) call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseInterceptor

protected BaseInterceptor()
Creates a new instance.

Method Detail

getPrincipal

public static LdapPrincipal getPrincipal()
Returns LdapPrincipal of current context.


getContext

public static javax.naming.ldap.LdapContext getContext()
Returns the current JNDI Context.


init

public void init(DirectoryServiceConfiguration factoryCfg,
                 InterceptorConfiguration cfg)
          throws javax.naming.NamingException
This method does nothing by default.

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

destroy

public void destroy()
This method does nothing by default.

Specified by:
destroy in interface Interceptor

add

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

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

delete

public void delete(NextInterceptor next,
                   org.apache.directory.shared.ldap.name.LdapDN name)
            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
Throws:
javax.naming.NamingException

getMatchedName

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

Specified by:
getMatchedName in interface Interceptor
Throws:
javax.naming.NamingException

getRootDSE

public javax.naming.directory.Attributes getRootDSE(NextInterceptor next)
                                             throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters PartitionNexus.getRootDSE() call.

Specified by:
getRootDSE in interface Interceptor
Throws:
javax.naming.NamingException

getSuffix

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

Specified by:
getSuffix in interface Interceptor
Throws:
javax.naming.NamingException

hasEntry

public boolean hasEntry(NextInterceptor next,
                        org.apache.directory.shared.ldap.name.LdapDN name)
                 throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.lookup(org.apache.directory.shared.ldap.name.LdapDN,String[]) call.

Specified by:
hasEntry in interface Interceptor
Throws:
javax.naming.NamingException

isSuffix

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

Specified by:
isSuffix in interface Interceptor
Throws:
javax.naming.NamingException

list

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

Specified by:
list in interface Interceptor
Throws:
javax.naming.NamingException

listSuffixes

public java.util.Iterator listSuffixes(NextInterceptor next)
                                throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters PartitionNexus.listSuffixes() call.

Specified by:
listSuffixes in interface Interceptor
Throws:
javax.naming.NamingException

lookup

public javax.naming.directory.Attributes lookup(NextInterceptor next,
                                                org.apache.directory.shared.ldap.name.LdapDN dn,
                                                java.lang.String[] attrIds)
                                         throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.lookup(org.apache.directory.shared.ldap.name.LdapDN,String[]) call.

Specified by:
lookup in interface Interceptor
Throws:
javax.naming.NamingException

lookup

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

Specified by:
lookup in interface Interceptor
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
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
Throws:
javax.naming.NamingException

modifyRn

public void modifyRn(NextInterceptor next,
                     org.apache.directory.shared.ldap.name.LdapDN name,
                     java.lang.String newRn,
                     boolean deleteOldRn)
              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
Throws:
javax.naming.NamingException

move

public void move(NextInterceptor next,
                 org.apache.directory.shared.ldap.name.LdapDN oriChildName,
                 org.apache.directory.shared.ldap.name.LdapDN newParentName,
                 java.lang.String newRn,
                 boolean deleteOldRn)
          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
Throws:
javax.naming.NamingException

move

public void move(NextInterceptor next,
                 org.apache.directory.shared.ldap.name.LdapDN oriChildName,
                 org.apache.directory.shared.ldap.name.LdapDN newParentName)
          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
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 searchCtls)
                                      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
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
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
Throws:
javax.naming.NamingException

compare

public boolean compare(NextInterceptor next,
                       org.apache.directory.shared.ldap.name.LdapDN name,
                       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
Throws:
javax.naming.NamingException

bind

public void bind(NextInterceptor next,
                 org.apache.directory.shared.ldap.name.LdapDN bindDn,
                 byte[] credentials,
                 java.util.List mechanisms,
                 java.lang.String saslAuthId)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.bind(org.apache.directory.shared.ldap.name.LdapDN,byte[],java.util.List,String) call.

Specified by:
bind in interface Interceptor
Throws:
javax.naming.NamingException

unbind

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

Specified by:
unbind in interface Interceptor
Throws:
javax.naming.NamingException


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