Examples of LdifChangeModDnRecord


Examples of org.apache.directory.studio.ldifparser.model.container.LdifChangeModDnRecord

                                }
                                if ( parentEntry != null )
                                {
                                    parentEntry.setChildrenInitialized( false );
                                }
                                LdifChangeModDnRecord modDnRecord = ( LdifChangeModDnRecord ) record;
                                if ( modDnRecord.getNewsuperiorLine() != null )
                                {
                                    Dn newSuperiorDn = new Dn( modDnRecord.getNewsuperiorLine()
                                        .getValueAsString() );
                                    IEntry newSuperiorEntry = browserConnection.getEntryFromCache( newSuperiorDn );
                                    if ( newSuperiorEntry != null )
                                    {
                                        newSuperiorEntry.setChildrenInitialized( false );
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifChangeModDnRecord

            browserConnection.getConnection().getConnectionWrapper()
                .modifyEntry( dn, mis, getControls( modifyRecord ), monitor, null );
        }
        else if ( record instanceof LdifChangeModDnRecord )
        {
            LdifChangeModDnRecord modDnRecord = ( LdifChangeModDnRecord ) record;
            if ( modDnRecord.getNewrdnLine() != null && modDnRecord.getDeloldrdnLine() != null )
            {
                String newRdn = modDnRecord.getNewrdnLine().getValueAsString();
                boolean deleteOldRdn = modDnRecord.getDeloldrdnLine().isDeleteOldRdn();

                Dn newDn;
                if ( modDnRecord.getNewsuperiorLine() != null )
                {
                    newDn = new Dn( newRdn, modDnRecord.getNewsuperiorLine().getValueAsString() );
                }
                else
                {
                    Dn dnObject = new Dn( dn );
                    Dn parent = dnObject.getParent();
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifChangeModDnRecord

        {
            LdapDN dn = new LdapDN( newDn );
            Rdn newrdn = dn.getRdn();
            LdapDN newsuperior = DnUtils.getParent( dn );

            LdifChangeModDnRecord record = new LdifChangeModDnRecord( LdifDnLine.create( oldDn ) );
            addControlLines( record, controls );
            record.setChangeType( LdifChangeTypeLine.createModDn() );
            record.setNewrdn( LdifNewrdnLine.create( newrdn.getUpName() ) );
            record.setDeloldrdn( deleteOldRdn ? LdifDeloldrdnLine.create1() : LdifDeloldrdnLine.create0() );
            record.setNewsuperior( LdifNewsuperiorLine.create( newsuperior.getUpName() ) );
            record.finish( LdifSepLine.create() );

            String formattedString = record.toFormattedString( LdifFormatParameters.DEFAULT );
            log( formattedString, ex, connection );
        }
        catch ( InvalidNameException e )
        {
        }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifChangeModDnRecord

        }

        // changetype: modify
        if ( container instanceof LdifChangeModDnRecord )
        {
            LdifChangeModDnRecord record = ( LdifChangeModDnRecord ) container;
            if ( ( record.getNewrdnLine() == null || !record.getNewrdnLine().isValid() )
                && MD_NEWRDN.startsWith( prefix ) )
            {
                proposalList.add( new CompletionProposal( MD_NEWRDN, offset - prefix.length(), prefix.length(),
                    MD_NEWRDN.length(), null, null, null, null ) );
            }
            if ( ( record.getDeloldrdnLine() == null || !record.getDeloldrdnLine().isValid() )
                && MD_DELETEOLDRDN_TRUE.startsWith( prefix ) )
            {
                proposalList.add( new CompletionProposal( MD_DELETEOLDRDN_TRUE, offset - prefix.length(), prefix
                    .length(), MD_DELETEOLDRDN_TRUE.length(), null, null, null, null ) );
            }
            if ( ( record.getNewsuperiorLine() == null || !record.getNewsuperiorLine().isValid() )
                && MD_NEWSUPERIOR.startsWith( prefix ) )
            {
                proposalList.add( new CompletionProposal( MD_NEWSUPERIOR, offset - prefix.length(), prefix.length(),
                    MD_NEWSUPERIOR.length(), null, null, null, null ) );
            }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifChangeModDnRecord

                                }
                                if ( parentEntry != null )
                                {
                                    parentEntry.setChildrenInitialized( false );
                                }
                                LdifChangeModDnRecord modDnRecord = ( LdifChangeModDnRecord ) record;
                                if ( modDnRecord.getNewsuperiorLine() != null )
                                {
                                    LdapDN newSuperiorDn = new LdapDN( modDnRecord.getNewsuperiorLine()
                                        .getValueAsString() );
                                    IEntry newSuperiorEntry = browserConnection.getEntryFromCache( newSuperiorDn );
                                    if ( newSuperiorEntry != null )
                                    {
                                        newSuperiorEntry.setChildrenInitialized( false );
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifChangeModDnRecord

            browserConnection.getConnection().getJNDIConnectionWrapper().modifyEntry( dn, mis,
                ReferralHandlingMethod.IGNORE, getControls( modifyRecord ), monitor, null );
        }
        else if ( record instanceof LdifChangeModDnRecord )
        {
            LdifChangeModDnRecord modDnRecord = ( LdifChangeModDnRecord ) record;
            if ( modDnRecord.getNewrdnLine() != null && modDnRecord.getDeloldrdnLine() != null )
            {
                String newRdn = modDnRecord.getNewrdnLine().getValueAsString();
                boolean deleteOldRdn = modDnRecord.getDeloldrdnLine().isDeleteOldRdn();

                try
                {
                    LdapDN newDn;
                    if ( modDnRecord.getNewsuperiorLine() != null )
                        newDn = DnUtils.composeDn( newRdn, modDnRecord.getNewsuperiorLine().getValueAsString() );
                    else
                    {
                        LdapDN dnObject = new LdapDN( dn );
                        LdapDN parent = DnUtils.getParent( dnObject );
                        newDn = DnUtils.composeDn( newRdn, parent.getUpName() );
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifChangeModDnRecord

                    }
                    parseChangeModifyRecord( ( LdifChangeModifyRecord ) record );
                }
                else if ( changeTypeLine.isModDn() )
                {
                    record = new LdifChangeModDnRecord( dnLine );
                    append( record, partList );
                    record.setChangeType( changeTypeLine );
                    if ( !changeTypeLine.isValid() )
                    {
                        this.cleanupLine( record );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.