org.apache.ldap.server.exception
Class ExceptionService

java.lang.Object
  extended byorg.apache.ldap.server.interceptor.BaseInterceptor
      extended byorg.apache.ldap.server.exception.ExceptionService
All Implemented Interfaces:
Interceptor

public class ExceptionService
extends BaseInterceptor

An Interceptor that detects any operations that breaks integrity of BackingStore and terminates the current invocation chain by throwing a NamingException. Those operations include when an entry already exists at a DN and is added once again to the same DN.

Version:
$Rev: 159272 $
Author:
Apache Directory Project

Constructor Summary
ExceptionService()
          Creates an interceptor that is also the exception handling service.
 
Method Summary
 void destroy()
          Deinitializes this interceptor.
 void init(InterceptorContext ctx)
          Intializes this interceptor.
protected  void process(NextInterceptor nextInterceptor, Add call)
          In the pre-invocation state this interceptor method checks to see if the entry to be added already exists.
protected  void process(NextInterceptor nextInterceptor, Delete call)
          Checks to make sure the entry being deleted exists, and has no children, otherwise throws the appropriate LdapException.
protected  void process(NextInterceptor nextInterceptor, List call)
          Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
protected  void process(NextInterceptor nextInterceptor, Lookup call)
          Checks to make sure the entry being looked up exists other wise throws the appropriate LdapException.
protected  void process(NextInterceptor nextInterceptor, LookupWithAttrIds call)
          Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
protected  void process(NextInterceptor nextInterceptor, Modify call)
          Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.
protected  void process(NextInterceptor nextInterceptor, ModifyMany call)
          Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.
protected  void process(NextInterceptor nextInterceptor, ModifyRN call)
          Checks to see the entry being renamed exists, otherwise throws the appropriate LdapException.
protected  void process(NextInterceptor nextInterceptor, Move call)
          Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate LdapException.
protected  void process(NextInterceptor nextInterceptor, MoveAndModifyRN call)
          Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate LdapException.
protected  void process(NextInterceptor nextInterceptor, Search call)
          Checks to see the entry being searched exists, otherwise throws the appropriate LdapException.
 
Methods inherited from class org.apache.ldap.server.interceptor.BaseInterceptor
getPrincipal, process, process, process, process, process, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionService

public ExceptionService()
Creates an interceptor that is also the exception handling service.

Method Detail

init

public void init(InterceptorContext ctx)
Description copied from interface: Interceptor
Intializes this interceptor. This is invoked by directory service provider when this intercepter is loaded into interceptor chain.

Parameters:
ctx - the configuration properties for this interceptor

destroy

public void destroy()
Description copied from interface: Interceptor
Deinitializes this interceptor. This is invoked by directory service provider when this intercepter is unloaded from interceptor chain.


process

protected void process(NextInterceptor nextInterceptor,
                       Add call)
                throws javax.naming.NamingException
In the pre-invocation state this interceptor method checks to see if the entry to be added already exists. If it does an exception is raised.

Overrides:
process in class BaseInterceptor
Throws:
javax.naming.NamingException

process

protected void process(NextInterceptor nextInterceptor,
                       Delete call)
                throws javax.naming.NamingException
Checks to make sure the entry being deleted exists, and has no children, otherwise throws the appropriate LdapException.

Overrides:
process in class BaseInterceptor
Throws:
javax.naming.NamingException

process

protected void process(NextInterceptor nextInterceptor,
                       List call)
                throws javax.naming.NamingException
Checks to see the base being searched exists, otherwise throws the appropriate LdapException.

Overrides:
process in class BaseInterceptor
Throws:
javax.naming.NamingException

process

protected void process(NextInterceptor nextInterceptor,
                       Lookup call)
                throws javax.naming.NamingException
Checks to make sure the entry being looked up exists other wise throws the appropriate LdapException.

Overrides:
process in class BaseInterceptor
Throws:
javax.naming.NamingException

process

protected void process(NextInterceptor nextInterceptor,
                       LookupWithAttrIds call)
                throws javax.naming.NamingException
Checks to see the base being searched exists, otherwise throws the appropriate LdapException.

Overrides:
process in class BaseInterceptor
Throws:
javax.naming.NamingException

process

protected void process(NextInterceptor nextInterceptor,
                       Modify call)
                throws javax.naming.NamingException
Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.

Overrides:
process in class BaseInterceptor
Throws:
javax.naming.NamingException

process

protected void process(NextInterceptor nextInterceptor,
                       ModifyMany call)
                throws javax.naming.NamingException
Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.

Overrides:
process in class BaseInterceptor
Throws:
javax.naming.NamingException

process

protected void process(NextInterceptor nextInterceptor,
                       ModifyRN call)
                throws javax.naming.NamingException
Checks to see the entry being renamed exists, otherwise throws the appropriate LdapException.

Overrides:
process in class BaseInterceptor
Throws:
javax.naming.NamingException

process

protected void process(NextInterceptor nextInterceptor,
                       Move call)
                throws javax.naming.NamingException
Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate LdapException.

Overrides:
process in class BaseInterceptor
Throws:
javax.naming.NamingException

process

protected void process(NextInterceptor nextInterceptor,
                       MoveAndModifyRN call)
                throws javax.naming.NamingException
Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate LdapException.

Overrides:
process in class BaseInterceptor
Throws:
javax.naming.NamingException

process

protected void process(NextInterceptor nextInterceptor,
                       Search call)
                throws javax.naming.NamingException
Checks to see the entry being searched exists, otherwise throws the appropriate LdapException.

Overrides:
process in class BaseInterceptor
Throws:
javax.naming.NamingException


Copyright © 2002-2005 . All Rights Reserved.