Iterator it = afterTriggerSpecs.iterator();  while( it.hasNext() ) { TriggerSpecification tsec = ( TriggerSpecification ) it.next();  List arguments = new ArrayList(); arguments.add( ctx ); arguments.addAll( injector.getArgumentsToInject( tsec.getStoredProcedureParameters() ) );  List typeList = new ArrayList(); typeList.add( ctx.getClass() ); typeList.addAll( getTypesFromValues( arguments ) );  Class[] types = ( Class[] ) ( getTypesFromValues( arguments ).toArray( EMPTY_CLASS_ARRAY ) ); Object[] values = arguments.toArray();  executeProcedure( ctx, tsec.getStoredProcedureName(), types, values ); }
    public void delete( NextInterceptor next, LdapDN name ) throws NamingException    {        // Access the principal requesting the operation        Invocation invocation = InvocationStack.getInstance().peek();        DirectoryPartitionNexusProxy proxy = invocation.getProxy();        Attributes entry = proxy.lookup( name, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );        LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();        LdapDN userName = new LdapDN( principal.getName() );        userName.normalize();        // Bypass trigger code if we are disabled        if ( !enabled )        {            next.delete( name );            return;        }        List triggerSpecs = new ArrayList();        addPrescriptiveTriggerSpecs( triggerSpecs, proxy, name, entry );        addEntryTriggerSpecs( triggerSpecs, entry );        Map triggerMap = getActionTimeMappedTriggerSpecsForOperation( triggerSpecs, LdapOperation.DELETE );        // Map spMap = getActionTimeMappedStoredProcedures( triggerMap );                        List beforeTriggerSpecs = (List) triggerMap.get( ActionTime.BEFORE );        log.debug( "There are " + beforeTriggerSpecs.size() + " \"BEFORE delete\" triggers associated with this entry [" + name + "] being deleted:" );        log.debug( ">>> " + beforeTriggerSpecs );                List insteadofTriggerSpecs = (List) triggerMap.get( ActionTime.INSTEADOF );        log.debug( "There are " + insteadofTriggerSpecs.size() + " \"INSTEADOF delete\" triggers associated with this entry [" + name + "] being deleted:" );        log.debug( ">>> " + insteadofTriggerSpecs );                if ( insteadofTriggerSpecs.size() == 0 )        {            next.delete( name );            // we call subentryDeleted when there is really no INSTEADOF triggers for this method            triggerSpecCache.subentryDeleted( name, entry );        }        else        {            log.debug("Delete operation has not been performed due to the INSTEADOF trigger(s).");        }                List afterTriggerSpecs = (List) triggerMap.get( ActionTime.AFTER );        log.debug( "There are " + afterTriggerSpecs.size() + " \"AFTER delete\" triggers associated with this entry [" + name + "] being deleted:" );        log.debug( ">>> " + afterTriggerSpecs );    }