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 |
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 MoveAndRename 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
directoryService
- The DirectoryService instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If the initialization failedpublic 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
deleteContext
- The DeleteOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Delete operationpublic 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
modifyContext
- The ModifyOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Modify operationpublic 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
moveContext
- The MoveOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Move operationpublic void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRename
in interface Interceptor
moveAndRename
in class BaseInterceptor
moveAndRenameContext
- The MoveAndRenameOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the MoveAndRename operationpublic 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
renameContext
- The RenameOperationContext
instanceorg.apache.directory.api.ldap.model.exception.LdapException
- If we had some error while processing the Rename operationCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.