public abstract class BaseInterceptor extends Object implements Interceptor
Interceptor. All methods are
implemented to pass the flow of control to next interceptor by defaults.
Please override the methods you have concern in.| Modifier and Type | Field and Description |
|---|---|
protected DirectoryService |
directoryService
A reference to the DirectoryService instance
|
protected DnFactory |
dnFactory
The DN factory
|
protected static Set<org.apache.directory.api.ldap.model.schema.AttributeType> |
PWD_POLICY_STATE_ATTRIBUTE_TYPES
set of operational attribute types used for representing the password policy state of a user entry
|
protected org.apache.directory.api.ldap.model.schema.SchemaManager |
schemaManager
A reference to the SchemaManager instance
|
| Modifier | Constructor and Description |
|---|---|
protected |
BaseInterceptor()
Creates a new instance with a default name : the class name itself.
|
protected |
BaseInterceptor(InterceptorEnum interceptor)
Creates a new instance with a given name.
|
protected |
BaseInterceptor(String name)
Creates a new instance with a given name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(AddOperationContext addContext)
Filters
Partition#add( AddOperationContext ) call. |
void |
bind(BindOperationContext bindContext)
Filters
Partition#bind( BindOperationContext ) call. |
boolean |
compare(CompareOperationContext compareContext)
Filters
DefaultPartitionNexus#compare( CompareOperationContext ) call. |
void |
delete(DeleteOperationContext deleteContext)
Filters
Partition#delete( DeleteOperationContext ) call. |
void |
destroy()
This method does nothing by default.
|
String |
getName()
default interceptor name is its class, preventing accidental duplication of interceptors by naming
instances differently
|
protected Interceptor |
getNextInterceptor(OperationContext operationContext)
Computes the next interceptor to call for a given operation.
|
static LdapPrincipal |
getPrincipal(OperationContext opContext)
Returns
LdapPrincipal of current context. |
org.apache.directory.api.ldap.model.entry.Entry |
getRootDse(GetRootDseOperationContext getRootDseContext)
Filters
DefaultPartitionNexus#getRootDse( GetRootDseOperationContext ) call. |
boolean |
hasEntry(HasEntryOperationContext hasEntryContext)
Filters
Partition#hasEntry( HasEntryOperationContext ) call. |
void |
init(DirectoryService directoryService)
This method does nothing by default.
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(LookupOperationContext lookupContext)
Filters
Partition#lookup( LookupOperationContext ) call. |
void |
modify(ModifyOperationContext modifyContext)
Filters
Partition#modify( ModifyOperationContext ) call. |
void |
move(MoveOperationContext moveContext)
Filters
Partition#move( MoveOperationContext ) call. |
void |
moveAndRename(MoveAndRenameOperationContext moveAndRenameContext)
Filters
Partition#moveAndRename( MoveAndRenameOperationContext) call. |
protected void |
next(AddOperationContext addContext)
Calls the next interceptor for the add operation.
|
protected void |
next(BindOperationContext bindContext)
Calls the next interceptor for the bind operation.
|
protected boolean |
next(CompareOperationContext compareContext)
Calls the next interceptor for the compare operation.
|
protected void |
next(DeleteOperationContext deleteContext)
Calls the next interceptor for the delete operation.
|
protected org.apache.directory.api.ldap.model.entry.Entry |
next(GetRootDseOperationContext getRootDseContext)
Calls the next interceptor for the getRootDse operation.
|
protected boolean |
next(HasEntryOperationContext hasEntryContext)
Calls the next interceptor for the hasEntry operation.
|
protected org.apache.directory.api.ldap.model.entry.Entry |
next(LookupOperationContext lookupContext)
Calls the next interceptor for the lookup operation.
|
protected void |
next(ModifyOperationContext modifyContext)
Calls the next interceptor for the modify operation.
|
protected void |
next(MoveAndRenameOperationContext moveAndRenameContext)
Calls the next interceptor for the moveAndRename operation.
|
protected void |
next(MoveOperationContext moveContext)
Calls the next interceptor for the move operation.
|
protected void |
next(RenameOperationContext renameContext)
Calls the next interceptor for the rename operation.
|
protected EntryFilteringCursor |
next(SearchOperationContext searchContext)
Calls the next interceptor for the search operation.
|
protected void |
next(UnbindOperationContext unbindContext)
Compute the next interceptor for the unbind operation.
|
void |
rename(RenameOperationContext renameContext)
Filters
Partition#rename( RenameOperationContext ) call. |
EntryFilteringCursor |
search(SearchOperationContext searchContext)
Filters
Partition#search( SearchOperationContext ) call. |
void |
unbind(UnbindOperationContext unbindContext)
Filters
Partition#unbind( UnbindOperationContext ) call. |
protected DirectoryService directoryService
protected org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager
protected DnFactory dnFactory
protected static final Set<org.apache.directory.api.ldap.model.schema.AttributeType> PWD_POLICY_STATE_ATTRIBUTE_TYPES
protected BaseInterceptor()
protected BaseInterceptor(String name)
name - the Interceptor nameprotected BaseInterceptor(InterceptorEnum interceptor)
name - the Interceptor namepublic String getName()
getName in interface Interceptorpublic static LdapPrincipal getPrincipal(OperationContext opContext)
LdapPrincipal of current context.opContext - TODOpublic void init(DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
init in interface InterceptorExceptionorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void destroy()
destroy in interface Interceptorprotected Interceptor getNextInterceptor(OperationContext operationContext)
operationContext - The operation contextpublic void add(AddOperationContext addContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#add( AddOperationContext ) call.add in interface InterceptoraddContext - The AddOperationContext instanceorg.apache.directory.api.ldap.model.exception.LdapException - If we had some error while processing the Add operationprotected final void next(AddOperationContext addContext) throws org.apache.directory.api.ldap.model.exception.LdapException
addContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic void bind(BindOperationContext bindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#bind( BindOperationContext ) call.bind in interface Interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected final void next(BindOperationContext bindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
bindContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic boolean compare(CompareOperationContext compareContext) throws org.apache.directory.api.ldap.model.exception.LdapException
InterceptorDefaultPartitionNexus#compare( CompareOperationContext ) call.compare in interface Interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected final boolean next(CompareOperationContext compareContext) throws org.apache.directory.api.ldap.model.exception.LdapException
compareContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic void delete(DeleteOperationContext deleteContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#delete( DeleteOperationContext ) call.delete in interface Interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected final void next(DeleteOperationContext deleteContext) throws org.apache.directory.api.ldap.model.exception.LdapException
deleteContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic org.apache.directory.api.ldap.model.entry.Entry getRootDse(GetRootDseOperationContext getRootDseContext) throws org.apache.directory.api.ldap.model.exception.LdapException
DefaultPartitionNexus#getRootDse( GetRootDseOperationContext ) call.getRootDse in interface InterceptorgetRootDseContext - The getRoot() operation contextorg.apache.directory.api.ldap.model.exception.LdapException - If we can't get back the RootDSE entryprotected final org.apache.directory.api.ldap.model.entry.Entry next(GetRootDseOperationContext getRootDseContext) throws org.apache.directory.api.ldap.model.exception.LdapException
getRootDseContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic boolean hasEntry(HasEntryOperationContext hasEntryContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#hasEntry( HasEntryOperationContext ) call.hasEntry in interface Interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected final boolean next(HasEntryOperationContext hasEntryContext) throws org.apache.directory.api.ldap.model.exception.LdapException
hasEntryContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic org.apache.directory.api.ldap.model.entry.Entry lookup(LookupOperationContext lookupContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#lookup( LookupOperationContext ) call.lookup in interface Interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected final org.apache.directory.api.ldap.model.entry.Entry next(LookupOperationContext lookupContext) throws org.apache.directory.api.ldap.model.exception.LdapException
lookupContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic void modify(ModifyOperationContext modifyContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#modify( ModifyOperationContext ) call.modify in interface Interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected final void next(ModifyOperationContext modifyContext) throws org.apache.directory.api.ldap.model.exception.LdapException
modifyContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic void move(MoveOperationContext moveContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#move( MoveOperationContext ) call.move in interface Interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected final void next(MoveOperationContext moveContext) throws org.apache.directory.api.ldap.model.exception.LdapException
moveContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
InterceptorPartition#moveAndRename( MoveAndRenameOperationContext) call.moveAndRename in interface Interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected final void next(MoveAndRenameOperationContext moveAndRenameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRenameContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic void rename(RenameOperationContext renameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#rename( RenameOperationContext ) call.rename in interface Interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected final void next(RenameOperationContext renameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
renameContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic EntryFilteringCursor search(SearchOperationContext searchContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#search( SearchOperationContext ) call.search in interface Interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected final EntryFilteringCursor next(SearchOperationContext searchContext) throws org.apache.directory.api.ldap.model.exception.LdapException
searchContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongpublic void unbind(UnbindOperationContext unbindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#unbind( UnbindOperationContext ) call.unbind in interface Interceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected final void next(UnbindOperationContext unbindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
unbindContext - The context in which we are executing this operationorg.apache.directory.api.ldap.model.exception.LdapException - If something went wrongCopyright © 2021. All rights reserved.