Package org.apache.directory.shared.ldap.extras.controls.syncrepl_impl

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncModifyDnDecorator


                ( byte )0x80, 0x05,                     //     move
                  'o','u','=','d','c'         //     newSuperiorDn LDAPDN
            } );
        bb.flip();

        SyncModifyDnDecorator decorator = new SyncModifyDnDecorator( codec );
        SyncModifyDn syncmodDnControl = (SyncModifyDn)decorator.decode( bb.array() );

        assertEquals( "uid=jim", syncmodDnControl.getEntryDn() );
        assertEquals( "ou=dc", syncmodDnControl.getNewSuperiorDn() );
        assertFalse( syncmodDnControl.isDeleteOldRdn() );
View Full Code Here


                  0x04, 0x05, 'u','i','d','=','j',       //     newRdn
                  0x01, 0x01, ( byte ) 0xFF                       //     deleteOldRdn
            } );
        bb.flip();

        SyncModifyDnDecorator decorator = new SyncModifyDnDecorator( codec );
       
        SyncModifyDn syncmodDnControl = (SyncModifyDn)decorator.decode( bb.array() );

        assertEquals( "uid=jim", syncmodDnControl.getEntryDn() );
        assertEquals( "uid=j", syncmodDnControl.getNewRdn() );
        assertTrue( syncmodDnControl.isDeleteOldRdn() );
View Full Code Here

                  0x04, 0x05, 'u','i','d','=','j',       //     newRdn
                  0x01, 0x01, ( byte ) 0xFF                       //     deleteOldRdn
            } );
        bb.flip();

        SyncModifyDnDecorator decorator = new SyncModifyDnDecorator( codec );
        SyncModifyDn syncmodDnControl = (SyncModifyDn)decorator.decode( bb.array() );

        assertEquals( "uid=jim", syncmodDnControl.getEntryDn() );
        assertEquals( "ou=dc", syncmodDnControl.getNewSuperiorDn() );
        assertEquals( "uid=j", syncmodDnControl.getNewRdn() );
        assertTrue( syncmodDnControl.isDeleteOldRdn() );
View Full Code Here

                0x04, 0x07, 'u','i','d','=','j','i','m', //     entryDn LDAPDN
                0x01, 0x01, ( byte ) 0xFF             //     deleteOldRdn
            } );
        bb.flip();

        SyncModifyDnDecorator decorator = new SyncModifyDnDecorator( codec );
        decorator.decode( bb.array() );
    }
View Full Code Here

            if ( changeType == ChangeType.MODDN )
            {
                type = in.readByte();
                SyncModifyDnType modDnType = SyncModifyDnType.getModifyDnType( type );
                SyncModifyDn modDnControl = new SyncModifyDnDecorator( codec );
               
                modDnControl.setModDnType( modDnType );
               
                switch ( modDnType )
                {
                    case MOVE :
                        modDnControl.setNewSuperiorDn( in.readUTF() );
                        break;

                    case MOVE_AND_RENAME :
                        modDnControl.setNewSuperiorDn( in.readUTF() );
                        // Fallthrough

                    case RENAME :
                        modDnControl.setNewRdn( in.readUTF() );
                        modDnControl.setDeleteOldRdn( in.readBoolean() );
                        break;
                }
               
                // And create a ReplicaEventMessage
                replicaEventMessage = new ReplicaEventMessage( modDnControl, entry );
View Full Code Here

                control = new SyncInfoValueDecorator( getDirectoryService().getLdapCodecService() );

                break;

            case SYNC_MODIFY_DN_CONTROL:
                control = new SyncModifyDnDecorator( getDirectoryService().getLdapCodecService() );

                break;

            case SYNC_REQUEST_VALUE_CONTROL:
                control = new SyncRequestValueDecorator( getDirectoryService().getLdapCodecService() );
View Full Code Here

                sendDeletedEntry( entry );
                return;
            }

            SyncModifyDn modDnControl =
                new SyncModifyDnDecorator( directoryService.getLdapCodecService(), SyncModifyDnType.MOVE );
            modDnControl.setEntryDn( moveContext.getDn().getNormName() );
            modDnControl.setNewSuperiorDn( moveContext.getNewSuperior().getNormName() );

            //System.out.println( "MOVE Listener : log " + moveContext.getDn() + " moved to " + moveContext.getNewSuperior() );
            consumerMsgLog.log( new ReplicaEventMessage( modDnControl, entry ) );
           
            if ( pushInRealTime )
View Full Code Here

            {
                sendDeletedEntry( moveAndRenameContext.getEntry() );
                return;
            }

            SyncModifyDnDecorator modDnControl =
                new SyncModifyDnDecorator( directoryService.getLdapCodecService(), SyncModifyDnType.MOVE_AND_RENAME );
            modDnControl.setEntryDn( moveAndRenameContext.getDn().getNormName() );
            modDnControl.setNewSuperiorDn( moveAndRenameContext.getNewSuperiorDn().getNormName() );
            modDnControl.setNewRdn( moveAndRenameContext.getNewRdn().getNormName() );
            modDnControl.setDeleteOldRdn( moveAndRenameContext.getDeleteOldRdn() );

            // should always send the original entry cause the consumer perform the modDn operation there
            Entry entry = moveAndRenameContext.getOriginalEntry();

            //System.out.println( "MOVE AND RENAME Listener : log " + moveAndRenameContext.getDn() +
View Full Code Here

    {
        Entry entry = renameContext.getOriginalEntry();

        try
        {
            SyncModifyDnDecorator modDnControl = new SyncModifyDnDecorator( directoryService.getLdapCodecService() );
            modDnControl.setModDnType( SyncModifyDnType.RENAME );
            modDnControl.setEntryDn( renameContext.getDn().getName() );
            modDnControl.setNewRdn( renameContext.getNewRdn().getName() );
            modDnControl.setDeleteOldRdn( renameContext.getDeleteOldRdn() );

            // should always send the original entry cause the consumer perform the modDn operation there
            //System.out.println( "RENAME Listener : log " + renameContext.getDn() + " renamed to " + renameContext.getNewRdn() );
            consumerMsgLog.log( new ReplicaEventMessage( modDnControl, entry ) );
           
View Full Code Here

        byte b = in.readByte();
        if( b == 0 ) // handle the SyncModDnControl
        {
            SyncModifyDnType modDnType = SyncModifyDnType.getModifyDnType( in.readShort() );
           
            modDnControl = new SyncModifyDnDecorator( codec );
            modDnControl.setModDnType( modDnType );
           
            modDnControl.setEntryDn( in.readUTF() );
           
            switch( modDnType )
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncModifyDnDecorator

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.