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

Examples of org.apache.directory.server.core.interceptor.context.LookupOperationContext


     * Used to encapsulate [de]marshalling of controls before and after lookup operations.
     */
    protected ServerEntry doLookupOperation( DN target ) throws Exception
    {
        // setup the op context and populate with request controls
        LookupOperationContext opCtx;

        // execute lookup/getRootDSE operation
        opCtx = new LookupOperationContext( session, target );
        opCtx.addRequestControls( JndiUtils.fromJndiControls( requestControls ) );
        OperationManager operationManager = service.getOperationManager();
        ServerEntry serverEntry = operationManager.lookup( opCtx );

        // clear the request controls and set the response controls
        requestControls = EMPTY_CONTROLS;
        responseControls = JndiUtils.toJndiControls( opCtx.getResponseControls() );
        return serverEntry;
    }
View Full Code Here


     * Used to encapsulate [de]marshalling of controls before and after lookup operations.
     */
    protected ServerEntry doLookupOperation( DN target, String[] attrIds ) throws Exception
    {
        // setup the op context and populate with request controls
        LookupOperationContext opCtx;

        // execute lookup/getRootDSE operation
        opCtx = new LookupOperationContext( session, target, attrIds );
        opCtx.addRequestControls( JndiUtils.fromJndiControls( requestControls ) );
        OperationManager operationManager = service.getOperationManager();
        ClonedServerEntry serverEntry = operationManager.lookup( opCtx );

        // clear the request controls and set the response controls
        requestControls = EMPTY_CONTROLS;
        responseControls = JndiUtils.toJndiControls( opCtx.getResponseControls() );

        // Now remove the ObjectClass attribute if it has not been requested
        if ( ( opCtx.getAttrsId() != null ) && ( opCtx.getAttrsId().size() != 0 ) )
        {
            if ( ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ) != null )
                && ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ).size() == 0 ) )
            {
                serverEntry.removeAttributes( SchemaConstants.OBJECT_CLASS_AT );
View Full Code Here

            else if ( isSublevelScope )
            {
                List<EntryFilteringCursor> cursors = new ArrayList<EntryFilteringCursor>();
                for ( Partition p : partitions.values() )
                {
                    ClonedServerEntry entry = p.lookup( new LookupOperationContext( directoryService.getAdminSession(), p.getSuffixDn() ) );
                    if( entry != null )
                    {
                        Partition backend = getPartition( entry.getDn() );
                        opContext.setDn( entry.getDn() );
                        cursors.add( backend.search( opContext ) );
View Full Code Here

    {
        ServerEntry entry = opContext.getEntry();

        if ( entry == null )
        {
            LookupOperationContext lookupCtx = new LookupOperationContext( opContext.getSession(), opContext.getDn() );
            entry = wrapped.lookup( lookupCtx );
        }

        ServerEntry targetEntry = ( ServerEntry ) SchemaUtils.getTargetEntry( opContext.getModItems(), entry );
View Full Code Here

    }


    private ClonedServerEntry lookupPartition( DN dn ) throws Exception
    {
        return partition.lookup( new LookupOperationContext( null, dn ) );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public ClonedServerEntry lookup( DN dn ) throws Exception
    {
        OperationManager operationManager = directoryService.getOperationManager();
        return operationManager.lookup( new LookupOperationContext( this, dn ) );
    }
View Full Code Here

     */
    public ClonedServerEntry lookup( DN dn, String[] attrId ) throws Exception
    {
        OperationManager operationManager = directoryService.getOperationManager();
        return operationManager.lookup(
            new LookupOperationContext( this, dn, attrId ) );
    }
View Full Code Here

       
       
        if ( isReferral )
        {
            // Update the referralManager
            LookupOperationContext lookupContext = new LookupOperationContext( opContext.getSession(), newName );
           
            ServerEntry newEntry = nexus.lookup( lookupContext );
           
            referralManager.lockWrite();
           
View Full Code Here

        next.moveAndRename( opContext );
       
        if ( isReferral )
        {
            // Update the referralManager
            LookupOperationContext lookupContext = new LookupOperationContext( opContext.getSession(), newName );
           
            ServerEntry newEntry = nexus.lookup( lookupContext );
           
            referralManager.lockWrite();
           
View Full Code Here

        next.rename( opContext );
       
        if ( isReferral )
        {
            // Update the referralManager
            LookupOperationContext lookupContext = new LookupOperationContext( opContext.getSession(), opContext.getNewDn() );
           
            ServerEntry newEntry = nexus.lookup( lookupContext );
           
            referralManager.lockWrite();
           
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.interceptor.context.LookupOperationContext

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.