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

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


     */
    protected void doMoveAndRenameOperation( DN oldDn, DN parent, RDN newRdn, boolean delOldDn )
        throws Exception
    {
        // setup the op context and populate with request controls
        MoveAndRenameOperationContext opCtx = new MoveAndRenameOperationContext( session, oldDn, parent, new RDN(
            newRdn ), delOldDn );
        opCtx.addRequestControls( JndiUtils.fromJndiControls( requestControls ) );

        // Inject the referral handling into the operation context
        injectReferralControl( opCtx );
       
        // execute moveAndRename operation
        OperationManager operationManager = service.getOperationManager();
        operationManager.moveAndRename( 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 moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws Exception
    {
        MoveAndRenameOperationContext opContext =
            new MoveAndRenameOperationContext( this, dn, newParent, newRdn, deleteOldRdn );
       
        opContext.setLogChange( log );

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

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

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

    /**
     * {@inheritDoc}
     */
    public void moveAndRename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception
    {
        MoveAndRenameOperationContext opContext = new MoveAndRenameOperationContext( this, modifyDnRequest );

        opContext.setLogChange( log );

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

        DN childDn2 = new DN( "dc=child2,ou=test,ou=system" );
        childDn2.normalize( schemaManager.getNormalizerMapping() );

        RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "movedChild1" );
        MoveAndRenameOperationContext moveAndRenameOpCtx = new MoveAndRenameOperationContext( session, childDn1, childDn2, newRdn, true );
        partition.moveAndRename( moveAndRenameOpCtx );
       
        assertFalse( new File( wkdir, "ou=test,ou=system/dc=child1" ).exists() );
        assertFalse( new File( wkdir, "ou=test,ou=system/dc=child1.ldif" ).exists() );
View Full Code Here

        DN childDn2 = new DN( "dc=child2,ou=test,ou=system" );
        childDn2.normalize( schemaManager.getNormalizerMapping() );

        RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "movedChild1" );
        MoveAndRenameOperationContext moveAndRenameOpCtx = new MoveAndRenameOperationContext( session, childDn1, childDn2, newRdn, false );
        partition.moveAndRename( moveAndRenameOpCtx );
       
        assertTrue( new File( wkdir, "ou=test,ou=system/dc=child1" ).exists() );
        assertTrue( new File( wkdir, "ou=test,ou=system/dc=child1.ldif" ).exists() );
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws Exception
    {
        MoveAndRenameOperationContext opContext =
            new MoveAndRenameOperationContext( this, dn, newParent, newRdn, deleteOldRdn );
       
        opContext.setLogChange( log );

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

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

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

    /**
     * {@inheritDoc}
     */
    public void moveAndRename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception
    {
        MoveAndRenameOperationContext opContext = new MoveAndRenameOperationContext( this, modifyDnRequest );

        opContext.setLogChange( log );

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

     * {@inheritDoc}
     */
    public void moveAndRename( Dn dn, Dn newParent, Rdn newRdn, boolean deleteOldRdn, LogChange log )
        throws LdapException
    {
        MoveAndRenameOperationContext moveAndRenameContext = new MoveAndRenameOperationContext( this, dn, newParent,
            newRdn, deleteOldRdn );

        moveAndRenameContext.setLogChange( log );

        OperationManager operationManager = directoryService.getOperationManager();
        operationManager.moveAndRename( moveAndRenameContext );
    }
View Full Code Here

TOP

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

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.