Package org.apache.directory.server.core.api.interceptor

Examples of org.apache.directory.server.core.api.interceptor.Interceptor


            LOG.debug( ">> LookupOperation : {}", lookupContext );
        }

        ensureStarted();

        Interceptor head = directoryService.getInterceptor( lookupContext.getNextInterceptor() );

        Entry entry = null;

        try
        {
            lockRead();

            entry = head.lookup( lookupContext );
        }
        finally
        {
            unlockRead();
        }
View Full Code Here


            // populate the context with the old entry
            eagerlyPopulateFields( modifyContext );

            // Call the Modify method
            Interceptor head = directoryService.getInterceptor( modifyContext.getNextInterceptor() );

            head.modify( modifyContext );
        }
        finally
        {
            unlockWrite();
        }
View Full Code Here

            Entry originalEntry = getOriginalEntry( moveContext );

            moveContext.setOriginalEntry( originalEntry );

            // Call the Move method
            Interceptor head = directoryService.getInterceptor( moveContext.getNextInterceptor() );

            head.move( moveContext );
        }
        finally
        {
            unlockWrite();
        }
View Full Code Here

            moveAndRenameContext.setOriginalEntry( getOriginalEntry( moveAndRenameContext ) );
            moveAndRenameContext.setModifiedEntry( moveAndRenameContext.getOriginalEntry().clone() );

            // Call the MoveAndRename method
            Interceptor head = directoryService.getInterceptor( moveAndRenameContext.getNextInterceptor() );

            head.moveAndRename( moveAndRenameContext );
        }
        finally
        {
            unlockWrite();
        }
View Full Code Here

            Entry originalEntry = getOriginalEntry( renameContext );
            renameContext.setOriginalEntry( originalEntry );
            renameContext.setModifiedEntry( originalEntry.clone() );

            // Call the Rename method
            Interceptor head = directoryService.getInterceptor( renameContext.getNextInterceptor() );

            head.rename( renameContext );
        }
        finally
        {
            unlockWrite();
        }
View Full Code Here

        // Unlock the ReferralManager
        directoryService.getReferralManager().unlock();

        // Call the Search method
        Interceptor head = directoryService.getInterceptor( searchContext.getNextInterceptor() );

        EntryFilteringCursor cursor = null;

        try
        {
            lockRead();

            cursor = head.search( searchContext );
        }
        finally
        {
            unlockRead();
        }
View Full Code Here

        ensureStarted();

        try
        {
            // Call the Unbind method
            Interceptor head = directoryService.getInterceptor( unbindContext.getNextInterceptor() );

            head.unbind( unbindContext );
        }
        finally
        {
        }
View Full Code Here

     * op2 -> [B, C, E]<br/>
     * then assuming that we have stopped at D, then op1.next -> F and op2.next -> E.
     */
    private Interceptor findNextInterceptor( OperationEnum operation, DirectoryService directoryService )
    {
        Interceptor interceptor = null;

        List<Interceptor> allInterceptors = directoryService.getInterceptors();
        List<String> operationInterceptors = directoryService.getInterceptors( operation );
        int position = 0;
        String addInterceptor = operationInterceptors.get( position );
View Full Code Here

    /**
     * Remove an interceptor to the list of interceptors to call for each operation
     */
    private void removeOperationsList( String interceptorName )
    {
        Interceptor interceptor = interceptorNames.get( interceptorName );

        try
        {
            writeLock.lock();

            for ( OperationEnum operation : OperationEnum.getOperations() )
            {
                List<String> operationList = operationInterceptors.get( operation );

                Method[] methods = interceptor.getClass().getDeclaredMethods();

                for ( Method method : methods )
                {
                    if ( method.getName().equals( operation.getMethodName() ) )
                    {
                        operationList.remove( interceptor.getName() );

                        break;
                    }
                }
            }
View Full Code Here

        DirectoryService directoryService = modifyContext.getSession().getDirectoryService();

        // Compute the next interceptor for the Add and Delete operation, starting from
        // the schemaInterceptor. We also need to get the position of this next interceptor
        // in the operation's list.
        Interceptor nextAdd = findNextInterceptor( OperationEnum.ADD, directoryService );
        int positionAdd = findPosition( OperationEnum.ADD, nextAdd, directoryService );
        Interceptor nextDelete = findNextInterceptor( OperationEnum.DELETE, directoryService );
        int positionDelete = findPosition( OperationEnum.DELETE, nextDelete, directoryService );

        for ( Modification mod : modifyContext.getModItems() )
        {
            String opAttrOid = schemaManager.getAttributeTypeRegistry().getOidByName( mod.getAttribute().getId() );
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.api.interceptor.Interceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.