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

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


                            readIn.read( connectionName );
                            connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
                                new String( connectionName ) );
                        }

                        IEntry entry = null;
                        if ( readIn.available() > 1 && connection != null )
                        {
                            int size = readIn.readInt();
                            byte[] dn = new byte[size];
                            readIn.read( dn );
View Full Code Here


                            readIn.read( connectionName );
                            connection = BrowserCorePlugin.getDefault().getConnectionManager().getConnection(
                                new String( connectionName ) );
                        }

                        IEntry entry = null;
                        if ( readIn.available() > 1 && connection != null )
                        {
                            int size = readIn.readInt();
                            byte[] dn = new byte[size];
                            readIn.read( dn );
                            entry = connection.getEntryFromCache( new DN( new String( dn ) ) );
                        }
                        else
                        {
                            return null;
                        }

                        IAttribute attribute = null;
                        if ( readIn.available() > 1 && entry != null )
                        {
                            int size = readIn.readInt();
                            byte[] attributeName = new byte[size];
                            readIn.read( attributeName );
                            attribute = entry.getAttribute( new String( attributeName ) );
                        }
                        else
                        {
                            return null;
                        }
View Full Code Here

        super.setInput( input );
        if ( input instanceof EntryEditorInput && this.universalListener != null )
        {

            EntryEditorInput eei = ( EntryEditorInput ) input;
            IEntry entry = eei.getEntry();
            this.universalListener.setInput( entry );
            if ( entry != null )
            {
                getSite().getPage().getNavigationHistory().markLocation( this );
            }
View Full Code Here

     * @param values
     *      the Values to paste
     */
    private void pasteValues( IValue[] values )
    {
        IEntry entry = null;
        if ( getSelectedAttributes().length > 0 )
        {
            entry = getSelectedAttributes()[0].getEntry();
        }
        else if ( getSelectedValues().length > 0 )
View Full Code Here

        IBookmark[] bookmarks = SelectionUtils.getBookmarks( selection );

        ISearch[] searches = SelectionUtils.getSearches( selection );

        ISearch search = null;
        IEntry entry = null;
        if ( entries.length + searchResults.length + bookmarks.length + searches.length == 1 )
        {
            if ( entries.length == 1 )
            {
                entry = entries[0];
View Full Code Here

{

    public void decorate( Object element, IDecoration decoration )
    {

        IEntry entry = null;

        if ( element instanceof ISearchResult )
        {
            ISearchResult searchResult = ( ISearchResult ) element;
            entry = searchResult.getEntry();
            decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
                BrowserUIConstants.IMG_OVR_SEARCHRESULT ), IDecoration.BOTTOM_RIGHT );
        }
        else if ( element instanceof IEntry )
        {
            entry = ( IEntry ) element;
            if ( entry.getChildrenFilter() != null )
            {
                decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
                    BrowserUIConstants.IMG_OVR_FILTERED ), IDecoration.BOTTOM_RIGHT );
            }
        }
        else
        {
            decoration.addOverlay( null, IDecoration.BOTTOM_RIGHT );
        }

        if ( entry != null )
        {
            if ( !entry.isConsistent() )
            {
                decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
                    BrowserUIConstants.IMG_OVR_ERROR ), IDecoration.BOTTOM_LEFT );
            }
            else if ( !entry.isDirectoryEntry() )
            {
                decoration.addOverlay( BrowserUIPlugin.getDefault().getImageDescriptor(
                    BrowserUIConstants.IMG_OVR_WARNING ), IDecoration.BOTTOM_LEFT );
            }
            else
View Full Code Here

        final DN dn = new DN( rdns[0], parentDns[0] );

        // check if parent exists or new entry already exists
        ReadEntryJob readEntryJob1 = new ReadEntryJob( wizard.getSelectedConnection(), parentDns[0] );
        RunnableContextJobAdapter.execute( readEntryJob1, getContainer(), false );
        IEntry parentEntry = readEntryJob1.getReadEntry();
        if ( parentEntry == null )
        {
            getShell().getDisplay().syncExec( new Runnable()
            {
                public void run()
                {
                    MessageDialog.openError( getShell(), "Error", "Parent " + dnBuilderWidget.getParentDn().toString()
                        + " doesn't exists" );
                }
            } );
            return null;
        }
        ReadEntryJob readEntryJob2 = new ReadEntryJob( wizard.getSelectedConnection(), dn );
        RunnableContextJobAdapter.execute( readEntryJob2, getContainer(), false );
        IEntry entry = readEntryJob2.getReadEntry();
        if ( entry != null )
        {
            getShell().getDisplay().syncExec( new Runnable()
            {
                public void run()
View Full Code Here

            {

                if ( connection != null )
                {

                    IEntry entry = null;
                    if ( dn != null && dn.getRdns().length > 0 )
                    {
                        entry = connection.getEntryFromCache( dn );
                        if ( entry == null )
                        {
                            ReadEntryJob job = new ReadEntryJob( connection, dn );
                            RunnableContextJobAdapter.execute( job );
                            entry = job.getReadEntry();
                        }
                    }
                    if ( entry == null && connection.getBaseDNEntries() != null
                        && connection.getBaseDNEntries().length > 0 )
                    {
                        entry = connection.getBaseDNEntries()[0];
                    }

                    if ( entry != null )
                    {
                        SelectEntryDialog dialog = new SelectEntryDialog( parent.getShell(), "Select DN", connection,
                            entry );
                        dialog.open();
                        IEntry selectedEntry = dialog.getSelectedEntry();
                        if ( selectedEntry != null )
                        {
                            dn = selectedEntry.getDn();
                            dnChanged();
                            internalSetEnabled();
                            notifyListeners();
                        }
                    }
View Full Code Here

            this.mainWidget.getViewer().setSelection( new StructuredSelection( searchResult ), true );
            this.mainWidget.getViewer().setSelection( new StructuredSelection( searchResult ), true );
        }
        if ( obj instanceof IEntry )
        {
            IEntry entry = ( IEntry ) obj;

            List entryList = new ArrayList();
            IEntry tempEntry = entry;
            while ( tempEntry.getParententry() != null )
            {
                IEntry parentEntry = tempEntry.getParententry();
                entryList.add( parentEntry );
                tempEntry = parentEntry;
            }

            IEntry[] parentEntries = ( IEntry[] ) entryList.toArray( new IEntry[0] );
View Full Code Here

                    StructuredSelection selection = ( StructuredSelection ) context.getSelection();
                    Object obj = selection.getFirstElement();
                    if ( obj instanceof IValue )
                    {
                        IValue value = ( IValue ) obj;
                        IEntry entry = value.getAttribute().getEntry();
                        select( entry );
                    }
                    else if ( obj instanceof IAttribute )
                    {
                        IAttribute attribute = ( IAttribute ) obj;
                        IEntry entry = attribute.getEntry();
                        select( entry );

                    }
                    else if ( obj instanceof ISearchResult )
                    {
View Full Code Here

TOP

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

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.