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
BindOperationContext call. |
boolean |
compare(CompareOperationContext compareContext)
Filters Compare 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 getRootDse 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 MoveAndRename 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 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)
interceptor
- the Interceptor typepublic String getName()
getName
in interface Interceptor
public 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 Interceptor
directoryService
- The DirectoryService instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If the initialization failedpublic void destroy()
destroy
in interface Interceptor
protected 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 Interceptor
addContext
- 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
BindOperationContext
call.bind
in interface Interceptor
bindContext
- The BindOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Bind operationprotected 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
Interceptor
compare
in interface Interceptor
compareContext
- The CompareOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Compare operationprotected 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 Interceptor
deleteContext
- The DeleteOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Delete operationprotected 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
getRootDse
in interface Interceptor
getRootDseContext
- The getRootDSE 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 Interceptor
hasEntryContext
- The HasEntryOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the HasEntry operationprotected 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 Interceptor
lookupContext
- The LookupOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Lookup operationprotected 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 Interceptor
modifyContext
- The ModifyOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Modify operationprotected 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 Interceptor
moveContext
- The MoveOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Move operationprotected 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
Interceptor
moveAndRename
in interface Interceptor
moveAndRenameContext
- The MoveAndRenameOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the MoveAndRename operationprotected 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 Interceptor
renameContext
- The RenameOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Rename operationprotected 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 Interceptor
searchContext
- The SearchOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Search operationprotected 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 Interceptor
unbindContext
- The UnbindOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Unbind operationprotected 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 © 2003–2020 The Apache Software Foundation. All rights reserved.