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:
AciAuthorizationInterceptor, AuthenticationInterceptor, ChangeLogInterceptor, CollectiveAttributeInterceptor, DefaultAuthorizationInterceptor, EventInterceptor, ExceptionInterceptor, JournalInterceptor, KeyDerivationInterceptor, NormalizationInterceptor, OperationalAttributeInterceptor, PasswordPolicyInterceptor, ReferralInterceptor, SchemaInterceptor, SubentryInterceptor, TriggerInterceptor

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: 918766 $, $Date: 2010-03-04 00:25:11 +0100 (Thu, 04 Mar 2010) $
Author:
Apache Directory Project
XBean

Constructor Summary
protected BaseInterceptor()
          Creates a new instance.
 
Method Summary
 void add(NextInterceptor next, AddOperationContext opContext)
          Filters Partition.add( AddOperationContext ) call.
 void addContextPartition(NextInterceptor next, AddContextPartitionOperationContext opContext)
          Filters DefaultPartitionNexus#addContextPartition( AddContextPartitionOperationContext ) call.
 void bind(NextInterceptor next, BindOperationContext opContext)
          Filters Partition.bind( BindOperationContext ) call.
 boolean compare(NextInterceptor next, CompareOperationContext opContext)
          Filters DefaultPartitionNexus#compare( CompareOperationContext ) call.
 void delete(NextInterceptor next, DeleteOperationContext opContext)
          Filters Partition.delete( DeleteOperationContext ) call.
 void destroy()
          This method does nothing by default.
static OperationContext getContext()
          TODO delete this since it uses static access Returns the current JNDI Context.
 org.apache.directory.shared.ldap.name.DN getMatchedName(NextInterceptor next, GetMatchedNameOperationContext opContext)
          Filters DefaultPartitionNexus#getMatchedName( GetMatchedNameOperationContext ) call.
 java.lang.String getName()
          default interceptor name is its class, preventing accidental duplication of interceptors by naming instances differently
static LdapPrincipal getPrincipal()
          TODO delete this since it uses static access Returns LdapPrincipal of current context.
 ClonedServerEntry getRootDSE(NextInterceptor next, GetRootDSEOperationContext opContext)
          Filters DefaultPartitionNexus#getRootDSE( GetRootDSEOperationContext ) call.
 org.apache.directory.shared.ldap.name.DN getSuffix(NextInterceptor next, GetSuffixOperationContext opContext)
          Filters DefaultPartitionNexus#getSuffix( GetSuffixOperationContext ) call.
 boolean hasEntry(NextInterceptor next, EntryOperationContext opContext)
          Filters Partition.hasEntry( EntryOperationContext ) call.
 void init(DirectoryService directoryService)
          This method does nothing by default.
 EntryFilteringCursor list(NextInterceptor next, ListOperationContext opContext)
          Filters Partition.list( ListOperationContext ) call.
 java.util.Set<java.lang.String> listSuffixes(NextInterceptor next, ListSuffixOperationContext opContext)
          Filters DefaultPartitionNexus#listSuffixes( ListSuffixOperationContext ) call.
 ClonedServerEntry lookup(NextInterceptor next, LookupOperationContext opContext)
          Filters Partition.lookup( LookupOperationContext ) call.
 void modify(NextInterceptor next, ModifyOperationContext opContext)
          Filters Partition.modify( ModifyOperationContext ) call.
 void move(NextInterceptor next, MoveOperationContext opContext)
          Filters Partition.move( MoveOperationContext ) call.
 void moveAndRename(NextInterceptor next, MoveAndRenameOperationContext opContext)
          Filters Partition.moveAndRename( MoveAndRenameOperationContext) call.
 void removeContextPartition(NextInterceptor next, RemoveContextPartitionOperationContext opContext)
          Filters DefaultPartitionNexus#removeContextPartition( RemoveContextPartitionOperationContext ) call.
 void rename(NextInterceptor next, RenameOperationContext opContext)
          Filters Partition.rename( RenameOperationContext ) call.
 EntryFilteringCursor search(NextInterceptor next, SearchOperationContext opContext)
          Filters Partition.search( SearchOperationContext ) call.
 void unbind(NextInterceptor next, UnbindOperationContext opContext)
          Filters Partition.unbind( UnbindOperationContext ) 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

getName

public java.lang.String getName()
default interceptor name is its class, preventing accidental duplication of interceptors by naming instances differently

Specified by:
getName in interface Interceptor
Returns:
(default, class name) interceptor name

getPrincipal

public static LdapPrincipal getPrincipal()
TODO delete this since it uses static access Returns LdapPrincipal of current context.

Returns:
the authenticated principal

getContext

public static OperationContext getContext()
TODO delete this since it uses static access Returns the current JNDI Context.

Returns:
the context on the invocation stack

init

public void init(DirectoryService directoryService)
          throws java.lang.Exception
This method does nothing by default.

Specified by:
init in interface Interceptor
Throws:
java.lang.Exception

destroy

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

Specified by:
destroy in interface Interceptor

add

public void add(NextInterceptor next,
                AddOperationContext opContext)
         throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.add( AddOperationContext ) call.

Specified by:
add in interface Interceptor
Throws:
java.lang.Exception

