Examples of deleteValue()


Examples of org.apache.directory.studio.ldapbrowser.core.model.IAttribute.deleteValue()

                        IAttribute oldAttribute = oldValue.getAttribute();
                        IEntry entry = oldAttribute.getEntry();
                        IValue newValue = null;

                        // delete old value
                        oldAttribute.deleteValue( oldValue );
                        if ( oldAttribute.getValueSize() == 0 )
                        {
                            entry.deleteAttribute( oldAttribute );
                        }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.IAttribute.deleteValue()

            for ( IValue value : values )
            {
                IAttribute attribute = value.getAttribute();
                IEntry entry = attribute.getEntry();

                attribute.deleteValue( value );
                if ( event == null )
                {
                    event = new ValueDeletedEvent( entry.getBrowserConnection(), entry, attribute, value );
                }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.IAttribute.deleteValue()

                        IValue[] values = rdnAttribute.getValues();
                        for ( int ii = 0; ii < values.length; ii++ )
                        {
                            if ( part.getUnencodedValue().equals( values[ii].getRawValue() ) )
                            {
                                rdnAttribute.deleteValue( values[ii] );
                            }
                            if ( rdnAttribute.getValueSize() == 0 )
                            {
                                newEntry.deleteAttribute( rdnAttribute );
                            }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.IAttribute.deleteValue()

                newEntry.addAttribute( ocAttribute );
            }
            IValue[] values = ocAttribute.getValues();
            for ( IValue value : values )
            {
                ocAttribute.deleteValue( value );
            }
            for ( ObjectClassDescription ocd : selectedObjectClasses )
            {
                ocAttribute.addValue( new Value( ocAttribute, ocd.getNames().get( 0 ) ) );
            }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.IAttribute.deleteValue()

                        IValue[] values = attribute.getValues();
                        for ( int v = 0; v < values.length; v++ )
                        {
                            if ( values[v].getStringValue().equals( atav.getUpValue() ) )
                            {
                                attribute.deleteValue( values[v] );
                            }
                        }

                        // If we have removed all the values of the attribute,
                        // then we also need to remove this attribute from the
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.IAttribute.deleteValue()

                        IValue[] values = attribute.getValues();
                        for ( int v = 0; v < values.length; v++ )
                        {
                            if ( values[v].isEmpty() )
                            {
                                attribute.deleteValue( values[v] );
                            }
                        }
                        if ( attribute.getValueSize() == 0 )
                        {
                            newEntry.deleteAttribute( attribute );
View Full Code Here

Examples of org.apache.directory.studio.test.integration.ui.bots.EntryEditorBot.deleteValue()

            .getModificationLogsText() );
        assertContains( "add: description\ndescription: This is the 3rd description.", modificationLogsViewBot
            .getModificationLogsText() );

        // delete second value
        entryEditorBot.deleteValue( "description", "This is the 3rd description." );
        assertEquals( 9, entryEditorBot.getAttributeValues().size() );
        assertTrue( entryEditorBot.getAttributeValues().contains( "description: This is the 1st description." ) );
        assertFalse( entryEditorBot.getAttributeValues().contains( "description: This is the 3rd description." ) );
        assertContains( "delete: description\ndescription: This is the 3rd description.", modificationLogsViewBot
            .getModificationLogsText() );
View Full Code Here

Examples of org.apache.directory.studio.test.integration.ui.bots.EntryEditorBot.deleteValue()

        assertTrue( entryEditorBot.getAttributeValues().contains( "description: This is the final description." ) );
        assertContains( "replace: description\ndescription: This is the final description.", modificationLogsViewBot
            .getModificationLogsText() );

        // delete 1st value/attribute
        entryEditorBot.deleteValue( "description", "This is the final description." );
        assertEquals( 8, entryEditorBot.getAttributeValues().size() );
        assertFalse( entryEditorBot.getAttributeValues().contains( "description: This is the final description." ) );
        assertContains( "delete: description\n-", modificationLogsViewBot.getModificationLogsText() );

        assertEquals( "Expected 6 modifications.", 6, StringUtils.countMatches( modificationLogsViewBot
View Full Code Here

Examples of org.apache.directory.studio.test.integration.ui.bots.EntryEditorBot.deleteValue()

            modificationLogsViewBot.getModificationLogsText() );
        assertContains( "add: description\ndescription: This is the 3rd description.",
            modificationLogsViewBot.getModificationLogsText() );

        // delete second value
        entryEditorBot.deleteValue( "description", "This is the 3rd description." );
        assertEquals( 9, entryEditorBot.getAttributeValues().size() );
        assertTrue( entryEditorBot.getAttributeValues().contains( "description: This is the 1st description." ) );
        assertFalse( entryEditorBot.getAttributeValues().contains( "description: This is the 3rd description." ) );
        assertContains( "delete: description\ndescription: This is the 3rd description.",
            modificationLogsViewBot.getModificationLogsText() );
View Full Code Here

Examples of org.apache.directory.studio.test.integration.ui.bots.EntryEditorBot.deleteValue()

        assertTrue( entryEditorBot.getAttributeValues().contains( "description: This is the final description." ) );
        assertContains( "replace: description\ndescription: This is the final description.",
            modificationLogsViewBot.getModificationLogsText() );

        // delete 1st value/attribute
        entryEditorBot.deleteValue( "description", "This is the final description." );
        assertEquals( 8, entryEditorBot.getAttributeValues().size() );
        assertFalse( entryEditorBot.getAttributeValues().contains( "description: This is the final description." ) );
        assertContains( "delete: description\n-", modificationLogsViewBot.getModificationLogsText() );

        assertEquals( "Expected 6 modifications.", 6,
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.