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

Examples of org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy


                IEntry entry = ( IEntry ) newInput;
                dn = "DN: " + entry.getDn().toString();
            }
            else if ( newInput != null && newInput instanceof AttributeHierarchy )
            {
                AttributeHierarchy ah = ( AttributeHierarchy ) newInput;
                dn = "DN: " + ah.getAttribute().getEntry().getDn().toString();
            }
            else
            {
                dn = "No entry selected";
                enabled = false;
View Full Code Here


                return values;
            }
        }
        else if ( inputElement != null && inputElement instanceof AttributeHierarchy )
        {
            AttributeHierarchy ah = ( AttributeHierarchy ) inputElement;
            IAttribute[] attributes = ah.getAttributes();
            Object[] values = getValues( attributes );
            return values;
        }
        else
        {
View Full Code Here

     */
    public void activate()
    {
        if ( this.getValue() != null && this.getValue() instanceof AttributeHierarchy )
        {
            AttributeHierarchy ah = ( AttributeHierarchy ) this.getValue();
            if ( ah != null )
            {
                MultivaluedDialog dialog = new MultivaluedDialog( this.parent.getShell(), ah );
                dialog.open();
            }
View Full Code Here

                for ( int i = 0; i < objects.length; i++ )
                {
                    Object object = objects[i];
                    if ( object instanceof AttributeHierarchy )
                    {
                        AttributeHierarchy ah = ( AttributeHierarchy ) object;
                        for ( Iterator it = ah.iterator(); it.hasNext(); )
                        {
                            IAttribute attribute = ( IAttribute ) it.next();
                            entry = attribute.getEntry();
                            IValue[] values = attribute.getValues();
                            for ( int v = 0; v < values.length; v++ )
View Full Code Here

        if ( event instanceof EmptyValueAddedEvent && !this.editor.getActionGroup().isEditorActive() )
        {
            EmptyValueAddedEvent evae = ( EmptyValueAddedEvent ) event;
            IAttribute att = evae.getAddedValue().getAttribute();
            AttributeHierarchy ah = cursor.getSelectedAttributeHierarchie();
            if ( ah != null && ah.contains( att ) )
            {
                viewer.setSelection( null, true );
                viewer.getTable().setSelection( new TableItem[0] );
                if ( startEditAction.isEnabled() )
                {
View Full Code Here

            IEntry entry = ( IEntry ) newInput;
            dn = "DN: " + entry.getDn().toString();
        }
        else if ( newInput != null && newInput instanceof AttributeHierarchy )
        {
            AttributeHierarchy ah = ( AttributeHierarchy ) newInput;
            dn = "DN: " + ah.getAttribute().getEntry().getDn().toString();
        }
        else
        {
            dn = "No entry selected";
            enabled = false;
View Full Code Here

                return values;
            }
        }
        else if ( inputElement != null && inputElement instanceof AttributeHierarchy )
        {
            AttributeHierarchy ah = ( AttributeHierarchy ) inputElement;
            IAttribute[] attributes = ah.getAttributes();
            Object[] values = getValues( attributes );
            return values;
        }
        else
        {
View Full Code Here

               
               
                for ( int r = 0; r < ras.length; r++ )
                {
                    // clear attributes requested from server, also include subtypes
                    AttributeHierarchy ah = entry.getAttributeWithSubtypes( ras[r] );
                    if ( ah != null )
                    {
                        for ( Iterator it = ah.iterator(); it.hasNext(); )
                        {
                            IAttribute attribute = ( IAttribute ) it.next();
                            try
                            {
                                entry.deleteAttribute( attribute );
View Full Code Here

            }
            for ( int a = 0; returningAttributes != null && a < returningAttributes.length; a++ )
            {

                AttributeComparator comparator = new AttributeComparator( entries[e] );
                AttributeHierarchy ah = entries[e].getAttributeWithSubtypes( returningAttributes[a] );
                if ( ah != null )
                {

                    StringBuffer valueSB = new StringBuffer();

                    for ( Iterator it = ah.iterator(); it.hasNext(); )
                    {
                        IAttribute attribute = ( IAttribute ) it.next();
                        if ( attribute != null )
                        {
View Full Code Here

    {

        if ( element != null && element instanceof ISearchResult && property != null )
        {
            ISearchResult result = ( ISearchResult ) element;
            AttributeHierarchy ah = result.getAttributeWithSubtypes( property );

            // check DN
            if ( BrowserUIConstants.DN.equals( property ) )
            {
                return false;
            }

            // attribute dummy
            if ( ah == null )
            {
                try
                {
                    ah = new AttributeHierarchy( result.getEntry(), property, new IAttribute[]
                        { new Attribute( result.getEntry(), property ) } );
                }
                catch ( ModelModificationException e )
                {
                    e.printStackTrace();
                    return false;
                }
            }

            // check schema modifyable
            boolean isOneModifyable = false;
            for ( Iterator it = ah.iterator(); it.hasNext(); )
            {
                IAttribute attribute = ( IAttribute ) it.next();
                if ( SchemaUtils.isModifyable( attribute.getAttributeTypeDescription() ) )
                {
                    isOneModifyable = true;
                    break;
                }
            }
            if ( !isOneModifyable )
            {
                return false;
            }

            // check if property is valid for the entry
            boolean isOneValid = false;
            for ( Iterator it = ah.iterator(); it.hasNext(); )
            {
                IAttribute attribute = ( IAttribute ) it.next();
                if ( attribute.isObjectClassAttribute() || attribute.isMustAttribute() || attribute.isMayAttribute() )
                {
                    isOneValid = true;
View Full Code Here

TOP

Related Classes of org.apache.directory.ldapstudio.browser.core.model.AttributeHierarchy

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.