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

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


     * Opens the editor and adds the new value to the list.
     */
    private void addValue()
    {
        IAttribute attribute = new Attribute( context.getEntry(), "" ); //$NON-NLS-1$
        IValue value = new Value( attribute, "" ); //$NON-NLS-1$
        Object oldRawValue = valueEditor.getRawValue( value ); //$NON-NLS-1$

        CellEditor cellEditor = valueEditor.getCellEditor();
        cellEditor.setValue( oldRawValue );
        cellEditor.activate();
View Full Code Here


    {
        String oldValue = getSelectedValue();
        if ( oldValue != null )
        {
            IAttribute attribute = new Attribute( context.getEntry(), "" ); //$NON-NLS-1$
            IValue value = new Value( attribute, oldValue ); //$NON-NLS-1$
            Object oldRawValue = valueEditor.getRawValue( value ); //$NON-NLS-1$

            CellEditor cellEditor = valueEditor.getCellEditor();
            cellEditor.setValue( oldRawValue );
            cellEditor.activate();
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

     * @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

        {
            try
            {
                DummyEntry dummyEntry = new DummyEntry( new LdapDN( dn ), connection );
                Attribute dummyAttribute = new Attribute( dummyEntry, description );
                Value dummyValue = new Value( dummyAttribute, value );

                rawValue = valueEditor.getRawValue( dummyValue );
            }
            catch ( InvalidNameException e )
            {
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

                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.resumeEventFireingInCurrentThread();
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

                                entry.setReferral( true );
                                entry.setHasChildrenHint( false );
                            }

                            IAttribute ocAttribute = entry.getAttribute( attributeDescription );
                            Value ocValue = new Value( ocAttribute, value );
                            ocAttribute.addValue( ocValue );
                        }
                    }
                }
            }
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.