Examples of LdifChangeModifyRecord


Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifChangeModifyRecord

                LdifChangeAddRecord record = ( LdifChangeAddRecord ) element;
                return getUniqueAttrValLineArray( record.getAttrVals() );
            }
            else if ( element instanceof LdifChangeModifyRecord )
            {
                LdifChangeModifyRecord record = ( LdifChangeModifyRecord ) element;
                return record.getModSpecs();
            }
            else if ( element instanceof LdifChangeModDnRecord )
            {
                return new Object[0];
            }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifChangeModifyRecord

                LdifChangeAddRecord record = ( LdifChangeAddRecord ) element;
                return getUniqueAttrValLineArray( record.getAttrVals() );
            }
            else if ( element instanceof LdifChangeModifyRecord )
            {
                LdifChangeModifyRecord record = ( LdifChangeModifyRecord ) element;
                return record.getModSpecs();
            }
            else if ( element instanceof LdifChangeModDnRecord )
            {
                return new Object[0];
            }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifChangeModifyRecord

                throw createConnectionException( null, ne );
            }
        }
        else if ( record instanceof LdifChangeModifyRecord )
        {
            LdifChangeModifyRecord modifyRecord = ( LdifChangeModifyRecord ) record;
            LdifModSpec[] modSpecs = modifyRecord.getModSpecs();
            ModificationItem[] mis = new ModificationItem[modSpecs.length];
            for ( int ii = 0; ii < modSpecs.length; ii++ )
            {
                LdifModSpecTypeLine modSpecType = modSpecs[ii].getModSpecType();
                LdifAttrValLine[] attrVals = modSpecs[ii].getAttrVals();
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifChangeModifyRecord

                    }
                    parseChangeDeleteRecord( record );
                }
                else if ( changeTypeLine.isModify() )
                {
                    record = new LdifChangeModifyRecord( dnLine );
                    append( record, partList );
                    record.setChangeType( changeTypeLine );
                    if ( !changeTypeLine.isValid() )
                    {
                        this.cleanupLine( record );
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifChangeModifyRecord

    void create( IValue[] valuesToCreate, ExtendedProgressMonitor monitor )
    {
        for ( int i = 0; !monitor.isCanceled() && i < valuesToCreate.length; i++ )
        {

            LdifChangeModifyRecord cmr = new LdifChangeModifyRecord( LdifDnLine.create( valuesToCreate[i]
                .getAttribute().getEntry().getDn().toString() ) );
            ModelConverter.addControls( cmr, valuesToCreate[i].getAttribute().getEntry() );
            cmr.setChangeType( LdifChangeTypeLine.createModify() );

            LdifModSpec modSpec = LdifModSpec.createAdd( valuesToCreate[i].getAttribute().getDescription() );
            if ( valuesToCreate[i].isString() )
            {
                modSpec.addAttrVal( LdifAttrValLine.create( valuesToCreate[i].getAttribute().getDescription(),
                    valuesToCreate[i].getStringValue() ) );
            }
            else
            {
                modSpec.addAttrVal( LdifAttrValLine.create( valuesToCreate[i].getAttribute().getDescription(),
                    valuesToCreate[i].getBinaryValue() ) );
            }
            modSpec.finish( LdifModSpecSepLine.create() );
            cmr.addModSpec( modSpec );
            cmr.finish( LdifSepLine.create() );

            try
            {
                this.applyModificationAndLog( cmr, monitor );
            }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifChangeModifyRecord

    void modify( IValue oldValue, IValue newValue, ExtendedProgressMonitor monitor )
    {
        try
        {
            LdifChangeModifyRecord cmr = new LdifChangeModifyRecord( LdifDnLine.create( oldValue.getAttribute()
                .getEntry().getDn().toString() ) );
            ModelConverter.addControls( cmr, oldValue.getAttribute().getEntry() );
            cmr.setChangeType( LdifChangeTypeLine.createModify() );

            if ( oldValue.getAttribute().getValueSize() == 1 )
            {
                LdifModSpec modSpec = LdifModSpec.createReplace( oldValue.getAttribute().getDescription() );
                if ( newValue.isString() )
                {
                    modSpec.addAttrVal( LdifAttrValLine.create( oldValue.getAttribute().getDescription(), newValue
                        .getStringValue() ) );
                }
                else
                {
                    modSpec.addAttrVal( LdifAttrValLine.create( oldValue.getAttribute().getDescription(), newValue
                        .getBinaryValue() ) );
                }
                modSpec.finish( LdifModSpecSepLine.create() );
                cmr.addModSpec( modSpec );
                cmr.finish( LdifSepLine.create() );
            }
            else
            {
                LdifModSpec modSpec1 = LdifModSpec.createAdd( oldValue.getAttribute().getDescription() );
                if ( newValue.isString() )
                {
                    modSpec1.addAttrVal( LdifAttrValLine.create( oldValue.getAttribute().getDescription(), newValue
                        .getStringValue() ) );
                }
                else
                {
                    modSpec1.addAttrVal( LdifAttrValLine.create( oldValue.getAttribute().getDescription(), newValue
                        .getBinaryValue() ) );
                }
                modSpec1.finish( LdifModSpecSepLine.create() );
                cmr.addModSpec( modSpec1 );

                LdifModSpec modSpec2 = LdifModSpec.createDelete( oldValue.getAttribute().getDescription() );
                if ( oldValue.isString() )
                {
                    modSpec2.addAttrVal( LdifAttrValLine.create( oldValue.getAttribute().getDescription(), oldValue
                        .getStringValue() ) );
                }
                else
                {
                    modSpec2.addAttrVal( LdifAttrValLine.create( oldValue.getAttribute().getDescription(), oldValue
                        .getBinaryValue() ) );
                }
                modSpec2.finish( LdifModSpecSepLine.create() );
                cmr.addModSpec( modSpec2 );
                cmr.finish( LdifSepLine.create() );
            }

            this.applyModificationAndLog( cmr, monitor );

        }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifChangeModifyRecord

    {
        try
        {
            for ( int i = 0; !monitor.isCanceled() && i < valuesToDelete.length; i++ )
            {
                LdifChangeModifyRecord cmr = new LdifChangeModifyRecord( LdifDnLine.create( valuesToDelete[i]
                    .getAttribute().getEntry().getDn().toString() ) );
                ModelConverter.addControls( cmr, valuesToDelete[i].getAttribute().getEntry() );
                cmr.setChangeType( LdifChangeTypeLine.createModify() );

                LdifModSpec modSpec = LdifModSpec.createDelete( valuesToDelete[i].getAttribute().getDescription() );
                if ( valuesToDelete[i].isString() )
                {
                    modSpec.addAttrVal( LdifAttrValLine.create( valuesToDelete[i].getAttribute().getDescription(),
                        valuesToDelete[i].getStringValue() ) );
                }
                else
                {
                    modSpec.addAttrVal( LdifAttrValLine.create( valuesToDelete[i].getAttribute().getDescription(),
                        valuesToDelete[i].getBinaryValue() ) );
                }
                modSpec.finish( LdifModSpecSepLine.create() );
                cmr.addModSpec( modSpec );
                cmr.finish( LdifSepLine.create() );

                this.applyModificationAndLog( cmr, monitor );
            }
        }
        catch ( ConnectionException e )
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifChangeModifyRecord

    {
        try
        {
            for ( int i = 0; !monitor.isCanceled() && i < attriubtesToDelete.length; i++ )
            {
                LdifChangeModifyRecord cmr = new LdifChangeModifyRecord( LdifDnLine.create( attriubtesToDelete[i]
                    .getEntry().getDn().toString() ) );
                ModelConverter.addControls( cmr, attriubtesToDelete[i].getEntry() );
                cmr.setChangeType( LdifChangeTypeLine.createModify() );

                LdifModSpec modSpec = LdifModSpec.createDelete( attriubtesToDelete[i].getDescription() );
                modSpec.finish( LdifModSpecSepLine.create() );
                cmr.addModSpec( modSpec );
                cmr.finish( LdifSepLine.create() );

                this.applyModificationAndLog( cmr, monitor );
            }
        }
        catch ( ConnectionException e )
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifChangeModifyRecord

                LdifChangeAddRecord record = ( LdifChangeAddRecord ) element;
                return getUniqueAttrValLineArray( record.getAttrVals() );
            }
            else if ( element instanceof LdifChangeModifyRecord )
            {
                LdifChangeModifyRecord record = ( LdifChangeModifyRecord ) element;
                return record.getModSpecs();
            }
            else if ( element instanceof LdifChangeModDnRecord )
            {
                return new Object[0];
            }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifChangeModifyRecord

    void create( IValue[] valuesToCreate, ExtendedProgressMonitor monitor )
    {
        for ( int i = 0; !monitor.isCanceled() && i < valuesToCreate.length; i++ )
        {

            LdifChangeModifyRecord cmr = new LdifChangeModifyRecord( LdifDnLine.create( valuesToCreate[i]
                .getAttribute().getEntry().getDn().toString() ) );
            ModelConverter.addControls( cmr, valuesToCreate[i].getAttribute().getEntry() );
            cmr.setChangeType( LdifChangeTypeLine.createModify() );

            LdifModSpec modSpec = LdifModSpec.createAdd( valuesToCreate[i].getAttribute().getDescription() );
            if ( valuesToCreate[i].isString() )
            {
                modSpec.addAttrVal( LdifAttrValLine.create( valuesToCreate[i].getAttribute().getDescription(),
                    valuesToCreate[i].getStringValue() ) );
            }
            else
            {
                modSpec.addAttrVal( LdifAttrValLine.create( valuesToCreate[i].getAttribute().getDescription(),
                    valuesToCreate[i].getBinaryValue() ) );
            }
            modSpec.finish( LdifModSpecSepLine.create() );
            cmr.addModSpec( modSpec );
            cmr.finish( LdifSepLine.create() );

            try
            {
                this.applyModificationAndLog( cmr, monitor );
            }
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.