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.Constructor and Description |
---|
ExceptionInterceptor()
Creates an interceptor that is also the exception handling service.
|
Modifier and Type | Method and Description |
---|---|
void |
add(NextInterceptor nextInterceptor,
AddOperationContext opContext)
In the pre-invocation state this interceptor method checks to see if the entry to be added already exists.
|
void |
delete(NextInterceptor nextInterceptor,
DeleteOperationContext opContext)
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.
|
EntryFilteringCursor |
list(NextInterceptor nextInterceptor,
ListOperationContext opContext)
Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
|
ClonedServerEntry |
lookup(NextInterceptor nextInterceptor,
LookupOperationContext opContext)
Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
|
void |
modify(NextInterceptor nextInterceptor,
ModifyOperationContext opContext)
Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.
|
void |
move(NextInterceptor nextInterceptor,
MoveOperationContext opContext)
Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
LdapException.
|
void |
moveAndRename(NextInterceptor nextInterceptor,
MoveAndRenameOperationContext opContext)
Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
LdapException.
|
void |
rename(NextInterceptor nextInterceptor,
RenameOperationContext opContext)
Checks to see the entry being renamed exists, otherwise throws the appropriate LdapException.
|
EntryFilteringCursor |
search(NextInterceptor nextInterceptor,
SearchOperationContext opContext)
Checks to see the entry being searched exists, otherwise throws the appropriate LdapException.
|
addContextPartition, bind, compare, getContext, getMatchedName, getName, getPrincipal, getRootDSE, getSuffix, hasEntry, listSuffixes, removeContextPartition, unbind
public ExceptionInterceptor()
public void init(DirectoryService directoryService) throws Exception
BaseInterceptor
init
in interface Interceptor
init
in class BaseInterceptor
Exception
public void destroy()
BaseInterceptor
destroy
in interface Interceptor
destroy
in class BaseInterceptor
public void add(NextInterceptor nextInterceptor, AddOperationContext opContext) throws Exception
add
in interface Interceptor
add
in class BaseInterceptor
Exception
public void delete(NextInterceptor nextInterceptor, DeleteOperationContext opContext) throws Exception
delete
in interface Interceptor
delete
in class BaseInterceptor
Exception
public EntryFilteringCursor list(NextInterceptor nextInterceptor, ListOperationContext opContext) throws Exception
list
in interface Interceptor
list
in class BaseInterceptor
Exception
public ClonedServerEntry lookup(NextInterceptor nextInterceptor, LookupOperationContext opContext) throws Exception
lookup
in interface Interceptor
lookup
in class BaseInterceptor
Exception
public void modify(NextInterceptor nextInterceptor, ModifyOperationContext opContext) throws Exception
modify
in interface Interceptor
modify
in class BaseInterceptor
Exception
public void rename(NextInterceptor nextInterceptor, RenameOperationContext opContext) throws Exception
rename
in interface Interceptor
rename
in class BaseInterceptor
Exception
public void move(NextInterceptor nextInterceptor, MoveOperationContext opContext) throws Exception
move
in interface Interceptor
move
in class BaseInterceptor
Exception
public void moveAndRename(NextInterceptor nextInterceptor, MoveAndRenameOperationContext opContext) throws Exception
moveAndRename
in interface Interceptor
moveAndRename
in class BaseInterceptor
Exception
public EntryFilteringCursor search(NextInterceptor nextInterceptor, SearchOperationContext opContext) throws Exception
search
in interface Interceptor
search
in class BaseInterceptor
Exception
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.