public interface Interceptor
DefaultPartitionNexus. Interceptor
filters most method calls performed on DefaultPartitionNexus just
like Servlet filters do.
NextInterceptor. The flow control is returned when the next
interceptor's filter method returns. You can therefore implement pre-, post-,
around- invocation handler by how you place the statement. Otherwise, you
can transform the invocation into other(s).
public void delete( NextInterceptor nextInterceptor, Name name )
{
System.out.println( "Starting invocation." );
nextInterceptor.delete( name );
}
public void delete( NextInterceptor nextInterceptor, Name name )
{
nextInterceptor.delete( name );
System.out.println( "Invocation ended." );
}
public void delete( NextInterceptor nextInterceptor, Name name )
{
long startTime = System.currentTimeMillis();
try
{
nextInterceptor.delete( name );
}
finally
{
long endTime = System.currentTimeMillis();
System.out.println( ( endTime - startTime ) + "ms elapsed." );
}
}
public void delete( NextInterceptor nextInterceptor, Name name )
{
// transform deletion into modification.
Attribute mark = new AttributeImpl( "entryDeleted", "true" );
nextInterceptor.modify( name, DirIteratorContext.REPLACE_ATTRIBUTE, mark );
}
| 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()
Deinitializes this interceptor.
|
String |
getName()
Name that must be unique in an interceptor chain
|
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)
Intializes this interceptor.
|
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. |
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. |
String getName()
void init(DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
Exceptionorg.apache.directory.api.ldap.model.exception.LdapExceptionvoid destroy()
void add(AddOperationContext addContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#add( AddOperationContext ) call.addContext - The AddOperationContext instanceorg.apache.directory.api.ldap.model.exception.LdapException - If we had some error while processing the Add operationvoid bind(BindOperationContext bindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#bind( BindOperationContext ) call.org.apache.directory.api.ldap.model.exception.LdapExceptionboolean compare(CompareOperationContext compareContext) throws org.apache.directory.api.ldap.model.exception.LdapException
DefaultPartitionNexus#compare( CompareOperationContext ) call.org.apache.directory.api.ldap.model.exception.LdapExceptionvoid delete(DeleteOperationContext deleteContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#delete( DeleteOperationContext ) call.org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.entry.Entry getRootDse(GetRootDseOperationContext getRootDseContext) throws org.apache.directory.api.ldap.model.exception.LdapException
DefaultPartitionNexus#getRootDse( GetRootDseOperationContext ) call.getRootDseContext - The getRoot() operation contextorg.apache.directory.api.ldap.model.exception.LdapException - If we can't get back the RootDSE entryboolean hasEntry(HasEntryOperationContext hasEntryContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#hasEntry( HasEntryOperationContext ) call.org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.entry.Entry lookup(LookupOperationContext lookupContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#lookup( LookupOperationContext ) call.org.apache.directory.api.ldap.model.exception.LdapExceptionvoid modify(ModifyOperationContext modifyContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#modify( ModifyOperationContext ) call.org.apache.directory.api.ldap.model.exception.LdapExceptionvoid move(MoveOperationContext moveContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#move( MoveOperationContext ) call.org.apache.directory.api.ldap.model.exception.LdapExceptionvoid moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#moveAndRename( MoveAndRenameOperationContext) call.org.apache.directory.api.ldap.model.exception.LdapExceptionvoid rename(RenameOperationContext renameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#rename( RenameOperationContext ) call.org.apache.directory.api.ldap.model.exception.LdapExceptionEntryFilteringCursor search(SearchOperationContext searchContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#search( SearchOperationContext ) call.org.apache.directory.api.ldap.model.exception.LdapExceptionvoid unbind(UnbindOperationContext unbindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#unbind( UnbindOperationContext ) call.org.apache.directory.api.ldap.model.exception.LdapExceptionCopyright © 2021. All rights reserved.