org.apache.directory.server.core.exception
Class ExceptionInterceptor

java.lang.Object
  extended by org.apache.directory.server.core.api.interceptor.BaseInterceptor
      extended by org.apache.directory.server.core.exception.ExceptionInterceptor
All Implemented Interfaces:
org.apache.directory.server.core.api.interceptor.Interceptor

public class ExceptionInterceptor
extends org.apache.directory.server.core.api.interceptor.BaseInterceptor

An 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.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.server.core.api.interceptor.BaseInterceptor
ACCESS_CONTROL_SUBENTRIES_AT, ADMINISTRATIVE_ROLE_AT, COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT, COLLECTIVE_EXCLUSIONS_AT, directoryService, ENTRY_ACI_AT, ENTRY_CSN_AT, ENTRY_UUID_AT, MODIFIERS_NAME_AT, MODIFY_TIMESTAMP_AT, OBJECT_CLASS_AT, PWD_POLICY_STATE_ATTRIBUTE_TYPES, schemaManager, SUBENTRY_ACI_AT, SUBSCHEMA_SUBENTRY_AT, SUBTREE_SPECIFICATION_AT, TRIGGER_EXECUTION_SUBENTRIES_AT, UNIQUE_MEMBER_AT
 
Constructor Summary
ExceptionInterceptor()
          Creates an interceptor that is also the exception handling service.
 
Method Summary
 void add(org.apache.directory.server.core.api.interceptor.context.AddOperationContext addContext)
          In the pre-invocation state this interceptor method checks to see if the entry to be added already exists.
 void delete(org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext deleteContext)
          Checks to make sure the entry being deleted exists, and has no children, otherwise throws the appropriate LdapException.
 void destroy()
           
 void init(org.apache.directory.server.core.api.DirectoryService directoryService)
          
 org.apache.directory.server.core.api.filtering.EntryFilteringCursor list(org.apache.directory.server.core.api.interceptor.context.ListOperationContext listContext)
          
 org.apache.directory.shared.ldap.model.entry.Entry lookup(org.apache.directory.server.core.api.interceptor.context.LookupOperationContext lookupContext)
          
 void modify(org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext modifyContext)
          
 void move(org.apache.directory.server.core.api.interceptor.context.MoveOperationContext moveContext)
          
 void moveAndRename(org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext moveAndRenameContext)
          
 void rename(org.apache.directory.server.core.api.interceptor.context.RenameOperationContext renameContext)
          
 
Methods inherited from class org.apache.directory.server.core.api.interceptor.BaseInterceptor
bind, compare, getName, getNextInterceptor, getPrincipal, getRootDse, hasEntry, next, next, next, next, next, next, next, next, next, next, next, next, next, next, search, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionInterceptor

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

Method Detail

init

public void init(org.apache.directory.server.core.api.DirectoryService directoryService)
          throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
init in interface org.apache.directory.server.core.api.interceptor.Interceptor
Overrides:
init in class org.apache.directory.server.core.api.interceptor.BaseInterceptor
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

destroy

public void destroy()
Specified by:
destroy in interface org.apache.directory.server.core.api.interceptor.Interceptor
Overrides:
destroy in class org.apache.directory.server.core.api.interceptor.BaseInterceptor

add

public void add(org.apache.directory.server.core.api.interceptor.context.AddOperationContext addContext)
         throws org.apache.directory.shared.ldap.model.exception.LdapException
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.

Specified by:
add in interface org.apache.directory.server.core.api.interceptor.Interceptor
Overrides:
add in class org.apache.directory.server.core.api.interceptor.BaseInterceptor
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

delete

public void delete(org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext deleteContext)
            throws org.apache.directory.shared.ldap.model.exception.LdapException
Checks to make sure the entry being deleted exists, and has no children, otherwise throws the appropriate LdapException.

Specified by:
delete in interface org.apache.directory.server.core.api.interceptor.Interceptor
Overrides:
delete in class org.apache.directory.server.core.api.interceptor.BaseInterceptor
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

list

public org.apache.directory.server.core.api.filtering.EntryFilteringCursor list(org.apache.directory.server.core.api.interceptor.context.ListOperationContext listContext)
                                                                         throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
list in interface org.apache.directory.server.core.api.interceptor.Interceptor
Overrides:
list in class org.apache.directory.server.core.api.interceptor.BaseInterceptor
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

lookup

public org.apache.directory.shared.ldap.model.entry.Entry lookup(org.apache.directory.server.core.api.interceptor.context.LookupOperationContext lookupContext)
                                                          throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
lookup in interface org.apache.directory.server.core.api.interceptor.Interceptor
Overrides:
lookup in class org.apache.directory.server.core.api.interceptor.BaseInterceptor
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

modify

public void modify(org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext modifyContext)
            throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
modify in interface org.apache.directory.server.core.api.interceptor.Interceptor
Overrides:
modify in class org.apache.directory.server.core.api.interceptor.BaseInterceptor
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

move

public void move(org.apache.directory.server.core.api.interceptor.context.MoveOperationContext moveContext)
          throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
move in interface org.apache.directory.server.core.api.interceptor.Interceptor
Overrides:
move in class org.apache.directory.server.core.api.interceptor.BaseInterceptor
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

moveAndRename

public void moveAndRename(org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext moveAndRenameContext)
                   throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
moveAndRename in interface org.apache.directory.server.core.api.interceptor.Interceptor
Overrides:
moveAndRename in class org.apache.directory.server.core.api.interceptor.BaseInterceptor
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException

rename

public void rename(org.apache.directory.server.core.api.interceptor.context.RenameOperationContext renameContext)
            throws org.apache.directory.shared.ldap.model.exception.LdapException

Specified by:
rename in interface org.apache.directory.server.core.api.interceptor.Interceptor
Overrides:
rename in class org.apache.directory.server.core.api.interceptor.BaseInterceptor
Throws:
org.apache.directory.shared.ldap.model.exception.LdapException


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.