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

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


     * Used to encapsulate [de]marshalling of controls before and after rename operations.
     */
    protected void doRename( DN oldDn, RDN newRdn, boolean delOldRdn ) throws Exception
    {
        // setup the op context and populate with request controls
        RenameOperationContext opCtx = new RenameOperationContext( session, oldDn, newRdn, delOldRdn );
        opCtx.addRequestControls( JndiUtils.fromJndiControls( requestControls ) );

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

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


        DN childDn1 = new DN( "dc=child1,ou=test,ou=system" );
        childDn1.normalize( schemaManager.getNormalizerMapping() );
       
        RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "renamedChild1" );
        RenameOperationContext renameOpCtx = new RenameOperationContext( session, childDn1, newRdn, true );
        partition.rename( renameOpCtx );
       
        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 childDn1 = new DN( "dc=child1,ou=test,ou=system" );
        childDn1.normalize( schemaManager.getNormalizerMapping() );
       
        RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "renamedChild1" );
        RenameOperationContext renameOpCtx = new RenameOperationContext( session, childDn1, newRdn, false );
        partition.rename( renameOpCtx );
       
        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 rename( DN dn, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws Exception
    {
        RenameOperationContext opContext = new RenameOperationContext( this, dn, newRdn, deleteOldRdn );
       
        opContext.setLogChange( log );

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

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

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

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

        opContext.setLogChange( log );

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

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

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

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

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

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

        opContext.setLogChange( log );

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

    /**
     * {@inheritDoc}
     */
    public void rename( Dn dn, Rdn newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException
    {
        RenameOperationContext renameContext = new RenameOperationContext( this, dn, newRdn, deleteOldRdn );

        renameContext.setLogChange( log );

        OperationManager operationManager = directoryService.getOperationManager();
        operationManager.rename( renameContext );
    }
View Full Code Here

TOP

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

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.