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

Examples of org.apache.directory.studio.ldapbrowser.core.model.IValue


        }

        StringBuffer sb = new StringBuffer();
        for ( Iterator<IValue> it = valueList.iterator(); it.hasNext(); )
        {
            IValue value = it.next();
            sb.append( getDisplayValue( value ) );
            if ( it.hasNext() )
                sb.append( ", " );
        }
        return sb.toString();
View Full Code Here


        }

        StringBuffer sb = new StringBuffer();
        for ( Iterator<IValue> it = valueList.iterator(); it.hasNext(); )
        {
            IValue value = it.next();
            sb.append( getDisplayValue( value ) );
            if ( it.hasNext() )
                sb.append( ", " );
        }
        return sb.toString();
View Full Code Here

        StringBuffer sb = new StringBuffer();
        if ( valueList.size() > 1 )
            sb.append( valueList.size() + " values: " );
        for ( Iterator it = valueList.iterator(); it.hasNext(); )
        {
            IValue value = ( IValue ) it.next();
            IValueEditor vp = this.valueEditorManager.getCurrentValueEditor( value );
            sb.append( vp.getDisplayValue( value ) );
            if ( it.hasNext() )
                sb.append( ", " );
        }
View Full Code Here

        {
            IAttribute attribute = ( IAttribute ) it.next();
            IValue[] values = attribute.getValues();
            for ( int i = 0; i < values.length; i++ )
            {
                IValue value = values[i];
                if ( value.isEmpty() )
                {
                    this.mainWidget.getViewer().setSelection( new StructuredSelection( value ), true );
                    if ( this.actionGroup.getOpenDefaultEditorAction().isEnabled() )
                    {
                        this.actionGroup.getOpenDefaultEditorAction().run();
View Full Code Here

     */
    public boolean canModify( Object element, String property )
    {
        if ( element != null && element instanceof IValue && valueEditorManager != null )
        {
            IValue attributeValue = ( IValue ) element;

            if ( !SchemaUtils.isModifyable( attributeValue.getAttribute().getAttributeTypeDescription() ) )
            {
                return false;
            }
            if ( attributeValue.isRdnPart() )
            {
                return false;
            }
            if ( EntryEditorWidgetTableMetadata.KEY_COLUMN_NAME.equals( property ) )
            {
View Full Code Here

     */
    public Object getValue( Object element, String property )
    {
        if ( element != null && element instanceof IValue && valueEditorManager != null )
        {
            IValue attributeValue = ( IValue ) element;
            Object returnValue;
            if ( EntryEditorWidgetTableMetadata.KEY_COLUMN_NAME.equals( property ) )
            {
                returnValue = attributeValue.getAttribute().getDescription();
            }
            else if ( EntryEditorWidgetTableMetadata.VALUE_COLUMN_NAME.equals( property ) )
            {
                returnValue = this.valueEditorManager.getCurrentValueEditor( attributeValue ).getRawValue(
                    attributeValue );
View Full Code Here

            element = ( ( Item ) element ).getData();
        }

        if ( element != null && element instanceof IValue && valueEditorManager != null )
        {
            IValue oldValue = ( IValue ) element;

            if ( EntryEditorWidgetTableMetadata.VALUE_COLUMN_NAME.equals( property ) )
            {
                valueEditorManager.modifyValue( oldValue, newRawValue );
            }
View Full Code Here

                            it.remove();
                        }
                    }
                    for ( Iterator it = valueList.iterator(); it.hasNext(); )
                    {
                        IValue value = ( IValue ) it.next();
                        if ( value.isEmpty() )
                        {
                            value.getAttribute().deleteEmptyValue();
                            it.remove();
                        }
                    }

                    if ( !attributeList.isEmpty() || !valueList.isEmpty() )
View Full Code Here

        Set valueSet = getValueSet();
        if ( !valueSet.isEmpty() )
        {
            for ( Iterator iterator = valueSet.iterator(); iterator.hasNext(); )
            {
                IValue value = ( IValue ) iterator.next();

                if ( mode == MODE_UTF8 )
                {
                    text.append( LdifUtils.utf8decode( value.getBinaryValue() ) );
                    if ( iterator.hasNext() )
                        text.append( BrowserCoreConstants.LINE_SEPARATOR );
                }
                else if ( mode == MODE_BASE64 )
                {
                    text.append( LdifUtils.base64encode( value.getBinaryValue() ) );
                    if ( iterator.hasNext() )
                        text.append( BrowserCoreConstants.LINE_SEPARATOR );
                }
                else if ( mode == MODE_HEX )
                {
                    text.append( LdifUtils.hexEncode( value.getBinaryValue() ) );
                    if ( iterator.hasNext() )
                        text.append( BrowserCoreConstants.LINE_SEPARATOR );
                }
                else if ( mode == MODE_LDIF )
                {
View Full Code Here

        super.setVisible( visible );

        if ( visible )
        {
            DummyEntry newEntry = wizard.getPrototypeEntry();
            IValue editValue = null;

            try
            {
                EventRegistry.suspendEventFireingInCurrentThread();
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.ldapbrowser.core.model.IValue

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.