public class ExceptionInterceptor extends BaseInterceptor
Interceptor
that detects any operations that breaks integrity
of Partition
and terminates the current invocation chain by
throwing a Exception
. Those operations include when an entry
already exists at a Dn and is added once again to the same Dn.directoryService, dnFactory, PWD_POLICY_STATE_ATTRIBUTE_TYPES, schemaManager
Constructor and Description |
---|
ExceptionInterceptor()
Creates an interceptor that is also the exception handling service.
|
Modifier and Type | Method and Description |
---|---|
void |
add(AddOperationContext addContext)
In the pre-invocation state this interceptor method checks to see if the entry to be added already exists.
|
void |
delete(DeleteOperationContext deleteContext)
Checks to make sure the entry being deleted exists, and has no children, otherwise throws the appropriate
LdapException.
|
void |
destroy()
This method does nothing by default.
|
void |
init(DirectoryService directoryService)
This method does nothing by default.
|
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. |
public ExceptionInterceptor()
public void init(DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
init
in interface Interceptor
init
in class BaseInterceptor
org.apache.directory.api.ldap.model.exception.LdapException
public void destroy()
BaseInterceptor
destroy
in interface Interceptor
destroy
in class BaseInterceptor
public void add(AddOperationContext addContext) throws org.apache.directory.api.ldap.model.exception.LdapException
add
in interface Interceptor
add
in class BaseInterceptor
addContext
- The AddOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Add operationpublic void delete(DeleteOperationContext deleteContext) throws org.apache.directory.api.ldap.model.exception.LdapException
delete
in interface Interceptor
delete
in class BaseInterceptor
org.apache.directory.api.ldap.model.exception.LdapException
public void modify(ModifyOperationContext modifyContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#modify( ModifyOperationContext )
call.modify
in interface Interceptor
modify
in class BaseInterceptor
org.apache.directory.api.ldap.model.exception.LdapException
public void move(MoveOperationContext moveContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#move( MoveOperationContext )
call.move
in interface Interceptor
move
in class BaseInterceptor
org.apache.directory.api.ldap.model.exception.LdapException
public void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#moveAndRename( MoveAndRenameOperationContext)
call.moveAndRename
in interface Interceptor
moveAndRename
in class BaseInterceptor
org.apache.directory.api.ldap.model.exception.LdapException
public void rename(RenameOperationContext renameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#rename( RenameOperationContext )
call.rename
in interface Interceptor
rename
in class BaseInterceptor
org.apache.directory.api.ldap.model.exception.LdapException
Copyright © 2016. All rights reserved.