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

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


    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


            {
                // some value editors need the real Dn (e.g. the password editor)
                DummyEntry dummyEntry = new DummyEntry( Dn.isValid( dn ) ? new Dn( dn ) : new Dn(),
                    connection );
                Attribute dummyAttribute = new Attribute( dummyEntry, description );
                Value dummyValue = new Value( dummyAttribute, value );
                rawValue = valueEditor.getRawValue( dummyValue );
            }
            catch ( LdapInvalidDnException e )
            {
                // should not occur, as we check with isValid()
View Full Code Here

                {
                    oldValue = ""; //$NON-NLS-1$
                }

                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

     * 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

            {
                ocAttribute.deleteValue( value );
            }
            for ( ObjectClassDescription ocd : selectedObjectClasses )
            {
                ocAttribute.addValue( new Value( ocAttribute, ocd.getNames().get( 0 ) ) );
            }
        }
        finally
        {
            EventRegistry.resumeEventFireingInCurrentThread();
View Full Code Here

            IEntry entry = attribute.getEntry();

            IValue[] newValues = new IValue[values.length];
            for ( int v = 0; v < values.length; v++ )
            {
                newValues[v] = new Value( attribute, values[v].getRawValue() );
            }

            new CreateValuesJob( entry, newValues ).execute();
        }
    }
View Full Code Here

                    }
                    Object rdnValue = atav.getUpValue();
                    String[] stringValues = rdnAttribute.getStringValues();
                    if ( !Arrays.asList( stringValues ).contains( rdnValue ) )
                    {
                        rdnAttribute.addValue( new Value( rdnAttribute, rdnValue ) );
                    }
                }
            }

        }
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

                {
                    oldValue = ""; //$NON-NLS-1$
                }

                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

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.