Package org.apache.directory.ldapstudio.browser.core.model.schema

Examples of org.apache.directory.ldapstudio.browser.core.model.schema.AttributeValueProviderRelation


    protected void editAttribute()
    {
        StructuredSelection sel = ( StructuredSelection ) this.attributeViewer.getSelection();
        if ( !sel.isEmpty() )
        {
            AttributeValueProviderRelation relation = ( AttributeValueProviderRelation ) sel.getFirstElement();
            AttributeValueEditorDialog dialog = new AttributeValueEditorDialog( getShell(), relation,
                this.class2ValueEditorProxyMap, this.attributeTypesAndOids );
            if ( dialog.open() == AttributeValueEditorDialog.OK )
            {
                int index = this.attributeList.indexOf( relation );
View Full Code Here


    {
        public String getColumnText( Object obj, int index )
        {
            if ( obj instanceof AttributeValueProviderRelation )
            {
                AttributeValueProviderRelation relation = ( AttributeValueProviderRelation ) obj;
                if ( index == 0 )
                {
                    return relation.getAttributeNumericOidOrType();
                }
                else if ( index == 1 )
                {
                    if ( relation.getAttributeNumericOidOrType() != null )
                    {
                        if ( attributeTypes2AtdMap.containsKey( relation.getAttributeNumericOidOrType() ) )
                        {
                            AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeTypes2AtdMap
                                .get( relation.getAttributeNumericOidOrType() );
                            String s = atd.getNumericOID();
                            for ( int i = 0; i < atd.getNames().length; i++ )
                            {
                                if ( !relation.getAttributeNumericOidOrType().equals( atd.getNames()[i] ) )
                                {
                                    s += ", " + atd.getNames()[i];
                                }
                            }
                            return s;
                        }
                        else if ( attributeOid2AtdMap.containsKey( relation.getAttributeNumericOidOrType() ) )
                        {
                            AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeOid2AtdMap
                                .get( relation.getAttributeNumericOidOrType() );
                            return atd.toString();
                        }
                    }
                }
                else if ( index == 2 )
                {
                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
                    return vp != null ? vp.name : null;
                }
            }
            return null;
        }
View Full Code Here

        public Image getColumnImage( Object obj, int index )
        {
            if ( obj instanceof AttributeValueProviderRelation )
            {
                AttributeValueProviderRelation relation = ( AttributeValueProviderRelation ) obj;
                if ( index == 2 )
                {
                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
                    return vp != null ? vp.icon.createImage() : null;
                }
            }

            return null;
View Full Code Here

    }


    protected void okPressed()
    {
        this.returnRelation = new AttributeValueProviderRelation( this.typeOrOidCombo.getText(), this.vpName2classMap
            .get( this.valueEditorCombo.getText() ) );
        super.okPressed();
    }
View Full Code Here

        Collection<ValueEditorExtension> valueEditorProxys = ValueEditorManager.getValueEditorProxys();
        for ( ValueEditorExtension proxy : valueEditorProxys )
        {
            for ( String attributeType : proxy.attributeTypes )
            {
                AttributeValueProviderRelation avpr = new AttributeValueProviderRelation( attributeType,
                    proxy.className );
                avprs.add( avpr );
            }
            for ( String syntaxOid : proxy.syntaxOids )
            {
View Full Code Here

        Collection<ValueEditorExtension> valueEditorProxys = ValueEditorManager.getValueEditorProxys();
        for ( ValueEditorExtension proxy : valueEditorProxys )
        {
            for ( String attributeType : proxy.attributeTypes )
            {
                AttributeValueProviderRelation avpr = new AttributeValueProviderRelation( attributeType,
                    proxy.className );
                avprs.add( avpr );
            }
            for ( String syntaxOid : proxy.syntaxOids )
            {
View Full Code Here

    {
        public String getColumnText( Object obj, int index )
        {
            if ( obj instanceof AttributeValueProviderRelation )
            {
                AttributeValueProviderRelation relation = ( AttributeValueProviderRelation ) obj;
                if ( index == 0 )
                {
                    return relation.getAttributeNumericOidOrType();
                }
                else if ( index == 1 )
                {
                    if ( relation.getAttributeNumericOidOrType() != null )
                    {
                        if ( attributeTypes2AtdMap.containsKey( relation.getAttributeNumericOidOrType() ) )
                        {
                            AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeTypes2AtdMap
                                .get( relation.getAttributeNumericOidOrType() );
                            String s = atd.getNumericOID();
                            for ( int i = 0; i < atd.getNames().length; i++ )
                            {
                                if ( !relation.getAttributeNumericOidOrType().equals( atd.getNames()[i] ) )
                                {
                                    s += ", " + atd.getNames()[i];
                                }
                            }
                            return s;
                        }
                        else if ( attributeOid2AtdMap.containsKey( relation.getAttributeNumericOidOrType() ) )
                        {
                            AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeOid2AtdMap
                                .get( relation.getAttributeNumericOidOrType() );
                            return atd.toString();
                        }
                    }
                }
                else if ( index == 2 )
                {
                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
                    return vp != null ? vp.name : null;
                }
            }
            return null;
        }
View Full Code Here

        public Image getColumnImage( Object obj, int index )
        {
            if ( obj instanceof AttributeValueProviderRelation )
            {
                AttributeValueProviderRelation relation = ( AttributeValueProviderRelation ) obj;
                if ( index == 2 )
                {
                    ValueEditorExtension vp = class2ValueEditorProxyMap.get( relation.getValueProviderClassname() );
                    return vp != null ? vp.icon.createImage() : null;
                }
            }

            return null;
View Full Code Here

    protected void editAttribute()
    {
        StructuredSelection sel = ( StructuredSelection ) this.attributeViewer.getSelection();
        if ( !sel.isEmpty() )
        {
            AttributeValueProviderRelation relation = ( AttributeValueProviderRelation ) sel.getFirstElement();
            AttributeValueEditorDialog dialog = new AttributeValueEditorDialog( getShell(), relation,
                this.class2ValueEditorProxyMap, this.attributeTypesAndOids );
            if ( dialog.open() == AttributeValueEditorDialog.OK )
            {
                int index = this.attributeList.indexOf( relation );
View Full Code Here

    }


    protected void okPressed()
    {
        this.returnRelation = new AttributeValueProviderRelation( this.typeOrOidCombo.getText(), this.vpName2classMap
            .get( this.valueEditorCombo.getText() ) );
        super.okPressed();
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.ldapstudio.browser.core.model.schema.AttributeValueProviderRelation

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.