delete

public void delete(NextInterceptor next,
                   DeleteOperationContext opContext)
            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.delete( DeleteOperationContext ) call.

Specified by:
delete in interface Interceptor
Throws:
java.lang.Exception

getMatchedName

public org.apache.directory.shared.ldap.name.DN getMatchedName(NextInterceptor next,
                                                               GetMatchedNameOperationContext opContext)
                                                        throws java.lang.Exception
Description copied from interface: Interceptor
Filters DefaultPartitionNexus#getMatchedName( GetMatchedNameOperationContext ) call.

Specified by:
getMatchedName in interface Interceptor
Throws:
java.lang.Exception

getRootDSE

public ClonedServerEntry getRootDSE(NextInterceptor next,
                                    GetRootDSEOperationContext opContext)
                             throws java.lang.Exception
Description copied from interface: Interceptor
Filters DefaultPartitionNexus#getRootDSE( GetRootDSEOperationContext ) call.

Specified by:
getRootDSE in interface Interceptor
Throws:
java.lang.Exception

getSuffix

public org.apache.directory.shared.ldap.name.DN getSuffix(NextInterceptor next,
                                                          GetSuffixOperationContext opContext)
                                                   throws java.lang.Exception
Description copied from interface: Interceptor
Filters DefaultPartitionNexus#getSuffix( GetSuffixOperationContext ) call.

Specified by:
getSuffix in interface Interceptor
Throws:
java.lang.Exception

hasEntry

public boolean hasEntry(NextInterceptor next,
                        EntryOperationContext opContext)
                 throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.hasEntry( EntryOperationContext ) call.

Specified by:
hasEntry in interface Interceptor
Throws:
java.lang.Exception

list

public EntryFilteringCursor list(NextInterceptor next,
                                 ListOperationContext opContext)
                          throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.list( ListOperationContext ) call.

Specified by:
list in interface Interceptor
Throws:
java.lang.Exception

listSuffixes

public java.util.Set<java.lang.String> listSuffixes(NextInterceptor next,
                                                    ListSuffixOperationContext opContext)
                                             throws java.lang.Exception
Description copied from interface: Interceptor
Filters DefaultPartitionNexus#listSuffixes( ListSuffixOperationContext ) call.

Specified by:
listSuffixes in interface Interceptor
Throws:
java.lang.Exception

lookup

public ClonedServerEntry lookup(NextInterceptor next,
                                LookupOperationContext opContext)
                         throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.lookup( LookupOperationContext ) call.

Specified by:
lookup in interface Interceptor
Throws:
java.lang.Exception

modify

public void modify(NextInterceptor next,
                   ModifyOperationContext opContext)
            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.modify( ModifyOperationContext ) call.

Specified by:
modify in interface Interceptor
Throws:
java.lang.Exception

moveAndRename

public void moveAndRename(NextInterceptor next,
                          MoveAndRenameOperationContext opContext)
                   throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.moveAndRename( MoveAndRenameOperationContext) call.

Specified by:
moveAndRename in interface Interceptor
Throws:
java.lang.Exception

rename

public void rename(NextInterceptor next,
                   RenameOperationContext opContext)
            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.rename( RenameOperationContext ) call.

Specified by:
rename in interface Interceptor
Throws:
java.lang.Exception

move

public void move(NextInterceptor next,
                 MoveOperationContext opContext)
          throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.move( MoveOperationContext ) call.

Specified by:
move in interface Interceptor
Throws:
java.lang.Exception

search

public EntryFilteringCursor search(NextInterceptor next,
                                   SearchOperationContext opContext)
                            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.search( SearchOperationContext ) call.

Specified by:
search in interface Interceptor
Throws:
java.lang.Exception

addContextPartition

public void addContextPartition(NextInterceptor next,
                                AddContextPartitionOperationContext opContext)
                         throws java.lang.Exception
Description copied from interface: Interceptor
Filters DefaultPartitionNexus#addContextPartition( AddContextPartitionOperationContext ) call.

Specified by:
addContextPartition in interface Interceptor
Throws:
java.lang.Exception

removeContextPartition

public void removeContextPartition(NextInterceptor next,
                                   RemoveContextPartitionOperationContext opContext)
                            throws java.lang.Exception
Description copied from interface: Interceptor
Filters DefaultPartitionNexus#removeContextPartition( RemoveContextPartitionOperationContext ) call.

Specified by:
removeContextPartition in interface Interceptor
Throws:
java.lang.Exception

compare

public boolean compare(NextInterceptor next,
                       CompareOperationContext opContext)
                throws java.lang.Exception
Description copied from interface: Interceptor
Filters DefaultPartitionNexus#compare( CompareOperationContext ) call.

Specified by:
compare in interface Interceptor
Throws:
java.lang.Exception

bind

public void bind(NextInterceptor next,
                 BindOperationContext opContext)
          throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.bind( BindOperationContext ) call.

Specified by:
bind in interface Interceptor
Throws:
java.lang.Exception

unbind

public void unbind(NextInterceptor next,
                   UnbindOperationContext opContext)
            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.unbind( UnbindOperationContext ) call.

Specified by:
unbind in interface Interceptor
Throws:
java.lang.Exception


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