Package org.apache.directory.studio.ldapbrowser.core.model.impl

Examples of org.apache.directory.studio.ldapbrowser.core.model.impl.Value


                if ( attribute == null )
                {
                    attribute = new Attribute( entry, attributeName );
                    entry.addAttribute( attribute );
                }
                attribute.addValue( new Value( attribute, value ) );
            }
            else if ( !( parts[i] instanceof LdifDnLine ) && !( parts[i] instanceof LdifSepLine ) )
            {
                String name = parts[i].toRawString();
                name = name.replaceAll( "\n", "" );
                name = name.replaceAll( "\r", "" );
                IAttribute attribute = new Attribute( entry, name );
                attribute.addValue( new Value( attribute, parts[i] ) );
                entry.addAttribute( attribute );
            }
        }

        EventRegistry.resumeEventFiringInCurrentThread();
View Full Code Here


    public static IValue ldifAttrValLineToValue( LdifAttrValLine line, IEntry entry )
    {
        try
        {
            IAttribute attribute = new Attribute( entry, line.getUnfoldedAttributeDescription() );
            IValue value = new Value( attribute, line.getValueAsObject() );
            return value;
        }
        catch ( Exception e )
        {
            return null;
View Full Code Here

     * @param newValue the new value
     */
    public CreateValuesJob( IAttribute attribute, Object newValue )
    {
        this( attribute.getEntry(), new IValue[]
            { new Value( attribute, newValue ) } );
    }
View Full Code Here

            if ( attribute == null )
            {
                attribute = new Attribute( entry, valuesToCreate[i].getAttribute().getDescription() );
            }

            newValues[i] = new Value( attribute, valuesToCreate[i].getRawValue() );
        }

        createValues( entry.getBrowserConnection(), entry, newValues, monitor );
        if ( !monitor.errorsReported() )
        {
View Full Code Here

                    NamingEnumeration<?> valueEnumeration = attribute.getAll();
                    while ( valueEnumeration.hasMore() )
                    {
                        Object value = valueEnumeration.next();
                        studioAttribute.addValue( new Value( studioAttribute, value ) );
                    }
                }
            }
        }
    }
View Full Code Here

    {
        monitor.beginTask( BrowserCoreMessages.jobs__modify_value_task, 2 );
        monitor.reportProgress( " " ); //$NON-NLS-1$
        monitor.worked( 1 );

        IValue newValue = new Value( attribute, newRawValue );

        modifyValue( attribute.getEntry().getBrowserConnection(), attribute.getEntry(), oldValue, newValue, monitor );
        if ( !monitor.errorsReported() )
        {
            createdNewValue = newValue;
View Full Code Here

                ocAttribute.deleteValue( values[i] );
            }
            for ( Iterator<ObjectClassDescription> it = selectedObjectClasses.iterator(); it.hasNext(); )
            {
                ObjectClassDescription ocd = it.next();
                ocAttribute.addValue( new Value( ocAttribute, ocd.getNames()[0] ) );
            }
        }
        finally
        {
            EventRegistry.resumeEventFireingInCurrentThread();
View Full Code Here

    {
        monitor.beginTask( BrowserCoreMessages.jobs__modify_value_task, 2 );
        monitor.reportProgress( " " ); //$NON-NLS-1$
        monitor.worked( 1 );

        IValue newValue = new Value( attribute, newRawValue );

        modifyValue( attribute.getEntry().getBrowserConnection(), attribute.getEntry(), oldValue, newValue, monitor );
        if ( !monitor.errorsReported() )
        {
            createdNewValue = newValue;
View Full Code Here

                ocAttribute.deleteValue( values[i] );
            }
            for ( Iterator<ObjectClassDescription> it = selectedObjectClasses.iterator(); it.hasNext(); )
            {
                ObjectClassDescription ocd = it.next();
                ocAttribute.addValue( new Value( ocAttribute, ocd.getNames()[0] ) );
            }
        }
        finally
        {
            EventRegistry.resumeEventFireingInCurrentThread();
View Full Code Here

            if ( attribute == null )
            {
                attribute = new Attribute( entry, newAttributeDescription );
            }

            newValues[i] = new Value( attribute, oldValues[i].getRawValue() );
        }

        CreateValuesJob.createValues( entry.getBrowserConnection(), entry, newValues, monitor );
        if ( !monitor.errorsReported() )
        {
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.ldapbrowser.core.model.impl.Value

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.