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

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


     * Used to encapsulate [de]marshalling of controls before and after moveAndRename operations.
     */
    protected void doMove( DN oldDn, DN target ) throws Exception
    {
        // setup the op context and populate with request controls
        MoveOperationContext opCtx = new MoveOperationContext( session, oldDn, target );
        opCtx.addRequestControls( JndiUtils.fromJndiControls( requestControls ) );

        // Inject the referral handling into the operation context
        injectReferralControl( opCtx );
       
        // execute move operation
        OperationManager operationManager = service.getOperationManager();
        operationManager.move( opCtx );

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


    /**
     * {@inheritDoc}
     */
    public void move( DN dn, DN newParent, LogChange log ) throws Exception
    {
        MoveOperationContext opContext = new MoveOperationContext( this, dn, newParent );
       
        opContext.setLogChange( log );

        OperationManager operationManager = directoryService.getOperationManager();
        operationManager.move( opContext );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public void move( DN dn, DN newParent, boolean ignoreReferral, LogChange log ) throws Exception
    {
        OperationManager operationManager = directoryService.getOperationManager();
        MoveOperationContext opContext = new MoveOperationContext( this, dn, newParent );
       
        setReferralHandling( opContext, ignoreReferral );
        opContext.setLogChange( log );

        operationManager.move( opContext );
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void move( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception
    {
        MoveOperationContext opContext = new MoveOperationContext( this, modifyDnRequest );
       
        opContext.setLogChange( log );

        OperationManager operationManager = directoryService.getOperationManager();
        operationManager.move( opContext );
        modifyDnRequest.getResultResponse().addAll( opContext.getResponseControls() );
    }
View Full Code Here

        CoreSession session = injectEntries();

        ClonedServerEntry childEntry1 = partition.lookup( partition.getEntryId( new DN( "dc=child1,ou=test,ou=system" ).normalize( schemaManager.getNormalizerMapping() ).getNormName() ) );
        ClonedServerEntry childEntry2 = partition.lookup( partition.getEntryId( new DN( "dc=child2,ou=test,ou=system" ).normalize( schemaManager.getNormalizerMapping() ).getNormName() ) );
       
        MoveOperationContext moveOpCtx = new MoveOperationContext( session, childEntry1.getDn(), childEntry2.getDn() );
        partition.move( moveOpCtx );

        assertFalse( new File( wkdir, "ou=test,ou=system/dc=child1" ).exists() );
        assertFalse( new File( wkdir, "ou=test,ou=system/dc=child1.ldif" ).exists() );
        assertTrue( new File( wkdir, "ou=test,ou=system/dc=child2" ).exists() );
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void move( DN dn, DN newParent, LogChange log ) throws Exception
    {
        MoveOperationContext opContext = new MoveOperationContext( this, dn, newParent );
       
        opContext.setLogChange( log );

        OperationManager operationManager = directoryService.getOperationManager();
        operationManager.move( opContext );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public void move( DN dn, DN newParent, boolean ignoreReferral, LogChange log ) throws Exception
    {
        OperationManager operationManager = directoryService.getOperationManager();
        MoveOperationContext opContext = new MoveOperationContext( this, dn, newParent );
       
        setReferralHandling( opContext, ignoreReferral );
        opContext.setLogChange( log );

        operationManager.move( opContext );
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void move( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception
    {
        MoveOperationContext opContext = new MoveOperationContext( this, modifyDnRequest );
       
        opContext.setLogChange( log );

        OperationManager operationManager = directoryService.getOperationManager();
        operationManager.move( opContext );
        modifyDnRequest.getResultResponse().addAll( opContext.getResponseControls() );
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void move( Dn dn, Dn newParent, LogChange log ) throws LdapException
    {
        MoveOperationContext moveContext = new MoveOperationContext( this, dn, newParent );

        moveContext.setLogChange( log );

        OperationManager operationManager = directoryService.getOperationManager();
        operationManager.move( moveContext );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public void move( Dn dn, Dn newParent, boolean ignoreReferral, LogChange log ) throws LdapException
    {
        OperationManager operationManager = directoryService.getOperationManager();
        MoveOperationContext moveContext = new MoveOperationContext( this, dn, newParent );

        setReferralHandling( moveContext, ignoreReferral );
        moveContext.setLogChange( log );

        operationManager.move( moveContext );
    }
View Full Code Here

TOP

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

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.